Trying to add Django Countries to Django

前端 未结 3 1380
终归单人心
终归单人心 2021-01-29 06:14

I am a newbie to django and I am trying to install django countries and am haveing issues. I Installed from http://pypi.python.org/pypi/django-countries/1.0.1. When I installe

3条回答
  •  渐次进展
    2021-01-29 06:43

    You can install django countries with this command:

    sudo pip install django-countries
    

    Then your INSTALLED_APPS should be updated like this:

    INSTALLED_APPS = (
        'django_admin_bootstrapped.bootstrap3',
        ...
        'django.contrib.staticfiles',
        ...
        'django_countries',
    )
    

    (note: no django. prefix, countries spelt correctly, underscore not dash)

    BTW I found this command useful when verifying package names:

    pip list
    

提交回复
热议问题