Compare commits

...

4 Commits

6 changed files with 15 additions and 3 deletions

View File

@ -1,6 +1,12 @@
Changelog
=========
0.8.3
-----
* Fix password change views
* Show errors on delete view
0.8.2
-----

View File

@ -34,6 +34,7 @@ class GASLoginView(LoginView):
class GASPasswordChangeView(GASMixin, PasswordChangeView):
template_name = 'gas/base_form.html'
success_url = reverse_lazy('gas:index')
continue_url = reverse_lazy('gas:change_password')
title = _('Change your password')
success_message = _('Password changed.')

View File

@ -75,6 +75,9 @@ class ChangePasswordUser(BaseMixin, gviews.GASMixin, FormView):
def get_title(self):
return _('Change {username} user password').format(username=self.user.username)
def get_continue_url(self):
return reverse('gas:user_change_password', args=(self.kwargs['pk'],))
def get_form_kwargs(self):
kwargs = super().get_form_kwargs()
kwargs['user'] = self.user

View File

@ -23,10 +23,10 @@
<li><a href="{{ view.get_cancel_url }}">{% trans "Cancel" %}</a></li>
{% endif %}
<li><button type="submit">{% trans "Save" %}</button>
<li><button type="submit">{% trans "Save" %}</button></li>
{% if not is_popup %}
<li><button name="save_and_continue" type="submit">{% trans "Save and continue" %}</button>
<li><button name="save_and_continue" type="submit">{% trans "Save and continue" %}</button></li>
{% endif %}
{% block extra_form_actions %}{% endblock %}
{% endblock form_actions %}

View File

@ -1,10 +1,12 @@
{% extends base_template %}
{% load i18n %}
{% load form_tags %}
{% block ui_title %}{% trans "Delete confirmation" %}{% endblock %}
{% block content %}
{% form_errors form %}
<p>{{ confirmation_text }}</p>
{% if show_deleted_objects %}

View File

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