Compare commits
3 Commits
b0316dc797
...
2aef677abd
Author | SHA1 | Date |
---|---|---|
Sebastian Lohff | 2aef677abd | |
Sebastian Lohff | 89eb979de3 | |
Sebastian Lohff | 9faf9c9ce0 |
|
@ -1,7 +1,10 @@
|
||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
from .models import Frequency, Band, Reference, QSO, User, Contest, ShadowCall, EntryCategory
|
from .models import Frequency, Band, Reference, QSO, User, Contest, ShadowCall, EntryCategory
|
||||||
|
|
||||||
admin.site.register(User)
|
|
||||||
|
class UserAdmin(admin.ModelAdmin):
|
||||||
|
list_display = ('username', 'dncall', 'qrv2m', 'qrv70cm', 'extra2m70cm')
|
||||||
|
admin.site.register(User, UserAdmin)
|
||||||
admin.site.register(QSO)
|
admin.site.register(QSO)
|
||||||
admin.site.register(Band)
|
admin.site.register(Band)
|
||||||
admin.site.register(Frequency)
|
admin.site.register(Frequency)
|
||||||
|
|
|
@ -12,9 +12,10 @@ from .validators import CallUsernameValidator, CallLogValidator
|
||||||
class CustomUserCreationForm(UserCreationForm):
|
class CustomUserCreationForm(UserCreationForm):
|
||||||
class Meta:
|
class Meta:
|
||||||
model = User
|
model = User
|
||||||
fields = ("username", "dncall", "qrv2m", "qrv70cm", "extra2m70cm")
|
fields = ("username", "email", "dncall", "qrv2m", "qrv70cm", "extra2m70cm")
|
||||||
|
|
||||||
username = forms.CharField(max_length=50, validators=[CallUsernameValidator()])
|
username = forms.CharField(max_length=50, validators=[CallUsernameValidator()])
|
||||||
|
email = forms.EmailField(required=True)
|
||||||
|
|
||||||
class UpdateRefForm(forms.Form):
|
class UpdateRefForm(forms.Form):
|
||||||
existingRef = forms.ModelChoiceField(label="Existing Exchange", queryset=Reference.objects.all(), help_text="If exchange already exists, select it here.", required=False)
|
existingRef = forms.ModelChoiceField(label="Existing Exchange", queryset=Reference.objects.all(), help_text="If exchange already exists, select it here.", required=False)
|
||||||
|
|
|
@ -0,0 +1,2 @@
|
||||||
|
Django==1.10
|
||||||
|
django-crispy-forms
|
Loading…
Reference in New Issue