Refactoring tagging
This commit is contained in:
		@@ -33,11 +33,11 @@ class PlaceDetailView(IsAuthenticated, View):
 | 
			
		||||
            'place': place,
 | 
			
		||||
            'place_list': [ place ],
 | 
			
		||||
            'place_map_center': [ place.latitude, place.longitude ],
 | 
			
		||||
            'all_tags': Tag.objects.all(),
 | 
			
		||||
            'tagging_config': {
 | 
			
		||||
                'submit_url': reverse_lazy('place_tag_submit', kwargs={'place_id': place.id}),
 | 
			
		||||
                'all_tags': Tag.objects.all(),
 | 
			
		||||
                'submit_form': TagSubmitForm(),
 | 
			
		||||
                'tagged_item': place,
 | 
			
		||||
                'submit_url_name': 'place_tag_submit',
 | 
			
		||||
                'delete_url_name': 'place_tag_delete'
 | 
			
		||||
            }
 | 
			
		||||
        }
 | 
			
		||||
 
 | 
			
		||||
@@ -54,8 +54,8 @@ class PhotoAlbumDeleteView(PlaceAssetDeleteView):
 | 
			
		||||
    permission_denied_messsage = 'You do not have permissions to alter this photo album'
 | 
			
		||||
 | 
			
		||||
class PlaceTagSubmitView(IsAuthenticated, View):
 | 
			
		||||
	def post(self, request, place_id, *args, **kwargs):
 | 
			
		||||
		place = Place.objects.get(pk=place_id)
 | 
			
		||||
	def post(self, request, tagged_id, *args, **kwargs):
 | 
			
		||||
		place = Place.objects.get(pk=tagged_id)
 | 
			
		||||
		form = TagSubmitForm(request.POST)
 | 
			
		||||
		if form.is_valid():
 | 
			
		||||
			tag_list_raw = form.cleaned_data['tag_list']
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user