Post #440
563

The strange relationship between objects, functions, generators and coroutines
https://www.packt.com/bizarre-python/
👉 @python_real
https://www.packt.com/bizarre-python/
👉 @python_real
- 👍 2
РЕ @python_real
Showing posts older than #442 · Back to latest








mkdir project_name
cd project_namepython3 -m venv venvsource venv/bin/activatedeactivatepip install django~=3.1.0 django-admin startproject config .python manage.py startapp app_namepython manage.py makemigrationspython manage.py migratepython manage.py createsuperuserpython manage.py runserver => ex. http://127.0.0.1:8000# Django shell (Run projet code direclty)
~$ python manage.py shell
# example of code to run in the shell:
>>> from app_name.models import User
>>> user1 = User.objects.first()
# Prepare static folders for production
$ python manage.py collectstatic
# Take all data from app blog and export in json
python manage.py dumpdata blog >myapp.json
# Take all data in json file and import in app data table
python manage.py loaddata myapp.jsonForwarded from Codeby






