FAQ Database Discussion Community

How to add capital to django-cities-light country model?

I'm using django-cities-light (lighter version of django-cities) with Django 1.8.x. It defines the abstract models of Country, Region/State and City, so that we can extend and add custom fields. For example, we can add timezone to city by writing a post_import signal handler as explained here. Likewise I need to...

django_countries does not display in the form on template

I used {{ form }} as seen here template.html <h4>Change your details</h4><br> <form id="edit_form" method='post'> {% csrf_token %} {{ form }} <div class='section group'> <input id="update_details_button" type='submit' class='btn btn-primary wide' value='Change'/> </div> </form> views.py def user_view(request, is_admin): user = request.user form = myForm() if request.method == 'POST' and is_admin: form...