django_indian_cities
1.0.0
ถ้ามีบางอย่างปลั๊ก? และการเล่นที่สามารถนำเข้าได้และจะเติมเต็มเขตข้อมูลด้วยเมืองหรือรัฐของอินเดีย มันจะดีแค่ไหน
เพื่อนำเข้าเพียงเพิ่มบรรทัดนี้
from indian_cities.dj_city import cities
ทดสอบ
print(cities[0])
ตอนนี้ถ้าผลลัพธ์เป็นแบบนี้
('Andaman and Nicobar Islands', (('Port Blair', 'Port Blair'),))
แล้วยอดเยี่ยมมันได้ผล?
class myModel(models.Model):
city = models.CharField(choices=cities, null=False, max_length=20)
Python, Django ทุกรุ่น
เพื่อติดตั้งสิ่งนี้
PIP ติดตั้งเมืองอินเดีย
LinkedIn: https://www.linkedin.com/in/chayandatta/
GitHub: https://github.com/chayandatta
ทำด้วย❤และ?