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

  • Make number of cities optional(cities with population more than 500, 1000, 5000 or 15000)
  • 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.1.1.tar.gz (7.9 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.1.1-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for geobank-0.1.1.tar.gz
Algorithm Hash digest
SHA256 32431292f7254d33483ffdcf2b69a3cd1f9382a63bee5e6f9d122f4e9aafbc5e
MD5 22eac14696cb6436df623df4c9dac9ff
BLAKE2b-256 1d1a9c075770980770d2b47322f7b9774a67f8b5b030537b62321a8c03ca8d2b

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geobank-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 9.9 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.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 35fd4d742bdab8b06950a09f6ae949ead7232368b90a6710c52747c36415a845
MD5 6917cce0e6e22c06b52a999c295514b2
BLAKE2b-256 49597bb6743ec10087326dc7704a98f1f01850cb140c21de1416610ae64ba0ac

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