From 0fc4d56dae860be87809d8c9368f7cae28e14a44 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Wed, 12 Nov 2014 11:18:21 +0100 Subject: [PATCH] add FAQ section in docs --- docs/demo.rst | 4 +++- docs/faq.rst | 17 +++++++++++++++++ docs/index.rst | 1 + docs/introduction.rst | 14 ++++++++++++++ rest_auth/registration/urls.py | 4 +--- 5 files changed, 36 insertions(+), 4 deletions(-) create mode 100644 docs/faq.rst diff --git a/docs/demo.rst b/docs/demo.rst index 70659b8..ed74750 100644 --- a/docs/demo.rst +++ b/docs/demo.rst @@ -1,7 +1,9 @@ Demo project ============ -To run demo project (ideally in virtualenv): +The idea of creating demo project was to show how you can potentially use +django-rest-auth app with jQuery on frontend. +Do these steps to make it running (ideally in virtualenv). .. code-block:: python diff --git a/docs/faq.rst b/docs/faq.rst new file mode 100644 index 0000000..6e098b8 --- /dev/null +++ b/docs/faq.rst @@ -0,0 +1,17 @@ +FAQ +=== + +1. Why account_confirm_email url is defined but it is not usable? + + In /rest_auth/registration/urls.py we can find something like this: + + .. code-block:: python + + url(r'^account-confirm-email/(?P\w+)/$', TemplateView.as_view(), + name='account_confirm_email'), + + This url is used by django-allauth. Empty TemplateView is defined just to allow reverse() call inside app - when email with verification link is being sent. + + You should override this view/url to handle it in your API client somehow and then, send post to /verify-email/ endpoint with proper key. + If you don't want to use API on that step, then just use ConfirmEmailView view from: + djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190 diff --git a/docs/index.rst b/docs/index.rst index 6f9547e..2044cb6 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -22,6 +22,7 @@ Contents API endpoints Configuration Demo project + FAQ Changelog diff --git a/docs/introduction.rst b/docs/introduction.rst index 88da8f3..191abb5 100644 --- a/docs/introduction.rst +++ b/docs/introduction.rst @@ -14,7 +14,21 @@ Features * Password reset via e-mail * Social Media authentication + Apps structure -------------- + * ``rest_auth`` has basic auth functionality like login, logout, password reset and password change * ``rest_auth.registration`` has logic related with registration and social media authentication + + +Angular app +----------- + +- Tivix has also created angular module which uses API endpoints from this app - `angular-django-registration-auth `_ + + +Demo project +------------ + +- You can also check our :doc:`Demo Project ` which is using jQuery on frontend. diff --git a/rest_auth/registration/urls.py b/rest_auth/registration/urls.py index f9df934..b01c067 100644 --- a/rest_auth/registration/urls.py +++ b/rest_auth/registration/urls.py @@ -7,7 +7,7 @@ urlpatterns = patterns('', url(r'^$', Register.as_view(), name='rest_register'), url(r'^verify-email/$', VerifyEmail.as_view(), name='rest_verify_email'), - # These two views are used in django-allauth and empty TemplateView were + # This url is used by django-allauth and empty TemplateView is # defined just to allow reverse() call inside app, for example when email # with verification link is being sent, then it's required to render email # content. @@ -18,8 +18,6 @@ urlpatterns = patterns('', # If you don't want to use API on that step, then just use ConfirmEmailView # view from: # djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190 - url(r'^account-email-verification-sent/$', TemplateView.as_view(), - name='account_email_verification_sent'), url(r'^account-confirm-email/(?P\w+)/$', TemplateView.as_view(), name='account_confirm_email'), )