A Django app to get information about Adminstrative bodies of Nepal.
Project description
================ Django Nepal
djangonepal is a Django app that provides information about the administrative bodies of Nepal. Currently it has the names of seven provinces of Nepal, name of the districts inside each of the provinces and name of all the municipalities ( including Metropolitan, Sub-Metropolitan and rural Municipalities aka Gaun Palika) inside each districts. Hope this saves your time while working on your web project based project for Nepal.
Quick start
-
Add "djangonepal" to your INSTALLED_APPS setting like this::
INSTALLED_APPS = [ ...
'djangonepal', ...
]
-
Run
python manage.py makemigrations djangonepal
-
Run
python manage.py migrate
to create the models. -
Add
djangonepal.context_processors.data
to your 'context_processors' (optional)'context_processors': [ ...
'djangonepal.context_processors.data' ... ]
-
Run
python manage.py runscript load_data
wait till the import finishes. This import will let you use the data the way you want. -
If you followed step 4 you should be able to render it in your template using
{% for i in province %} <p> {{i.name}} </p> {% endfor %}
For district
{{i.district}}
For VDC/Municipality/Metropolitan/Sub-Metropolitan{{i.municipality}}
-
You could also register the model on your admin.py file with
from djangonepal.models import * admin.site.register(Province) admin.site.register(District) admin.site.register(Municipality)
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Hashes for djangonepal-0.0.3-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 235af6f658089e49bcdd9270c3bd9736d9878414d4346612941a973f3287d439 |
|
MD5 | 4ba0807bc8138db4a830c1c308cd4d1f |
|
BLAKE2b-256 | 15b15d2aa95c43942ab5e228bca8438a84d302a1709ce325f6029e552933c4e0 |