Tagging using JS using Partials
This commit is contained in:
		@@ -13,6 +13,8 @@ from lostplaces_app.models import Place, PlaceImage
 | 
			
		||||
from lostplaces_app.views import IsAuthenticated, IsPlaceSubmitter
 | 
			
		||||
from lostplaces_app.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm
 | 
			
		||||
 | 
			
		||||
from taggit.models import Tag
 | 
			
		||||
 | 
			
		||||
class PlaceListView(IsAuthenticated, ListView):
 | 
			
		||||
    paginate_by = 5
 | 
			
		||||
    model = Place
 | 
			
		||||
@@ -31,7 +33,8 @@ class PlaceDetailView(IsAuthenticated, View):
 | 
			
		||||
            'place': place,
 | 
			
		||||
            'place_list': [ place ],
 | 
			
		||||
            'place_map_center': [ place.latitude, place.longitude ],
 | 
			
		||||
			'tagging_form': TagSubmitForm()
 | 
			
		||||
            'tagging_form': TagSubmitForm(),
 | 
			
		||||
            'all_tags': Tag.objects.all()
 | 
			
		||||
        }
 | 
			
		||||
        return render(request, 'place/place_detail.html', context)
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user