Guest User

Untitled

a guest
Nov 19th, 2018
91
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. # Install Python/Python3, that will install PIP (Python Installation Packages) too
  2. brew install python
  3. brew install python3
  4.  
  5. # Install iPython, interactive Python
  6. pip install ipython
  7.  
  8. # Install Virtual Env Wrapper (instead of Virtual Env)
  9. pip install virtualenvwrapper
  10. (on .bash_profile add: )
  11. export WORKON_HOME=$HOME/.virtualenvs # Acá se crean los virtualenvs
  12. export PROJECT_HOME=$HOME/code/python/projects # Acá se crean los Proyectos
  13. source /usr/local/bin/virtualenvwrapper.sh
  14. mkvirtualenv <virtenv_name> # To create a new virtual env
  15. workon <virtenv_name> # To activate an existing virtual env
  16. deactivate # To deactivate an active virtual env
  17. rmvirtualenv <virtenv_name> # To delete an existing virtual env
  18.  
  19. # (being your virtualenv activated)
  20.  
  21. # Install Django
  22. pip install django
  23.  
  24. # Install Django REST Framework
  25. pip install djangorestframework
  26.  
  27. # Creating a new Django Project
  28. cd <pre_project_folder>
  29. django-admin.py startproject <project_name>
  30. cd <project_name>
  31. django-admin.py startapp <app_name>
  32. # Add this <app_name> to INSTALLED_APPS in settings.py
  33.  
  34. # First DB Update
  35. python manage.py migrate
  36.  
  37. # Create requirements.txt
  38. pip freeze > requirements.txt
  39.  
  40. # After making models migrate DB
  41. python manage.py makemigrations
  42. python manage.py migrate
  43.  
  44. # Create super user
  45. python manage.py createsuperuser
Add Comment
Please, Sign In to add comment