Compare commits
No commits in common. "44b06d1c04020aa01575a2a5c25711af410e9608" and "240b61f428d57c1c56dec85f4d20cd6673a08760" have entirely different histories.
44b06d1c04
...
240b61f428
@ -11,10 +11,7 @@ class ExplorerCreationForm(UserCreationForm):
|
|||||||
class Meta:
|
class Meta:
|
||||||
model = Explorer
|
model = Explorer
|
||||||
fields = ('username', 'email')
|
fields = ('username', 'email')
|
||||||
voucher = forms.CharField(
|
voucher = forms.CharField(max_length=10, help_text='The Voucher you got from an administrator')
|
||||||
max_length=30,
|
|
||||||
help_text='The Voucher you got from an administrator'
|
|
||||||
)
|
|
||||||
|
|
||||||
def is_valid(self):
|
def is_valid(self):
|
||||||
super().is_valid()
|
super().is_valid()
|
||||||
@ -52,9 +49,10 @@ class PlaceImageCreateForm(forms.ModelForm):
|
|||||||
|
|
||||||
self.fields['filename'].required = False
|
self.fields['filename'].required = False
|
||||||
|
|
||||||
|
|
||||||
class TagSubmitForm(forms.Form):
|
class TagSubmitForm(forms.Form):
|
||||||
tag_list = forms.CharField(
|
tag_list = forms.CharField(
|
||||||
max_length=500,
|
max_length=500,
|
||||||
required=False,
|
required=False,
|
||||||
widget=forms.TextInput(attrs={'autocomplete':'off'})
|
widget=forms.TextInput(attrs={'autocomplete':'off'})
|
||||||
)
|
)
|
@ -26,7 +26,7 @@ urlpatterns = [
|
|||||||
path('place/', PlaceListView.as_view(), name='place_list'),
|
path('place/', PlaceListView.as_view(), name='place_list'),
|
||||||
path('flat/<slug:slug>/', FlatView, name='flatpage'),
|
path('flat/<slug:slug>/', FlatView, name='flatpage'),
|
||||||
|
|
||||||
# POST-only URLs for tag submission
|
# POST-only URL for tag submission
|
||||||
path('place/tag/<int:place_id>', PlaceTagSubmitView.as_view(), name='place_tag_submit'),
|
path('place/tag/<int:place_id>', PlaceTagSubmitView.as_view(), name='place_tag_submit'),
|
||||||
path('place/tag/delete/<int:tagged_id>/<int:tag_id>', PlaceTagDeleteView.as_view(), name='place_tag_delete')
|
path('place/tag/delete/<int:tagged_id>/<int:tag_id>', PlaceTagDeleteView.as_view(), name='place_tag_delete')
|
||||||
]
|
]
|
||||||
|
@ -95,4 +95,4 @@ class PlaceAssetDeleteView(IsAuthenticated, IsPlaceSubmitter, SingleObjectMixin,
|
|||||||
place_id = self.get_object().place.id
|
place_id = self.get_object().place.id
|
||||||
self.get_object().delete()
|
self.get_object().delete()
|
||||||
messages.success(self.request, self.success_message)
|
messages.success(self.request, self.success_message)
|
||||||
return redirect(reverse_lazy('place_detail', kwargs={'pk': place_id}))
|
return redirect(reverse_lazy('place_detail', kwargs={'pk': place_id}))
|
Loading…
Reference in New Issue
Block a user