Skip to content
Jayesh Lahori edited this page Aug 13, 2014 · 14 revisions

I have Django Project called VMS and AdminUnit as an app inside VMS.

File Structure

Following are the file's inside AdminUnit app.

  1. models.py - Contains all tables associated with the app
  2. forms.py - Contains forms which have been used throughout to enter data into the system. Some of them inherit the ModelForm class of Django which helps directly create a form from Django Models, Other's inherit forms.Form class
  3. admin.py - Contains views to be shown in admin
  4. tests.py - Contains unit-tests to test the model structures and Client tests to test the views.
  5. urls.py - Contains mapping of url's to view methods
  6. views.py - Contains methods for displaying views

Model structure

Following are the models currently used in AdminUnit.

  1. Organization - This table stores the information about various organization's which are registered ABI. Volunteers/Admins also have an associated organization field in their Profile. CREATE TABLE "AdminUnit_organization" ( "id" serial NOT NULL PRIMARY KEY, "name" varchar(128) NOT NULL UNIQUE, "location" varchar(128) NOT NULL, "noOfVolunteers" integer NOT NULL );
Clone this wiki locally