|
@@ -219,43 +219,6 @@ class DetailView(generic.DetailView):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
-class VoteView(LoginRequiredMixin, generic.ListView):
|
|
|
|
|
- model = Product
|
|
|
|
|
- template_name='marktplatz/voteDetail.html'
|
|
|
|
|
-
|
|
|
|
|
- def get_context_data(self, **kwargs):
|
|
|
|
|
- context = super().get_context_data(**kwargs)
|
|
|
|
|
- context['user'] = User.objects.filter(groups__name='JuryMembers')
|
|
|
|
|
-
|
|
|
|
|
- return context
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
-class CidView(LoginRequiredMixin, generic.ListView):
|
|
|
|
|
- model = Product
|
|
|
|
|
- template_name='marktplatz/votes_cid.html'
|
|
|
|
|
-
|
|
|
|
|
- def get_context_data(self, **kwargs):
|
|
|
|
|
- context = super().get_context_data(**kwargs)
|
|
|
|
|
-
|
|
|
|
|
- return context
|
|
|
|
|
-
|
|
|
|
|
- def post(self, request, *args, **kwargs):
|
|
|
|
|
-
|
|
|
|
|
-
|
|
|
|
|
- for pk in request.POST.dict():
|
|
|
|
|
-
|
|
|
|
|
- if not 'csrfmiddlewaretoken' in pk:
|
|
|
|
|
- if request.POST[pk] != '' and ('cid' in pk):
|
|
|
|
|
- now_product = Product.objects.get(pk=pk.split('.')[0])
|
|
|
|
|
- now_product.class_cid = request.POST[pk]
|
|
|
|
|
- now_product.save()
|
|
|
|
|
-
|
|
|
|
|
- if request.POST[pk] != '' and ('sub' in pk):
|
|
|
|
|
- now_product = Product.objects.get(pk=pk.split('.')[0])
|
|
|
|
|
- now_product.sumbitted = request.POST[pk]
|
|
|
|
|
- now_product.save()
|
|
|
|
|
-
|
|
|
|
|
- return HttpResponseRedirect('')
|
|
|
|
|
|
|
|
|
|
class AdminView(LoginRequiredMixin, generic.ListView):
|
|
class AdminView(LoginRequiredMixin, generic.ListView):
|
|
|
model = Product
|
|
model = Product
|
|
@@ -602,18 +565,7 @@ class uploadView(LoginRequiredMixin, FormView):
|
|
|
handle_upload = FileFormUploader()
|
|
handle_upload = FileFormUploader()
|
|
|
|
|
|
|
|
|
|
|
|
|
-# class EditView(UpdateView):
|
|
|
|
|
-#
|
|
|
|
|
-# model = Wohnprojekt
|
|
|
|
|
-# fields = [
|
|
|
|
|
-# # 'title','country','city','year','owner','teaser_txt','header','category', 'description_txt',
|
|
|
|
|
-# 'terms', 'product',
|
|
|
|
|
-# 'name','claim','beschreibung','learning','gruendungsjahr','betriebgenommen','status','adresse','website','email','frei','kfrei', 'mitmachen','rechtsform','ort','orga',
|
|
|
|
|
-# 'eigentum', 'inseratstext', 'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger', 'aerwachsene', 'akinder', 'awohnungen', 'wohnflaeche', 'gewerbeflaechen', 'gemeinschaftsflaeche', 'sonstige_flaechen', 'kflaechen', 'gemeinschaftr', 'kgemeinschaftr', 'sonderwohnformen', 'raumangebot', 'kraumangebot', 'parbeiten', 'karbeiten', 'bauweise', 'zielgruppen', 'gprojekte', 'oekologie', 'freiraumangebote', 'gaestwohnungen',
|
|
|
|
|
-# ]
|
|
|
|
|
-# # exclude = ['']
|
|
|
|
|
-# # form_class = SubmissionForm
|
|
|
|
|
-# template_name = 'marktplatz/add.html'
|
|
|
|
|
|
|
+
|
|
|
|
|
|
|
|
class EditView(FormView):
|
|
class EditView(FormView):
|
|
|
|
|
|