Commit d1d83a07 authored by EL HASSANE GARGEM's avatar EL HASSANE GARGEM
Browse files

remove subject and edit template

parent d25173a3
......@@ -58,5 +58,5 @@ class ContactUsForm(BootstrapFormMixin, forms.ModelForm):
class Meta:
model = ContactUs
fields = ('name','subject','email','message')
fields = ('name','email','message')
......@@ -139,7 +139,6 @@ class ContactUs(models.Model):
Represents Contact Us form
"""
name = models.CharField(max_length=255)
subject = models.CharField(max_length=255)
email = models.EmailField(
verbose_name=_('email address'),
max_length=255,
......@@ -160,7 +159,6 @@ class ContactUs(models.Model):
"sender_name": self.name,
"sender_email": self.email,
"message": self.message,
"subject": self.subject
}
send_email(
......
......@@ -8,22 +8,13 @@
{% csrf_token %}
<fieldset>
<div class="form-group">
{% for error in form.errors %}
{% for error in form.non_field_errors %}
<p class="error">{{ error }}</p>
{% endfor %}
</div>
<div class="form-group">
{{ form.name }}
</div>
<div class="form-group">
{{ form.email }}
</div>
<div class="form-group">
{{ form.subject }}
</div>
<div class="form-group">
{{ form.message }}
</div>
{% render_field form.name %}
{% render_field form.email %}
{% render_field form.message %}
<input type="submit" value="{% trans 'Send' %}" class="btn btn-success btn-block my-3" {% if object %}autofocus{% endif %}>
</fieldset>
</form>
......
{{ subject }}
\ No newline at end of file
message from : {{ sender_name }}({{sender_email }})
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment