Compare commits

..

No commits in common. "628925a0135220090acf7b7be7dc6f7da420f016" and "a8928587f2698ee20e6c2be3a024e988b5368397" have entirely different histories.

6 changed files with 3 additions and 21 deletions

View File

@ -1,12 +1,6 @@
Changelog Changelog
========= =========
0.8.4
-----
* Allow setting form id or class on base_form.html
* Use time input_type on split_datetime_field
0.8.3 0.8.3
----- -----

View File

@ -78,5 +78,4 @@ def split_datetime_field(form, field_name):
), ),
) )
new_field.widget.widgets[0].input_type = 'date' new_field.widget.widgets[0].input_type = 'date'
new_field.widget.widgets[1].input_type = 'time'
form.fields[field_name] = new_field form.fields[field_name] = new_field

View File

@ -4,10 +4,7 @@
{% load form_tags %} {% load form_tags %}
{% block content %} {% block content %}
<form {% if form_id %} id="{{ form_id }}" {% endif %} <form action="." method="POST" enctype="multipart/form-data">{% csrf_token %}
{% if form_class %} class="{{ form_class }}" {% endif %}
action="." method="POST"
enctype="multipart/form-data">{% csrf_token %}
{% if is_popup %} {% if is_popup %}
<input type="hidden" name="_popup" value="1"> <input type="hidden" name="_popup" value="1">
{% endif %} {% endif %}

View File

@ -201,7 +201,6 @@ class GASCreateView(GASMixin, CreateView):
is_popup = "_popup" in self.request.GET is_popup = "_popup" in self.request.GET
ctx.update({ ctx.update({
'is_popup': is_popup, 'is_popup': is_popup,
'form_id': 'main-form',
}) })
return ctx return ctx
@ -221,13 +220,6 @@ class GASUpdateView(GASMixin, UpdateView):
""" Same as Django's UpdateView, defined only for completeness. """ """ Same as Django's UpdateView, defined only for completeness. """
template_name = 'gas/base_form.html' template_name = 'gas/base_form.html'
def get_context_data(self, **kwargs):
ctx = super().get_context_data(**kwargs)
ctx.update({
'form_id': 'main-form',
})
return ctx
class GASDeleteView(GASMixin, DeleteView): class GASDeleteView(GASMixin, DeleteView):
template_name = "gas/delete_confirmation.html" template_name = "gas/delete_confirmation.html"

View File

@ -1 +1 @@
Django==3.2.13 Django==3.1.4

View File

@ -1,6 +1,6 @@
[metadata] [metadata]
name = django-gas name = django-gas
version = 0.8.4 version = 0.8.3
description = An alternative to django admin description = An alternative to django admin
long_description = file: readme.md, changelog.md, collaborators.md long_description = file: readme.md, changelog.md, collaborators.md
long_description_content_type = text/markdown long_description_content_type = text/markdown