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
-
Install the package:
pip install GeoBank
-
Add
geobankandmodeltranslationto yourINSTALLED_APPSinsettings.py. Note:modeltranslationmust be added beforedjango.contrib.admin.INSTALLED_APPS = [ 'modeltranslation', 'django.contrib.admin', # ... 'geobank', ]
-
Configure your languages in
settings.py:LANGUAGES = ( ('en', 'English'), ('fa', 'Persian'), # ... other languages )
-
Run migrations:
python manage.py migrate
-
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
Release history Release notifications | RSS feed
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
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file geobank-0.1.2.tar.gz.
File metadata
- Download URL: geobank-0.1.2.tar.gz
- Upload date:
- Size: 8.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
2f138380f586cc51513f54168cc4bc205ad1681b2a0a2c8d0d8708f799f78d31
|
|
| MD5 |
05408209a06cd4a9a6388e5f30accd3c
|
|
| BLAKE2b-256 |
482755662e1ac5a9ee06470b404bf4bd8c4a1cfc9e4ae18c3ba6d0008735b197
|
File details
Details for the file geobank-0.1.2-py3-none-any.whl.
File metadata
- Download URL: geobank-0.1.2-py3-none-any.whl
- Upload date:
- Size: 10.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cb6eefc04578b9e7dc898758120fd584e45634a1d6ac36e9021db6a5bef1c9c5
|
|
| MD5 |
61ecd5fbd65e5ec3d2ac3c9c854ae0a7
|
|
| BLAKE2b-256 |
718f833c7243c3b1373d03509a98f44dd9f29ff733cd15c7293fef26b67d7fab
|