added compass direction finding
This commit is contained in:
+14
-2
@@ -1,8 +1,20 @@
|
||||
from django import forms
|
||||
from .models import Member
|
||||
from .models import Member, UserSettings
|
||||
|
||||
class MemberForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = Member
|
||||
fields = ["first_name", "last_name", "phone"]
|
||||
|
||||
|
||||
|
||||
|
||||
class UserSettingsForm(forms.ModelForm):
|
||||
class Meta:
|
||||
model = UserSettings
|
||||
fields = ["ntfy_url", "ntfy_enabled"]
|
||||
widgets = {
|
||||
"ntfy_url": forms.URLInput(attrs={"id": "ntfy-url", "placeholder": "https://ntfy.example.com/my-topic"}),
|
||||
}
|
||||
|
||||
def clean_ntfy_url(self):
|
||||
return self.cleaned_data["ntfy_url"].strip()
|
||||
|
||||
Reference in New Issue
Block a user