core: cleanup provider select

This commit is contained in:
Jens Langhammer 2018-12-09 23:05:55 +01:00
parent 04205cd19a
commit dae5fc6265
No known key found for this signature in database
GPG key ID: BEBC05297D92821B
2 changed files with 7 additions and 5 deletions

View file

@ -14,12 +14,12 @@
<li class="{% is_active 'passbook_admin:sources' 'passbook_admin:source-create' 'passbook_admin:source-update' 'passbook_admin:source-delete' %}"> <li class="{% is_active 'passbook_admin:sources' 'passbook_admin:source-create' 'passbook_admin:source-update' 'passbook_admin:source-delete' %}">
<a href="{% url 'passbook_admin:sources' %}">{% trans 'Sources' %}</a> <a href="{% url 'passbook_admin:sources' %}">{% trans 'Sources' %}</a>
</li> </li>
<li class="{% is_active 'passbook_admin:rules' 'passbook_admin:rule-create' 'passbook_admin:rule-update' 'passbook_admin:rule-delete' 'passbook_admin:rule-test' %}">
<a href="{% url 'passbook_admin:rules' %}">{% trans 'Rules' %}</a>
</li>
<li class="{% is_active 'passbook_admin:providers' 'passbook_admin:provider-create' 'passbook_admin:provider-update' 'passbook_admin:provider-delete' %}"> <li class="{% is_active 'passbook_admin:providers' 'passbook_admin:provider-create' 'passbook_admin:provider-update' 'passbook_admin:provider-delete' %}">
<a href="{% url 'passbook_admin:providers' %}">{% trans 'Providers' %}</a> <a href="{% url 'passbook_admin:providers' %}">{% trans 'Providers' %}</a>
</li> </li>
<li class="{% is_active 'passbook_admin:rules' 'passbook_admin:rule-create' 'passbook_admin:rule-update' 'passbook_admin:rule-delete' 'passbook_admin:rule-test' %}">
<a href="{% url 'passbook_admin:rules' %}">{% trans 'Rules' %}</a>
</li>
<li> <li>
<a href="#">{% trans 'Users' %}</a> <a href="#">{% trans 'Users' %}</a>
</li> </li>

View file

@ -1,12 +1,14 @@
"""passbook Core Application forms""" """passbook Core Application forms"""
from django import forms from django import forms
from passbook.core.models import Application from passbook.core.models import Application, Provider
class ApplicationForm(forms.ModelForm): class ApplicationForm(forms.ModelForm):
"""Application Form""" """Application Form"""
provider = forms.ModelChoiceField(queryset=Provider.objects.all().select_subclasses())
class Meta: class Meta:
model = Application model = Application