Iranian cities support for Django
Project description
Django Iranian Cities
The django-iranian-cities is a valuable package based on Django Web Framework for Iranian cities support. You can see full documentation here readthedocs.
Project Detail
- Language: Python > 3.6
- Framework: Django > 3.1
Getting Started
First you have to install package using pip:
$ pip install django-iranian-cities
Then you should add iranian_cities
to INSTALLED_APPS:
INSTALLED_APPS = [
...
'iranian_cities',
...
]
Now you can migrate to apply model changes:
$ python manage.py migrate
For generating all data you can run this command:
$ python manage.py generate_city
NOTE: you should run this command once (if you want to run again flush db or delete all objects in iranian_cities app)
Usage
You can use field like this:
from django.db import models
from iranian_cities.fields import OstanField
class TestModel(models.Model):
ostan = OstanField()
list of fields:
- OstanField
- ShahrestanField
- BakhshField
- ShahrField
- DehestanField
- AbadiField
Admin
You can also use admin mixin class:
from django.contrib import admin
from iranian_cities.admin import IranianCitiesAdmin
from test_app.models import TestModel
@admin.register(TestModel)
class TestModelAdmin(IranianCitiesAdmin):
pass
Git Rules
S.A.G.E. team Git Rules Policy is available here:
Team
Sepehr Akbarazadeh Maintainer | Mehran Rahmanzadeh Maintainer |
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
File details
Details for the file django-iranian-cities-1.0.2.tar.gz
.
File metadata
- Download URL: django-iranian-cities-1.0.2.tar.gz
- Upload date:
- Size: 1.8 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.4.1 importlib_metadata/4.6.1 pkginfo/1.5.0.1 requests/2.21.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9016f1fedc996372505af55e253d6aba63f95fb8143d5aba4f95a7e986ec4090 |
|
MD5 | 2c618605201dc7c465e4130a0d3cd2ef |
|
BLAKE2b-256 | 2a4b31727bb3783184bc833bc2a9cd0ee55489c3d72c21033f6b1d0d89a69c23 |