Skip to main content

A Django package for countries and cities with translations.

Project description

GeoBank

A Django package that provides models for Countries and Cities with translation support using django-modeltranslation.

Installation

  1. Install the package:

    pip install GeoBank
    
  2. Add geobank and modeltranslation to your INSTALLED_APPS in settings.py. Note: modeltranslation must be added before django.contrib.admin.

    INSTALLED_APPS = [
        'modeltranslation',
        'django.contrib.admin',
        # ...
        'geobank',
    ]
    
  3. Configure your languages in settings.py:

    LANGUAGES = (
        ('en', 'English'),
        ('fa', 'Persian'),
        # ... other languages
    )
    
  4. Run migrations:

    python manage.py makemigrations
    python manage.py migrate
    
  5. Populate the database:

    python manage.py populate_geobank
    

    To run in the background (requires Celery):

    python manage.py populate_geobank --background
    

Requirements

  • Django >= 3.2
  • django-modeltranslation >= 0.18.0
  • Pillow >= 9.0
  • Celery (optional, for background tasks)
  • tqdm (for progress bars)
  • requests

TODO

  • Improve data gathering and population faster using async scrips
  • Add more fields to models

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

geobank-0.3.0.tar.gz (9.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

geobank-0.3.0-py3-none-any.whl (11.8 kB view details)

Uploaded Python 3

File details

Details for the file geobank-0.3.0.tar.gz.

File metadata

  • Download URL: geobank-0.3.0.tar.gz
  • Upload date:
  • Size: 9.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geobank-0.3.0.tar.gz
Algorithm Hash digest
SHA256 c09592bf8571e71c433cd43bb5f8cceeefd9885952a853d3982e8dd73fc9cd7e
MD5 58af16eef0626cca420dea0f8cbae579
BLAKE2b-256 d00177aafc2ea837abe1e1aa99f6ae7f49b46cf447e6d16fbffdfc79320c8210

See more details on using hashes here.

File details

Details for the file geobank-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: geobank-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 11.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for geobank-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b092f91be15b1599ea400a55dd5599beca35642904402e6c6bac7a383338e90
MD5 7f6e2601940f59397195c5e7d1eddcc0
BLAKE2b-256 7d6cd9e6d7baf0fac583cb88fd875b502df26f6d73bf102ab6f65f1139dc3f09

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page