Code Monkey home page Code Monkey logo

django-nepal's Introduction

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

  1. After installing add "djangonepal" and 'django_extensions' to your INSTALLED_APPS setting like this:

    INSTALLED_APPS = [
        ...
    
        'djangonepal',
        'django_extensions',
    
        ...
    ]
  2. Run python manage.py makemigrations djangonepal
  3. Run python manage.py migrate to create the models.
  4. Add djangonepal.context_processors.data to your 'context_processors' (optional)

    'context_processors': [

    ...

    'djangonepal.context_processors.data'

    ... ]

  5. Run python manage.py runscript load_data wait till the import finishes. This import will let you use the data the way you want.
  6. 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}}

  7. 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)

Want to Contribute?

Open to any feedbacks/pull requests. Feel free to Ping Me Anytime, Even if you are not a developer. Any valid resource or data in any format is appreciated. Everyone will be credited for their respective contributions.

NOTE:

Please check the source and published date of data before submitting any kind of information regarding the package.

Future Releases

  1. More information about each administrative divisions to be added.
  2. Resource Map, Census data to be added.
  3. Terrain,flora,fauna data to be added.
  4. Rest API to be created and made public.

django-nepal's People

Contributors

atitbimali avatar

Stargazers

 avatar

Watchers

 avatar

Forkers

npopen

django-nepal's Issues

No (valid) module for script 'load_data' found

Hi, I'm very new to Python and Django but I was implementing an address feature in an app.

While running the script i got this error, tried to solve it using chatGPT and Google, StackOverflow but didn't find anything solving.

I am getting following things:

Code ran :

$ python manage.py runscript load_data

Result :

  No (valid) module for script 'load_data' found
  Try running with a higher verbosity level like: -v2 or -v3
  CommandError: An error has occurred running scripts. See errors above.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.