Explorar el Código

mehrere tippfehler

Juan Carlos hace 4 años
padre
commit
6f5d6f5bee

+ 8 - 79
marktplatz/forms.py

@@ -310,6 +310,7 @@ class WohnprojektForm(ProductForm):
        self.fields['bauweise'].widget    = ListTextWidget(data_list=Wohnprojekt.BAUWEISE,  name='bauweise_list')
        self.fields['zielgruppen'].widget = ListTextWidget(data_list=Wohnprojekt.ZIELGRUPPEN,  name='zielgruppen_list')
        self.fields['gprojekte'].widget   = ListTextWidget(data_list=Wohnprojekt.GPROJEKTE,  name='gprojekte_list')
+       self.fields['freiraumangebote'].widget  = ListTextWidget(data_list=Wohnprojekt.FREIANGEBOT,  name='freiraumangebote_list')
        #
        #
        self.fields['bauweise'].help_text    = extend_help_text (self.fields['bauweise'].help_text, Wohnprojekt.BAUWEISE)
@@ -326,9 +327,13 @@ class WohnprojektForm(ProductForm):
        self.helper.layout = Layout(
             self.product_layout,
 
-           Fieldset(
-             'Wohnprojekt',
-             'eigentum',  'altneu', 'schwerpunkt', 'wohnbaufoerderung', 'artmodell', 'bautraeger',
+           Fieldset( 'Wohnprojekt',
+             'eigentum',
+             'artmodell',
+             'altneu',
+             'schwerpunkt',
+             'wohnbaufoerderung',
+             'bautraeger',
 
               Div(
                   Div('aerwachsene',  css_class='col-sm-6 col-6'),
@@ -368,28 +373,6 @@ class WohnprojektForm(ProductForm):
 
 
 
-
-
-
-
-
-# class FormsetHelper(FormHelper):
-#     def __init__(self,*args, **kwargs):
-#         super(FormsetHelper, self).__init__(*args, **kwargs)
-#         #self.form_method = 'post'
-#         self.form_tag = False
-#         #self.render_hidden_fields = True
-#         #self.render_required_fields = True
-#         self.layout = Layout(
-#             Fieldset(
-#                 (''),
-#                 Div(
-#                     Div('link_description', css_class='form-group col-md-4 mb-0'),
-#                     Div('link', css_class='form-group col-md-6 mb-0')
-#                     , css_class='form-row')
-#             ))
-
-
 class MediaForm(FileFormMixin, forms.Form):
     image = UploadedFileField()
     name_for = forms.CharField()
@@ -419,60 +402,6 @@ class MediaForm(FileFormMixin, forms.Form):
 
 
 
-# class MediaForm_test(FileFormMixin, forms.Form):
-#     image = UploadedFileField()
-#     name_for = CharField()
-#     copyright = CharField()
-#
-#     def __init__(self, *args, **kwargs):
-#         super(MediaForm_test, self).__init__(*args, **kwargs)
-#         self.helper = FormHelper()
-#         self.helper.form_tag = False
-
-
-# class MediaForm1(FileFormMixin, forms.Form):
-#     image = MultipleUploadedFileField()
-#     name_for = CharField()
-#     copyright = CharField()
-#
-#     def __init__(self, *args, **kwargs):
-#         super(MediaForm1, self).__init__(*args, **kwargs)
-#         self.helper = FormHelper()
-#         self.helper.form_tag = False
-#
-#
-# class MediaForm2(FileFormMixin,forms.Form):
-#     image = UploadedFileField()
-#     name_for = CharField()
-#     copyright = CharField()
-#
-#     def __init__(self, *args, **kwargs):
-#         super(MediaForm2, self).__init__(*args, **kwargs)
-#         self.helper = FormHelper()
-#         self.helper.form_tag = False
-
-
-# MediaFormSet = formset_factory(MediaForm_test, extra=3)
-#
-#
-# class MediaFormsetHelper(FormHelper):
-#
-#     def __init__(self,*args, **kwargs):
-#         super(MediaFormsetHelper, self).__init__(*args, **kwargs)
-#         self.form_tag = False
-#         self.layout = Layout(
-#             Fieldset(
-#                 (''),
-#                 Div(
-#                     Div('name_for', css_class='form-group col-md-6 mb-0'),
-#                     Div('copyright', css_class='form-group col-md-4 mb-0')
-#                     , css_class='form-row'),
-#                 Div(
-#                     Div('image', css_class='form-group col-md-6 mb-0'),
-#                     css_class='form-row'),
-#             ))
-
-
 class VideoForm(forms.ModelForm):
     class Meta:
         model = Video

+ 4 - 2
marktplatz/models.py

@@ -317,6 +317,8 @@ class Wohnprojekt(Product):
     FREIANGEBOT = [
         ('Dachterrasse', 'Dachterrasse'),
         ('Beete', 'Beete'),
+        ('Hochbeete', 'Hochbeete'),
+        ('Landwirtschaft', 'Landwirtschaft'),
         ('Kinderspielplatz', 'Kinderspielplatz'),
     ]
 
@@ -328,7 +330,7 @@ class Wohnprojekt(Product):
     altneu            = CharField    ( 'Altbau/Neubau',  max_length = 4, choices=ALTNEU, help_text="Wähle aus der Liste aus!", null = True, blank=False )
     schwerpunkt       = CharField    ( 'Inhaltlicher Schwerpunkt',   max_length = 1024,  help_text="Beispiel: Wir sind nicht nur eine Baugruppe sondern ein Kulturverein mit über 80 Veranstaltungen im Jahr. Darüberhinaus befindet sich bei uns eine Wohngemeinschaft für unbegleitete, minderjährige Geflüchtete.", null = True, blank=True )
     wohnbaufoerderung = CharField    ( 'Wohnbauförderung',    max_length = 256,   choices=WOHNBAUFOERDERUNG, help_text="Wähle aus der Liste aus!", null = True, blank=True )
-    artmodell         = TextField    ( 'Art der Modells',    max_length = 2048,   help_text="Klicke ins Feld, wähle aus der Liste aus, was am ehesten zutrifft und bearbeite den Text!", null = True, blank=True )
+    artmodell         = TextField    ( 'Art des Modells',    max_length = 2048,   help_text="Klicke ins Feld, wähle aus der Liste aus, was am ehesten zutrifft und bearbeite den Text!", null = True, blank=True )
     bautraeger        = TextField    ( 'Bauträger',    max_length = 1024, help_text="Klicke ins Feld, wähle aus der Liste aus!", null = True, blank=True )
     aerwachsene       = IntegerField ( 'Anzahl an Erwachsenen', help_text="Wenn du keine genauen Zahlen hast, gib eine Schätzung ab.", validators=[MinValueValidator(0), MaxValueValidator(9999)], default = 0, null = True, blank=False )
     akinder           = IntegerField ( 'Anzahl an Kinder', help_text="Wenn du keine genauen Zahlen hast, gib eine Schätzung ab.", validators=[MinValueValidator(0), MaxValueValidator(9999)], default = 0,  null = True, blank=False )
@@ -343,7 +345,7 @@ class Wohnprojekt(Product):
     @property
     def flaeche(self):
             return self.wohnflaeche + self.gewerbeflaechen + self.gemeinschaftsflaeche + self.sonstige_flaechen
-    kflaechen          = CharField         ( 'Flächen - Kommentar', max_length = 2048, help_text="Hier kannst du genauere Angaben machen. Beispiel: Unsere Gewerbefläche besteht aus einem Coworking-Raum.", null = True, blank=True )
+    kflaechen          = CharField         ( 'Weitere Flächen', max_length = 2048, help_text="Hier kannst du genauere Angaben machen. Beispiel: Unsere Gewerbefläche besteht aus einem Coworking-Raum.", null = True, blank=True )
     gemeinschaftr      = MultiSelectField  ( 'Gemeinschaftsräume',    max_length = 1024,   choices=GEMEINSCHAFTR, help_text="Mehrfachnennungen sind möglich.", null = True, blank=True )
     kgemeinschaftr     = CharField         ( 'Gemeinschaftsräume - Sonstiges', max_length = 2048, help_text="Gibt es noch andere/weitere Gemeinschaftsräume, die nicht in der Liste stehen?", null = True, blank=True )
     raumangebot        = MultiSelectField  ( 'Raumangebot nach Außen',    max_length = 1024,   choices=RAUMANGEBOT, help_text="Mehrfachnennungen sind möglich.", null = True, blank=True )

+ 1 - 0
marktplatz/static/css/styles.css

@@ -208,6 +208,7 @@ img.vote {
 .division-color{
 
 border-bottom: 1px solid #469CA8;
+border-top: 0px solid #469CA8;
 margin-right: -15px;
 margin-left: -15px;
 margin-top: 0;

+ 13 - 8
marktplatz/templates/marktplatz/product_detail.html

@@ -87,7 +87,7 @@
 					      <small class="text-muted">{% if product.year %} {{ product.year }}, {% endif %}  {% for country in product.country %} {{ country.name }}, {% endfor %} {% if product.city %} {{ product.city }} {% endif %}</small>
 					</h1>
 
-					<p class="lead kur"> {{ product.claim }}</p>
+					<p class="lead kur">{% if product.claim %}{{ product.claim }}{% endif %}</p>
 
 					<div class="row product-color">
 						<div class="col-sm-4">{% include "marktplatz/modal-share.html" %}</div>
@@ -143,7 +143,7 @@
 					</div>
 
 
-					<p class="">{% if product.beschreibung %}<strong>{% field_name product.wohnprojekt 'beschreibung' %}</strong>:<br>{{ product.beschreibung }}{% endif %}</p>
+					<p class="">{% if product.beschreibung %}<strong>{% field_name product.wohnprojekt 'beschreibung' %}</strong>:<br>{{ product.beschreibung | safe }}{% endif %}</p>
 					<p class="">{% if product.learning %}<strong>{% field_name product.wohnprojekt 'learning' %}</strong>:<br>{{ product.learning }}{% endif %}</p>
 
 
@@ -205,12 +205,12 @@
 					<p>{% if product.wohnprojekt.eigentum  %}<strong>{% field_name product.wohnprojekt 'eigentum' %}</strong>: {{ product.wohnprojekt.get_eigentum_display }}{% endif %}</p>
 					<p><strong>Gemeinschaftliche Projekte</strong>: {{ product.wohnprojekt.gprojekte }}</p>
 					<p><strong>Gemeinschaftsräume</strong>: {{ product.wohnprojekt.gemeinschaftr }}
-						{% if product.wohnprojekt.kgemeinschaftr  %} - {{ product.wohnprojekt.kgemeinschaftr }}{% endif %}
+						{% if product.wohnprojekt.kgemeinschaftr  %}, {{ product.wohnprojekt.kgemeinschaftr }}{% endif %}
 					</p>
 
 					<p>{% if product.wohnprojekt.sonderwohnformen  %}<strong>{% field_name product.wohnprojekt 'sonderwohnformen' %}</strong>: {{ product.wohnprojekt.sonderwohnformen }}{% endif %}</p>
-					<p><strong>Besondere Zielgruppen</strong>: {{ product.wohnprojekt.zielgruppen }}</p>
-					<p><strong>Freiraumangebote</strong>: {{ product.wohnprojekt.freiraumangebote }}</p>
+					<p>{% if product.wohnprojekt.zielgruppen  %}<strong>Besondere Zielgruppen</strong>: {{ product.wohnprojekt.zielgruppen }}{% endif %}</p>
+					<p>{% if product.wohnprojekt.freiraumangebote  %}<strong>Freiraumangebote</strong>: {{ product.wohnprojekt.freiraumangebote }}{% endif %}</p>
 					<p>{% if product.wohnprojekt.oekologie  %}<strong>{% field_name product.wohnprojekt 'oekologie' %}</strong>: {{ product.wohnprojekt.oekologie }}{% endif %}</p>
 					<p>{% if product.wohnprojekt.schwerpunkt  %}<strong>{% field_name product.wohnprojekt 'schwerpunkt' %}</strong>: {{ product.wohnprojekt.schwerpunkt }}{% endif %}</p>
 
@@ -223,7 +223,7 @@
 					<p><strong>Bautr&auml;ger</strong>: {{ product.wohnprojekt.bautraeger }}</p>
 					<p>{% if product.wohnprojekt.wohnbaufoerderung  %}<strong>{% field_name product.wohnprojekt 'wohnbaufoerderung' %}:</strong>  {{ product.wohnprojekt.wohnbaufoerderung }}{% endif %}</p>
 					<p>im Haus Wohnen ca {{ product.wohnprojekt.aerwachsene }} Erwachsene und {{  product.wohnprojekt.akinder }} Kinder.
-						Anzahl an Mitglieder: {{ product.wohnprojekt.amitglieder }}
+						Anzahl der Mitglieder: {{ product.wohnprojekt.amitglieder }}
 					</p>
 					<p>{% if product.wohnprojekt.awohnungen  %}<strong>{% field_name product.wohnprojekt 'awohnungen' %}:</strong>  {{  product.wohnprojekt.awohnungen  }} Wohnungen{% endif %}</p>
 					<p>{% if product.wohnprojekt.gaestwohnungen  %}<strong>{% field_name product.wohnprojekt 'gaestwohnungen' %}:</strong>  {{ product.wohnprojekt.gaestwohnungen }}{% endif %}</p>
@@ -234,8 +234,13 @@
 			    <p>{% if product.wohnprojekt.flaeche  %}<strong>Fläche:</strong>  {{ product.wohnprojekt.flaeche }} m<sup>2</sup>{% endif %}</p>
 					<p>{% if product.wohnprojekt.kflaechen  %}<strong>{% field_name product.wohnprojekt 'kflaechen' %}:</strong>  {{ product.wohnprojekt.kflaechen }} m<sup>2</sup>{% endif %}</p>
 					<p>Im Haus arbeiten ca {{ product.wohnprojekt.parbeiten }} Personen {% if product.wohnprojekt.karbeiten  %}{{ product.wohnprojekt.karbeiten }}{% endif %}</p>
-					<p>{% if product.wohnprojekt.raumangebot  %}<strong>{% field_name product.wohnprojekt 'raumangebot' %}:</strong>  {{ product.wohnprojekt.raumangebot }}{% endif %}</p>
-			    <p>{% if product.wohnprojekt.kraumangebot  %}<strong>{% field_name product.wohnprojekt 'kraumangebot' %}:</strong>  {{ product.wohnprojekt.kraumangebot }}{% endif %}</p>
+					<p>{% if product.wohnprojekt.raumangebot  %}<strong>{% field_name product.wohnprojekt 'raumangebot' %}:</strong>  {{ product.wohnprojekt.raumangebot }}{% if product.wohnprojekt.kraumangebot  %},
+						{{ product.wohnprojekt.kraumangebot }}
+						{% endif %}
+
+					{% endif %}</p>
+
+			    <!-- <p>{% if product.wohnprojekt.kraumangebot  %}<strong>{% field_name product.wohnprojekt 'kraumangebot' %}:</strong>  {{ product.wohnprojekt.kraumangebot }}{% endif %}</p> -->
 
 
 					<br />

+ 3 - 1
marktplatz/templates/marktplatz/product_overview.html

@@ -299,7 +299,7 @@ $(document).ready(function(){
       <button class="border-thin mybtn btn-toggle {{elem.0}}" data-toggler='{{elem.0}}' style="margin-bottom: 2px; ">#{{elem.1}}</button>
       {% endfor %}
 
-      <button class="border-thin mybtn btn-toggle begleitet_true" data-toggler='begleitet_true' style="margin-bottom: 2px; " style="">#Begleitet von RealityLab</button>
+      <button class="border-thin mybtn btn-toggle begleitet_true" data-toggler='begleitet_true' style="margin-bottom: 2px; " style="">#Begleitet von realitylab</button>
       <button class="border-thin mybtn btn-toggle urbanem_true" data-toggler='urbanem_true' style="margin-bottom: 2px; " style="">#Urbane Mischung</button>
       <button class="border-thin mybtn " style="margin-bottom: 2px; ">{% include "marktplatz/modal-sa.html" %}</button>
 
@@ -357,6 +357,8 @@ $(document).ready(function(){
 
   {{main_card|safe}}
 
+  <hr class="division-color" style="margin: 35px 0px 35px 0px">
+
   {% for product in wohnprojekt_list %}
 
     <!-- rounded-0 border-0 -->

+ 1 - 1
project_base/templates/footer.html

@@ -19,7 +19,7 @@
       <span class="float-right" >
       </span>
       <span class="float-right" >
-          &copy; {% now 'Y' %} RealityLab GmbH. Alle Rechte vorbehalten | Development: <a title="co++" href="https://co-plus-plus.eu/" target="_blank" rel="noopener"><img src="{% static 'copp_logo_cut_bw_sm.png' %}" alt="co++" style="max-width: 40px; "  /></a> & Lotti Tscherteu
+          &copy; {% now 'Y' %} realitylab GmbH. Alle Rechte vorbehalten | Development: <a title="co++" href="https://co-plus-plus.eu/" target="_blank" rel="noopener"><img src="{% static 'copp_logo_cut_bw_sm.png' %}" alt="co++" style="max-width: 40px; "  /></a> & Lotti Tscherteu
       </span>
 
     </div>