Replaced own country selection with django-countries package.

This commit is contained in:
2018-01-20 15:23:58 +01:00
parent 092ded8cd4
commit 8bb1733427
5 changed files with 16 additions and 14 deletions

View File

@@ -6,6 +6,7 @@ from django.db import models
from django.template.loader import get_template
from django.utils import timezone
from django.utils.translation import get_language, ugettext_lazy as _
from django_countries.fields import CountryField
from . import choices
from . import config
@@ -59,8 +60,7 @@ class Event(models.Model):
course_goal_6 = models.TextField(blank=True)
# LocationForm
country = models.CharField(max_length=CHOICE_FIELD_MAX_LENGTH,
choices=choices.COUNTRY_CHOICES)
country = CountryField()
terrain = models.CharField(max_length=CHOICE_FIELD_MAX_LENGTH,
choices=choices.TERRAIN_CHOICES)
location = models.CharField(max_length=config.LOCATION_MAX_LENGTH)