yotamoron/easysnp
Folders and files
| Name | Name | Last commit date | ||
|---|---|---|---|---|
Repository files navigation
Directory structure
===================
- Each application should have at least the following directories:
- static: Static (CSS, JS, JPG etc) files that are only relevant to the
application are stored in this folder. Django will know to look for the
files in each static application's 'static' directory.
NOTE: files with the same name in different static directories have
undefined behaviour
- templates: templates that are only relevant to this application are stored
in this directory. Django will automatically know to look for the
template files.
NOTE: files with the same name in different templates static directories
have undefined behaviour
Important link paths:
=====================
Password change: /accounts/password/change/
Registration: /accounts/register/
Login/Logout: /accounts/login/ /accounts/logout/
MySQL stuff
===========
- Make sure that mysql is installed and running
- User root, password gogobilbi:
http://www.cyberciti.biz/faq/mysql-reset-lost-root-password/
- Create a easysnp database:
% mysql -u root -p mysql
mysql> CREATE DATABASE easysnp;
mysql> quit
- Create all needed tables:
% python manage.py syncdb
- Run local mail server:
% python -m smtpd -n -c DebuggingServer localhost:1025
- Create superuser:
- Username: admin
- Email: yotamoron@yahoo.com
- Password: nevovo04
High level
==========
- The main application is driving the site. The application's pages
are exposed and handled by it
- Other applications are embedded within one of main's pages
Adding an application
=====================
- Run in the root directory
% python manage.py startap <App name>
- Add the application in settings.py
- Create a templates direcotry in the new application. The templates that go
in the templates directory are not a full page templates but only the part
in the page that this particular app in handling
- Modify urls.py so it will expose the basic API (delete, new etc)
- Create a template stub for each basic API
- Create the stubs for each function in views.py