Your second Django project
If you’ve followed the steps in the previous blog posts, you should have your first basic Django project up and running. You’ll also have various bits and pieces already installed, ready for your next projects. Here is a brief reminder of what to do for your next project:
- Choose a project name, e.g. SecondDjango
- Create a virtual environment, and use it
- cd <dev root>/envs
- virtualenv SecondDjango
- source SecondDjango/bin/activate
- Install Django and python-mysql into your new virtual environment
- (SecondDjango) pip install MySQL-python
- (SecondDjango) pip install Django
- Create your project
- (SecondDjango) cd <dev root>/Projects
- (SecondDjango) django-admin.py startproject SecondDjango
- Create a new database and user, and enter the details in the settings.py file
- Create a new app, add to the INSTALLED_APPS in settings
- Create your models, add them to the admin site in the app’s admin.py
- Create a superuser: python manage.py createsuperuser
- Start the test server (runserver) and check out the admin panel (http://localhost:8000/admin/)