add FAQ section in docs

This commit is contained in:
Mateusz Sikora 2014-11-12 11:18:21 +01:00
parent 059b0dcbab
commit 0fc4d56dae
5 changed files with 36 additions and 4 deletions

View File

@ -1,7 +1,9 @@
Demo project 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 .. code-block:: python

17
docs/faq.rst Normal file
View File

@ -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<key>\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

View File

@ -22,6 +22,7 @@ Contents
API endpoints <api_endpoints> API endpoints <api_endpoints>
Configuration <configuration> Configuration <configuration>
Demo project <demo> Demo project <demo>
FAQ <faq>
Changelog <changelog> Changelog <changelog>

View File

@ -14,7 +14,21 @@ Features
* Password reset via e-mail * Password reset via e-mail
* Social Media authentication * Social Media authentication
Apps structure Apps structure
-------------- --------------
* ``rest_auth`` has basic auth functionality like login, logout, password reset and password change * ``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 * ``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 <https://github.com/Tivix/angular-django-registration-auth>`_
Demo project
------------
- You can also check our :doc:`Demo Project </demo>` which is using jQuery on frontend.

View File

@ -7,7 +7,7 @@ urlpatterns = patterns('',
url(r'^$', Register.as_view(), name='rest_register'), url(r'^$', Register.as_view(), name='rest_register'),
url(r'^verify-email/$', VerifyEmail.as_view(), name='rest_verify_email'), 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 # 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 # with verification link is being sent, then it's required to render email
# content. # content.
@ -18,8 +18,6 @@ urlpatterns = patterns('',
# If you don't want to use API on that step, then just use ConfirmEmailView # If you don't want to use API on that step, then just use ConfirmEmailView
# view from: # view from:
# djang-allauth https://github.com/pennersr/django-allauth/blob/master/allauth/account/views.py#L190 # 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<key>\w+)/$', TemplateView.as_view(), url(r'^account-confirm-email/(?P<key>\w+)/$', TemplateView.as_view(),
name='account_confirm_email'), name='account_confirm_email'),
) )