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.0.tar.gz (7.4 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.0-py3-none-any.whl (8.9 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: geobank-0.1.0.tar.gz
  • Upload date:
  • Size: 7.4 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.0.tar.gz
Algorithm Hash digest
SHA256 78da67eed9a56aaf207fc9047be3c60a270dd3becf3ac2d9a2cfa4a25ae56f3a
MD5 409c518f540bffcb399f03826d8ef4a6
BLAKE2b-256 7ae0ef4f66b2bba67f1f2d457bc93c8da94cc0951fa770deca7bee5291be37ef

See more details on using hashes here.

File details

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

File metadata

  • Download URL: geobank-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 8.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.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4017c0194480c2f6d231eb9abf9737c7dae6cf45a6ccfe17ba9a74f8ac45c2a8
MD5 5eeb9af3160913f60589404bac5eb139
BLAKE2b-256 1014f69de992e52a56e7b46a4e89f07aa52f7e81f43c5af1b9fdd36ef41e4dde

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