Search
 
SCRIPT & CODE EXAMPLE
 

PYTHON

aws django migrate

# go to https://docs.aws.amazon.com/elasticbeanstalk/latest/dg/create-deploy-python-django.html#python-django-update-app
# copy the code 
container_commands:
  01_migrate:
    command: "source /var/app/venv/*/bin/activate && python3 manage.py migrate"
    leader_only: true
option_settings:
  aws:elasticbeanstalk:application:environment:
    DJANGO_SETTINGS_MODULE: ebdjango.settings
# on terminal run 
nano .ebextentions/db-migrate.config
# paste the above copied code and change DJANGO_SETTINGS_MODULE to
DJANGO_SETTINGS_MODULE: project-name.settings
# now create superusesr using following code
02_createsuperuser:
    command: "echo "from django.contrib.auth.models import User; User.objects.create_superuser('vipin', 'vyvipinyadav998@gmail.com', 'django1234')" | python manage.py shell"
    leader_only: true
#save this file and run "eb deploy" on terminal
Comment

PREVIOUS NEXT
Code Example
Python :: python repet x time 
Python :: python opencv measure distance two shapes 
Python :: python datetime greater than now 
Python :: socket always listen in thread python 
Python :: install python 3.8 on wsl 
Python :: TypeError: Can only append a dict if ignore_index=True 
Python :: python pandas how to get all of the columns names 
Python :: captions overlap in seaborn plot jupyter 
Python :: cv2 read rgb image 
Python :: try python 
Python :: How to Adjust Title Position in Matplotlib 
Python :: Scrapping tables in an HTML file with BeautifulSoup 
Python :: pandas find all rows not null 
Python :: not in python 
Python :: hungry chef 
Python :: flask start development server 
Python :: stutter function in python 
Python :: print string elements in list python 
Python :: random.randint 
Python :: detailview 
Python :: hugingface ner 
Python :: how to create a virtual environment in python 
Python :: four digit representation python 
Python :: django run management command from code 
Python :: django optional path parameter 
Python :: python autoclicker 
Python :: how to remove time in datetime in python 
Python :: python check array exists 
Python :: puppy and sum codechef solution 
Python :: python one line if without else 
ADD CONTENT
Topic
Content
Source link
Name
1+9 =