Metadata-Version: 2.1
Name: django-next-url-mixin
Version: 0.4.0
Summary: Next url mixin witch doesn't redirect to external website
Home-page: https://github.com/PetrDlouhy/django-next-url-mixin
Author: Petr Dlouhý
Author-email: petr.dlouhy@email.cz
License: MIT
Description: =============================
        Django next url mixin
        =============================
        
        .. image:: https://badge.fury.io/py/django-next-url-mixin.svg
            :target: https://badge.fury.io/py/django-next-url-mixin
        
        .. image:: https://travis-ci.org/PetrDlouhy/django-next-url-mixin.svg?branch=master
            :target: https://travis-ci.org/PetrDlouhy/django-next-url-mixin
        
        .. image:: https://codecov.io/gh/PetrDlouhy/django-next-url-mixin/branch/master/graph/badge.svg
            :target: https://codecov.io/gh/PetrDlouhy/django-next-url-mixin
        
        Next url mixin which is safe to phishing attacks
        
        Naive implementation of the next URL mechanism is vulnerable to phishing attacks.
        This implementation aims to
        
        1) raise awareness of that
        2) provide safe implementation (possibly seen by more eyes)
        
        The mixin does it's work in form_valid() function, so it can be used for offspring of FormView or simillar view classes.
        
        Documentation
        -------------
        
        The full documentation is at https://django-next-url-mixin.readthedocs.io.
        
        Quickstart
        ----------
        
        Install Django next url mixin::
        
            pip install django-next-url-mixin
        
        Use it in your views:
        
        .. code-block:: python
        
            from django.views.generic.edit import FormView
            from next_url_mixin import NextUrlMixin
        
            class MyView(NextUrlMixin, FormView):
        
                # If you are overriding form_valid(), don't forgot to return the super value with the redirect to the new url
                def form_valid(self, *args, **kwargs):
                    return_value = super().form_valid(*args, **kwargs)
                    return return_value
              
        
        
        Running Tests
        -------------
        
        Does the code actually work?
        
        ::
        
            source <YOURVIRTUALENV>/bin/activate
            (myenv) $ pip install tox
            (myenv) $ tox
        
        Credits
        -------
        
        Tools used in rendering this package:
        
        *  Cookiecutter_
        *  `cookiecutter-djangopackage`_
        
        .. _Cookiecutter: https://github.com/audreyr/cookiecutter
        .. _`cookiecutter-djangopackage`: https://github.com/pydanny/cookiecutter-djangopackage
        
        
        
        
        History
        -------
        
        0.4.0 (2022-08-22)
        ++++++++++++++++++
        
        * Added support for Django 4.1
        
        0.3.0 (2022-03-11)
        ++++++++++++++++++
        
        * Split mixin into GetNextPageMixin to allow usage of only get_next_page()
        
        0.2.0 (2020-06-22)
        ++++++++++++++++++
        
        * Fix saving POST form
        
        0.1.0 (2020-06-12)
        ++++++++++++++++++
        
        * First release on PyPI.
        
Keywords: django-next-url-mixin
Platform: UNKNOWN
Classifier: Development Status :: 3 - Alpha
Classifier: Framework :: Django :: 1.11
Classifier: Framework :: Django :: 2.1
Classifier: Framework :: Django :: 2.2
Classifier: Framework :: Django :: 3.0
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Natural Language :: English
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
