Compare commits
No commits in common. "28269a3a93900511fa7b7e840df63a5a5e864b6b" and "47f005fd82f47cb05d59660ba692c655696c5b81" have entirely different histories.
28269a3a93
...
47f005fd82
|
@ -1,15 +1,6 @@
|
|||
Changelog
|
||||
=========
|
||||
|
||||
0.4
|
||||
---
|
||||
|
||||
* Helper function to use SplitDateTimeField for datetimes
|
||||
* Update spanish translation
|
||||
|
||||
0.3
|
||||
---
|
||||
|
||||
* Allow extending GAS media files
|
||||
* Allow actions in every view
|
||||
* Enhance support for inline formsets
|
||||
|
|
23
gas/forms.py
23
gas/forms.py
|
@ -55,26 +55,3 @@ class UserForm(forms.ModelForm):
|
|||
self.save_m2m()
|
||||
|
||||
return obj
|
||||
|
||||
|
||||
def split_datetime_field(form, field_name):
|
||||
old_field = form.fields[field_name]
|
||||
new_field = forms.SplitDateTimeField(
|
||||
label=old_field.label,
|
||||
label_suffix=old_field.label_suffix,
|
||||
required=old_field.required,
|
||||
help_text=old_field.help_text,
|
||||
initial=old_field.initial,
|
||||
validators=old_field.validators,
|
||||
localize=old_field.localize,
|
||||
disabled=old_field.disabled,
|
||||
input_date_formats=("%Y-%m-%d",),
|
||||
input_time_formats=("%H:%M", "%H:%M:%S"),
|
||||
widget=forms.SplitDateTimeWidget(
|
||||
date_format='%Y-%m-%d',
|
||||
time_format='%H:%M:%S',
|
||||
time_attrs={'placeholder': '00:00'},
|
||||
),
|
||||
)
|
||||
new_field.widget.widgets[0].input_type = 'date'
|
||||
form.fields[field_name] = new_field
|
||||
|
|
Binary file not shown.
|
@ -8,7 +8,7 @@ msgid ""
|
|||
msgstr ""
|
||||
"Project-Id-Version: PACKAGE VERSION\n"
|
||||
"Report-Msgid-Bugs-To: \n"
|
||||
"POT-Creation-Date: 2021-01-08 14:15+0000\n"
|
||||
"POT-Creation-Date: 2020-12-22 16:24+0000\n"
|
||||
"PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n"
|
||||
"Last-Translator: FULL NAME <EMAIL@ADDRESS>\n"
|
||||
"Language-Team: LANGUAGE <LL@li.org>\n"
|
||||
|
@ -34,20 +34,12 @@ msgstr "Usuarios con acceso al panel de control."
|
|||
msgid "Users with access to everithing inside control panel."
|
||||
msgstr "Usuarios con acceso a todo el panel de control."
|
||||
|
||||
#: gas/config.py:14 gas/users/views.py:31 gas/users/views.py:39
|
||||
#: gas/users/views.py:49 gas/users/views.py:60 gas/users/views.py:96
|
||||
#: gas/users/views.py:108
|
||||
#: gas/config.py:14 gas/users/views.py:31 gas/users/views.py:38
|
||||
#: gas/users/views.py:48 gas/users/views.py:59 gas/users/views.py:95
|
||||
#: gas/users/views.py:107
|
||||
msgid "Users"
|
||||
msgstr "Usuarios"
|
||||
|
||||
#: gas/core/views.py:21
|
||||
msgid "Change your password"
|
||||
msgstr "Cambiar tu contraseña"
|
||||
|
||||
#: gas/core/views.py:22
|
||||
msgid "Password changed."
|
||||
msgstr "Contraseña cambiada."
|
||||
|
||||
#: gas/users/forms.py:9 templates/gas/users/user_list.html:10
|
||||
msgid "Username"
|
||||
msgstr "Usuario"
|
||||
|
@ -60,61 +52,57 @@ msgstr "Activo"
|
|||
msgid "Roles"
|
||||
msgstr "Roles"
|
||||
|
||||
#: gas/users/views.py:32
|
||||
msgid "Manage users and set roles."
|
||||
msgstr "Gestionar usuarios y asignar roles."
|
||||
|
||||
#: gas/users/views.py:34
|
||||
#: gas/users/views.py:33
|
||||
msgid "New user"
|
||||
msgstr "Nuevo usuario"
|
||||
|
||||
#: gas/users/views.py:44
|
||||
#: gas/users/views.py:43
|
||||
msgid "Create user"
|
||||
msgstr "Crear usuario"
|
||||
|
||||
#: gas/users/views.py:45
|
||||
#: gas/users/views.py:44
|
||||
msgid "User created"
|
||||
msgstr "Usuario creado"
|
||||
|
||||
#: gas/users/views.py:50
|
||||
#: gas/users/views.py:49
|
||||
msgid "Create"
|
||||
msgstr "Crear"
|
||||
|
||||
#: gas/users/views.py:55
|
||||
#: gas/users/views.py:54
|
||||
msgid "Update user"
|
||||
msgstr "Actulizar usuario"
|
||||
|
||||
#: gas/users/views.py:56
|
||||
#: gas/users/views.py:55
|
||||
msgid "User updated"
|
||||
msgstr "Usuario actualizado"
|
||||
|
||||
#: gas/users/views.py:62
|
||||
#: gas/users/views.py:61
|
||||
msgid "Update"
|
||||
msgstr "Actualizar"
|
||||
|
||||
#: gas/users/views.py:69
|
||||
#: gas/users/views.py:68
|
||||
msgid "User password updated"
|
||||
msgstr "Contraseña de usuario actualizada"
|
||||
|
||||
#: gas/users/views.py:76
|
||||
#: gas/users/views.py:75
|
||||
#, python-brace-format
|
||||
msgid "Change {username} user password"
|
||||
msgstr "Cambiar la contraseña del usuario {username}"
|
||||
|
||||
#: gas/users/views.py:98 templates/gas/base.html:23
|
||||
#: gas/users/views.py:97 templates/gas/base.html:23
|
||||
#: templates/gas/users/user_list.html:29
|
||||
msgid "Change password"
|
||||
msgstr "Cambiar contraseña"
|
||||
|
||||
#: gas/users/views.py:103
|
||||
#: gas/users/views.py:102
|
||||
msgid "Delete user"
|
||||
msgstr "Borrar usuario"
|
||||
|
||||
#: gas/users/views.py:104
|
||||
#: gas/users/views.py:103
|
||||
msgid "User deleted"
|
||||
msgstr "Usuario borrado"
|
||||
|
||||
#: gas/users/views.py:110 templates/gas/delete_confirmation.html:20
|
||||
#: gas/users/views.py:109 templates/gas/delete_confirmation.html:20
|
||||
#: templates/gas/users/user_list.html:30
|
||||
msgid "Delete"
|
||||
msgstr "Borrar"
|
||||
|
@ -143,19 +131,19 @@ msgstr "Salir"
|
|||
msgid "Home"
|
||||
msgstr "Inicio"
|
||||
|
||||
#: templates/gas/base_form.html:23 templates/gas/delete_confirmation.html:21
|
||||
#: templates/gas/base_form.html:20 templates/gas/delete_confirmation.html:21
|
||||
msgid "Cancel"
|
||||
msgstr "Cancelar"
|
||||
|
||||
#: templates/gas/base_form.html:26
|
||||
#: templates/gas/base_form.html:23
|
||||
msgid "Save"
|
||||
msgstr "Guardar"
|
||||
|
||||
#: templates/gas/base_form.html:29
|
||||
#: templates/gas/base_form.html:26
|
||||
msgid "Save and continue"
|
||||
msgstr "Guardar y continuar"
|
||||
|
||||
#: templates/gas/base_list.html:14
|
||||
#: templates/gas/base_list.html:24
|
||||
msgid "Filter"
|
||||
msgstr "Filtrar"
|
||||
|
||||
|
@ -171,7 +159,7 @@ msgstr "Resumen"
|
|||
msgid "Objects"
|
||||
msgstr "Objetos"
|
||||
|
||||
#: templates/gas/login.html:6 templates/gas/login.html:15
|
||||
#: templates/gas/login.html:7 templates/gas/login.html:15
|
||||
msgid "Login"
|
||||
msgstr "Login"
|
||||
|
||||
|
@ -179,15 +167,16 @@ msgstr "Login"
|
|||
msgid "Edit"
|
||||
msgstr "Editar"
|
||||
|
||||
#: views.py:45
|
||||
#: views.py:44
|
||||
msgid "Operation successful."
|
||||
msgstr "Operación realizada."
|
||||
|
||||
#: views.py:181
|
||||
#: views.py:170
|
||||
#, python-brace-format
|
||||
msgid "Are you sure you want to delete {object}?"
|
||||
msgid "Are your sure you want to delete {object}?"
|
||||
msgstr "¿Seguro que quieres borrar {object}?"
|
||||
|
||||
#: views.py:182
|
||||
msgid "{object} deleted."
|
||||
msgstr "{object} borrado"
|
||||
#: views.py:171
|
||||
#, python-format
|
||||
msgid "%(obj)s deleted."
|
||||
msgstr ""
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
{% if field.errors %} has-error{% endif %}
|
||||
">
|
||||
<label for="{{ field.id_for_label }}">{{ field.label }}</label>
|
||||
{% add_widget_attrs field placeholder=field.label %}
|
||||
{{ field }}
|
||||
|
||||
{% if add_another_url %}
|
||||
|
|
|
@ -22,11 +22,6 @@ def base_form_field(field, css=None, container_class='', add_another_url=None, f
|
|||
elif isinstance(field.field, forms.DateField):
|
||||
field.field.widget.input_type = 'date'
|
||||
|
||||
if isinstance(field.field, forms.SplitDateTimeField):
|
||||
field.field.widget.widgets[1].attrs['placeholder'] = '00:00:00'
|
||||
else:
|
||||
field.field.widget.attrs['placeholder'] = field.label
|
||||
|
||||
if field_template is None:
|
||||
if isinstance(field.field.widget, forms.CheckboxInput):
|
||||
field_template = 'gas/tags/forms/checkbox.html'
|
||||
|
|
|
@ -178,7 +178,7 @@ class GASUpdateView(GASMixin, UpdateView):
|
|||
|
||||
class GASDeleteView(GASMixin, DeleteView):
|
||||
template_name = "gas/delete_confirmation.html"
|
||||
confirmation_text = _("Are you sure you want to delete {object}?")
|
||||
confirmation_text = _("Are your sure you want to delete {object}?")
|
||||
deleted_text = _("{object} deleted.")
|
||||
|
||||
def get_confirmation_text(self):
|
||||
|
|
Loading…
Reference in New Issue