# 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
    if not 'Kosovo' in list(dict(countries._countries).values()):
        countries._countries.append((u'XK', u'Kosovo'))

    q = forms.CharField(
        required=False,
        widget=forms.TextInput(
            attrs={
                'placeholder': 'Search for event name or tag',
                'class': 'form-control'}))
    past = forms.ChoiceField(
        label='Include past events',
        required=False,
        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(

# 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

    if not 'Kosovo' in list(dict(countries._countries).values()):
        countries._countries.append((u'XK', u'Kosovo'))

    q = forms.CharField(
        required=False,
        widget=forms.TextInput(
            attrs={
                'placeholder': 'Search for event name or tag',
                'class': 'form-control'}))
    past = forms.ChoiceField(
        label='Include past events',
        required=False,
        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(),