Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Install Python/Python3, that will install PIP (Python Installation Packages) too
- brew install python
- brew install python3
- # Install iPython, interactive Python
- pip install ipython
- # Install Virtual Env Wrapper (instead of Virtual Env)
- pip install virtualenvwrapper
- (on .bash_profile add: )
- export WORKON_HOME=$HOME/.virtualenvs # Acá se crean los virtualenvs
- export PROJECT_HOME=$HOME/code/python/projects # Acá se crean los Proyectos
- source /usr/local/bin/virtualenvwrapper.sh
- mkvirtualenv <virtenv_name> # To create a new virtual env
- workon <virtenv_name> # To activate an existing virtual env
- deactivate # To deactivate an active virtual env
- rmvirtualenv <virtenv_name> # To delete an existing virtual env
- # (being your virtualenv activated)
- # Install Django
- pip install django
- # Install Django REST Framework
- pip install djangorestframework
- # Creating a new Django Project
- cd <pre_project_folder>
- django-admin.py startproject <project_name>
- cd <project_name>
- django-admin.py startapp <app_name>
- # Add this <app_name> to INSTALLED_APPS in settings.py
- # First DB Update
- python manage.py migrate
- # Create requirements.txt
- pip freeze > requirements.txt
- # After making models migrate DB
- python manage.py makemigrations
- python manage.py migrate
- # Create super user
- python manage.py createsuperuser
Add Comment
Please, Sign In to add comment