Commit 82330982 authored by Jean Jacques's avatar Jean Jacques

Add Serbia as an available countrie

parent ffb7b60a
from config.settings import EU_COUNTRIES
from config.settings import AVAILABLE_COUNTRIES
from django.core.management.base import BaseCommand, CommandError
from django_countries import countries
......@@ -18,7 +18,7 @@ class Command(BaseCommand):
if dry_run:
self.stdout.write(self.style.WARNING('Dry run mode, will only output diff'))
for country_code in EU_COUNTRIES:
for country_code in AVAILABLE_COUNTRIES:
self.setup(country_code, dry_run)
def setup(self, country_code, dry_run=False):
......
from config.settings import EU_COUNTRIES
from config.settings import AVAILABLE_COUNTRIES
from django.db import migrations
from django_countries import countries
......@@ -6,7 +6,7 @@ from django.contrib.auth.models import Group
from administration.models import VolunteerGroup
def apply_migration(apps, schema_editor):
for country_code in EU_COUNTRIES:
for country_code in AVAILABLE_COUNTRIES:
group, _ = Group.objects.get_or_create(name="Volunteers (%s)" % countries.name(country_code))
volunteer_group, _ = VolunteerGroup.objects.get_or_create(group=group, country=country_code)
......
......@@ -253,7 +253,7 @@ IMPORT_EXPORT_USE_TRANSACTIONS = True
# Application specific configuration
LOGIN_URL = '/admin/login'
EU_COUNTRIES = [
AVAILABLE_COUNTRIES = [
'AT',
'BE',
'BG',
......@@ -282,6 +282,7 @@ EU_COUNTRIES = [
'PL',
'PT',
'RO',
'RS',
'SE',
'SI',
'SK']
......
from config.settings import EU_COUNTRIES
from config.settings import AVAILABLE_COUNTRIES
from django import forms
from i18naddress import InvalidAddress, normalize_address, format_address, get_validation_rules
from django.utils.translation import gettext_lazy as _
......@@ -30,7 +30,7 @@ class OrganizationAdminForm(forms.ModelForm):
self.fields['street_address'].widget.attrs['rows'] = 3
self.fields['activate'].initial = self.instance.activated_at is not None
self.available_countries = EU_COUNTRIES
self.available_countries = AVAILABLE_COUNTRIES
if self.current_user and not self.current_user.is_superuser:
self.available_countries = get_volunteer_countries(
......
from config.settings import EU_COUNTRIES
from config.settings import AVAILABLE_COUNTRIES
from django.db import models
from django.db.models.signals import pre_save
from django.dispatch import receiver
......@@ -22,7 +22,7 @@ except ImportError:
class EUCountries(Countries):
only = [
('all', _('All available countries'))
] + EU_COUNTRIES
] + AVAILABLE_COUNTRIES
IDENTIFIERS = {
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment