# Path: api/models/events.py
# class EventTheme(models.Model):
#     name = models.CharField(max_length=255)
#     order = models.IntegerField(default=0)
# 
#     def __unicode__(self):
#         return self.name
# 
#     class Meta:
#         app_label = 'api'
#         ordering = ['order', 'name']
# 
# class EventAudience(models.Model):
#     name = models.CharField(max_length=255)
# 
#     def __unicode__(self):
#         return self.name
# 
#     class Meta:
#         app_label = 'api'


from django import forms
from django_countries.fields import countries
from api.models import Event
from api.models.events import EventTheme, EventAudience
        choices=(('yes', 'yes'), ('no', 'no')),
        widget=forms.RadioSelect(attrs={'class': 'search-form-element'}),
    )
    country = forms.ChoiceField(
        label='Select country',
        required=False,
        widget=forms.Select(attrs={'class': 'search-form-element'}),
        choices=countries
    )
    theme = forms.ModelMultipleChoiceField(
        queryset=EventTheme.objects.all(),
        label='Theme',
        required=False,
        widget=forms.CheckboxSelectMultiple(
            attrs={
                'class': 'search-form-element'}),
    )
    audience = forms.ModelMultipleChoiceField(
        queryset=EventAudience.objects.all(),
        label='Audience',
        required=False,
        widget=forms.CheckboxSelectMultiple(
            attrs={
                'class': 'search-form-element'}),
    )

    def __init__(self, *args, **kwargs):
        country_code = kwargs.pop('country_code', None)
        past_events = kwargs.pop('past_events')
        search_query = kwargs.pop('search', None)

# Path: api/models/events.py
# class EventTheme(models.Model):
#     name = models.CharField(max_length=255)
#     order = models.IntegerField(default=0)
# 
#     def __unicode__(self):
#         return self.name
# 
#     class Meta:
#         app_label = 'api'
#         ordering = ['order', 'name']
# 
# class EventAudience(models.Model):
#     name = models.CharField(max_length=255)
# 
#     def __unicode__(self):
#         return self.name
# 
#     class Meta:
#         app_label = 'api'


# Path: web/forms/event_form.py
from django import forms
from django_countries.fields import countries
from api.models import Event
from api.models.events import EventTheme, EventAudience

        choices=(('yes', 'yes'), ('no', 'no')),
        widget=forms.RadioSelect(attrs={'class': 'search-form-element'}),
    )
    country = forms.ChoiceField(
        label='Select country',
        required=False,
        widget=forms.Select(attrs={'class': 'search-form-element'}),
        choices=countries
    )
    theme = forms.ModelMultipleChoiceField(
        queryset=EventTheme.objects.all(),
        label='Theme',
        required=False,
        widget=forms.CheckboxSelectMultiple(
            attrs={
                'class': 'search-form-element'}),
    )
    audience = forms.ModelMultipleChoiceField(
        queryset=EventAudience.objects.all(),
        label='Audience',
        required=False,
        widget=forms.CheckboxSelectMultiple(
            attrs={
                'class': 'search-form-element'}),
    )

    def __init__(self, *args, **kwargs):
        country_code = kwargs.pop('country_code', None)
        past_events = kwargs.pop('past_events')
        search_query = kwargs.pop('search', None)

        theme = kwargs.pop('theme', None)