Replaced own country selection with django-countries package.
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user