From 5bd8842c4b9729a9e1528e7932a0380edeea94a0 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Tue, 14 Oct 2014 16:44:57 +0200 Subject: [PATCH 1/5] draft demo project --- demo/db.sqlite3 | Bin 0 -> 167936 bytes demo/demo/__init__.py | 0 demo/demo/settings.py | 100 ++++++++++++++++++++++++++++++++ demo/demo/urls.py | 12 ++++ demo/demo/wsgi.py | 14 +++++ demo/manage.py | 10 ++++ demo/templates/home.html | 120 +++++++++++++++++++++++++++++++++++++++ 7 files changed, 256 insertions(+) create mode 100644 demo/db.sqlite3 create mode 100644 demo/demo/__init__.py create mode 100644 demo/demo/settings.py create mode 100644 demo/demo/urls.py create mode 100644 demo/demo/wsgi.py create mode 100644 demo/manage.py create mode 100644 demo/templates/home.html diff --git a/demo/db.sqlite3 b/demo/db.sqlite3 new file mode 100644 index 0000000000000000000000000000000000000000..4881c8fbce53d08b4803ac3500dfbb6b5b742fc0 GIT binary patch literal 167936 zcmeI5d2AzDe&1OV4^a|XeMnP1qv;V_-I{4yEvXKkJ?YG{B}y%|NVTq(sEtDx$)Z#g z4~eAC*lSbWo&?wcK_;+az`-DZ9Uv#-4RT?T4Fbop6U4EDWRW|F64g=ht2T z%<;FKTlO_a&iYN;_pSckU+np#o}Z+?N3B|Z$@NXW(AtAr4rVPv)mG$UMmiA>tGmg= zid5D%`%<|eS1NL;SV@M2ppfE%Tz8jSGpo_adepNJpN(#Ly8AVX@+`+aW8MA6Jom>8 z1xYzG=B<6mXmX>M$(2GumJ>6+?!_~&Dz{$LE67#RDMEkx9S8HtBvl)2(YaGD9qw0> ztP~c)qAzQx(+ux)(bSTyMTurraH)GLsjm%d0&aH}P;XPKfZ>Y;)U$OJ&;U?-f5^c+ z4O6vS4h@%0Cuv3i`f=UR=~o7o1|RpAWem%;Y5X z;;StkqehjfJG5hWw@%Q^dV|^_{BY1~k^gGcRo{z&H;VImKcVf++T`V|wPq(xgtZj< z#g7d-n9)({)4R=F8{IV6h2(1?+!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_rmhAbZ~MS%4d#)sf_P1u$L~E zQgU9}^@W0GCp-Q0cP)1MzJ>l5^v}}2OwZHz=`8KMszHHvfdB}A00@8p2!H?xfB*=9 z00_MG1n8_~wE0CCA^gzqn+ge`a5yyZL2ra=F`M2tadtE}Ug>bOo6T?8^tYSMZ#G!l z&E_Zgwstdbdb>bb1^B?MTzUBakPA!+exKjRDu4gqa_z0}eEK`9ER+1V8`;KmY_l z00ck)1V8`;KmY`;J^?)czxsWQ7J>i>fB*=900@8p2!H?xfB*=90G|IN20#D=KmY_l z00ck)1V8`;KmY_l;OY~={Qv6rF + + + + + + + + + Starter Template for Bootstrap + + + + + + + + + + + + + + + + +
+ + + + +
+
+
+ +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+
+
+
+
+
+
E-mail verification
+
+
+ + + + + + + From 5fd7ea5596b302dd0c8b33213eb2eed37d7f474d Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Wed, 15 Oct 2014 17:32:19 +0200 Subject: [PATCH 2/5] update demo project - still not finished --- demo/db.sqlite3 | Bin 167936 -> 172032 bytes demo/demo/settings.py | 7 + demo/demo/urls.py | 11 +- demo/templates/base.html | 96 +++++++++++++ demo/templates/email_verification.html | 9 ++ .../fragments/email_verification_form.html | 17 +++ demo/templates/fragments/login_form.html | 24 ++++ .../password_reset_confirm_form.html | 38 ++++++ .../fragments/password_reset_form.html | 16 +++ demo/templates/fragments/signup_form.html | 38 ++++++ demo/templates/home.html | 127 ++---------------- demo/templates/login.html | 8 ++ demo/templates/password_reset.html | 8 ++ demo/templates/password_reset_confirm.html | 8 ++ demo/templates/signup.html | 23 ++++ docs/api_endpoints.rst | 2 +- rest_auth/registration/urls.py | 2 +- 17 files changed, 311 insertions(+), 123 deletions(-) create mode 100644 demo/templates/base.html create mode 100644 demo/templates/email_verification.html create mode 100644 demo/templates/fragments/email_verification_form.html create mode 100644 demo/templates/fragments/login_form.html create mode 100644 demo/templates/fragments/password_reset_confirm_form.html create mode 100644 demo/templates/fragments/password_reset_form.html create mode 100644 demo/templates/fragments/signup_form.html create mode 100644 demo/templates/login.html create mode 100644 demo/templates/password_reset.html create mode 100644 demo/templates/password_reset_confirm.html create mode 100644 demo/templates/signup.html diff --git a/demo/db.sqlite3 b/demo/db.sqlite3 index 4881c8fbce53d08b4803ac3500dfbb6b5b742fc0..9f5f009b8427e307baf76f36bf7aff6353f43428 100644 GIT binary patch delta 5256 zcmbuDeQYDgb-;H;QW7bVbMjH<-T9!1!K+&Q=615frw1r(KK$6yN1O1_*fejZ)acEM&KFWza?Zq#^wiaDBq-1t;yYJZAB1N)Kd?)7;G zwus+Y6^-kXtjTrxy5+((kndRX^|`YaxgsLI-(n#5TU@#7z&?V{Sw2Kb8aO~gUw87` zw@mvbm*-6kya&Dk{uulYsDdQ81-zd3Ja6`c>wV1Sz-E23{oq;wwuF=SqEF(NT!6s9 zuYhO455Tv;JK#0Y0xyBz00au@EC3$6Zx-)cSvS|wvvn|Hr(G;x<3cYoP^?0y0H z54forJAMNn9@6~a&Cn3$Ja&8zcRirKdh)0G_6p$}!!S_t{I%y7-CuNjrdw0*PHnor z>bm0m)a1WRCMRB>_}KVo93MEc_EWpd_T1Q?jG_L%g}Zyt_}p0UV}Z#h-0s^)@4oIk zWWwr!k*7;AKm`}7JGqA5sIx6bipHUK&@669WVt1iwj#>!?{lPqcn}h`Y z3;~}Z(0XH*338c)OOPQ17NR)S36j#qy4f!QN>gbsS z9Aoj254fx+`MAT*)ds%~nnQ8s#+Mr;hpvb4oU46_lBWTSoe%{T~qPhA|a&AQz}e@;vM z1`M_;%5F&sEolB+t_+F2h9*Einn)wDhEmq*js{mbs-%WOk&Qz3AeLF(Jip}nDGm}# z1kXUKAGcw&N0TkXseus(d)~*6W?p;pFubu6s3gTu=RjUt$nNb`lRfS3(*a6{X7r3O!3P!y#xtJbA+`8NMU%T5A@WMK++7!_q;QM zpj>vlkFLCS>9D*mwR7n#+$J|R7li%nZqD2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{ST3?ipR{zA85kXW6L23Ku^ xqt@xRHMp8YPgA3-&Mmq<9=EZQX$5(188*xNf5M!?#=lu-(yZgpawBcl`WMPE&{F^a diff --git a/demo/demo/settings.py b/demo/demo/settings.py index 10fc69f..b0b3941 100644 --- a/demo/demo/settings.py +++ b/demo/demo/settings.py @@ -98,3 +98,10 @@ USE_TZ = True STATIC_URL = '/static/' TEMPLATE_DIRS = [os.path.join(BASE_DIR, 'templates')] + +REST_SESSION_LOGIN = False +EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' +SITE_ID = 1 +ACCOUNT_EMAIL_REQUIRED = True +ACCOUNT_AUTHENTICATION_METHOD = 'email' +ACCOUNT_EMAIL_VERIFICATION = 'mandatory' diff --git a/demo/demo/urls.py b/demo/demo/urls.py index 7cdb267..15ac67f 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -3,9 +3,16 @@ from django.contrib import admin from django.views.generic import TemplateView urlpatterns = patterns('', - # Examples: url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), - # url(r'^blog/', include('blog.urls')), + url(r'^signup/$', TemplateView.as_view(template_name="signup.html"), name='signup'), + url(r'^email-verification/$', TemplateView.as_view(template_name="email_verification.html"), name='email-verification'), + url(r'^login/$', TemplateView.as_view(template_name="login.html"), name='login'), + url(r'^password-reset/$', TemplateView.as_view(template_name="password_reset.html"), name='password-reset'), + + url(r'^password-reset/confirm/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', + TemplateView.as_view(template_name="password_reset_confirm.html"), + name='password_reset_confirm'), + url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), url(r'^admin/', include(admin.site.urls)), diff --git a/demo/templates/base.html b/demo/templates/base.html new file mode 100644 index 0000000..8d19353 --- /dev/null +++ b/demo/templates/base.html @@ -0,0 +1,96 @@ + + + + + + + + + + Starter Template for Bootstrap + + + + + + + + + + + + + + + + +
+ {% block content %}{% endblock %} +
+ + + + + + {% block script %}{% endblock %} + + diff --git a/demo/templates/email_verification.html b/demo/templates/email_verification.html new file mode 100644 index 0000000..eb49b3e --- /dev/null +++ b/demo/templates/email_verification.html @@ -0,0 +1,9 @@ +{% extends "base.html" %} + +{% block content %} +
+

E-mail verification


+

Paste here a key which was sent in verification email

+ {% include "fragments/email_verification_form.html" %} +
+{% endblock %} diff --git a/demo/templates/fragments/email_verification_form.html b/demo/templates/fragments/email_verification_form.html new file mode 100644 index 0000000..862ef27 --- /dev/null +++ b/demo/templates/fragments/email_verification_form.html @@ -0,0 +1,17 @@ + +
+
+ +
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/demo/templates/fragments/login_form.html b/demo/templates/fragments/login_form.html new file mode 100644 index 0000000..23eaf29 --- /dev/null +++ b/demo/templates/fragments/login_form.html @@ -0,0 +1,24 @@ + +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/demo/templates/fragments/password_reset_confirm_form.html b/demo/templates/fragments/password_reset_confirm_form.html new file mode 100644 index 0000000..61a1d78 --- /dev/null +++ b/demo/templates/fragments/password_reset_confirm_form.html @@ -0,0 +1,38 @@ + +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/demo/templates/fragments/password_reset_form.html b/demo/templates/fragments/password_reset_form.html new file mode 100644 index 0000000..acae37e --- /dev/null +++ b/demo/templates/fragments/password_reset_form.html @@ -0,0 +1,16 @@ + +
+
+ +
+ +
+
+ +
+
+ +
+
+
+
diff --git a/demo/templates/fragments/signup_form.html b/demo/templates/fragments/signup_form.html new file mode 100644 index 0000000..335ee64 --- /dev/null +++ b/demo/templates/fragments/signup_form.html @@ -0,0 +1,38 @@ + +
+
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+
diff --git a/demo/templates/home.html b/demo/templates/home.html index a4107e0..134198a 100644 --- a/demo/templates/home.html +++ b/demo/templates/home.html @@ -1,120 +1,9 @@ - - - - - - - - +{% extends "base.html" %} - Starter Template for Bootstrap - - - - - - - - - - - - - - - - -
- - - - -
-
-
- -
-
- -
- -
-
- -
- -
- -
-
- -
- -
- -
-
- -
-
- -
-
-
-
-
-
-
-
E-mail verification
-
-
- - - - - - - +{% block content %} + +
+

django-rest-auth demo

+

Welcome in django-rest-auth demo project!

+
+{% endblock %} diff --git a/demo/templates/login.html b/demo/templates/login.html new file mode 100644 index 0000000..70d8081 --- /dev/null +++ b/demo/templates/login.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +
+

Login


+ {% include "fragments/login_form.html" %} +
+{% endblock %} diff --git a/demo/templates/password_reset.html b/demo/templates/password_reset.html new file mode 100644 index 0000000..9100bee --- /dev/null +++ b/demo/templates/password_reset.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +
+

Password reset


+ {% include "fragments/password_reset_form.html" %} +
+{% endblock %} diff --git a/demo/templates/password_reset_confirm.html b/demo/templates/password_reset_confirm.html new file mode 100644 index 0000000..09c6000 --- /dev/null +++ b/demo/templates/password_reset_confirm.html @@ -0,0 +1,8 @@ +{% extends "base.html" %} + +{% block content %} +
+

Password reset confirmation


+ {% include "fragments/password_reset_confirm_form.html" %} +
+{% endblock %} diff --git a/demo/templates/signup.html b/demo/templates/signup.html new file mode 100644 index 0000000..4c5a909 --- /dev/null +++ b/demo/templates/signup.html @@ -0,0 +1,23 @@ +{% extends "base.html" %} + +{% block content %} +
+

Signup


+ {% include "fragments/signup_form.html" %} +
+{% endblock %} + +{% comment %} +{% block script %} + +{% endblock %} +{% endcomment %} diff --git a/docs/api_endpoints.rst b/docs/api_endpoints.rst index 8ad7001..21cb62f 100644 --- a/docs/api_endpoints.rst +++ b/docs/api_endpoints.rst @@ -60,7 +60,7 @@ Registration See allauth documentation for more details. -- /rest-auth/registration/ (POST) +- /rest-auth/registration/verify-email/ (POST) - key diff --git a/rest_auth/registration/urls.py b/rest_auth/registration/urls.py index 8afadab..f9df934 100644 --- a/rest_auth/registration/urls.py +++ b/rest_auth/registration/urls.py @@ -5,7 +5,7 @@ from .views import Register, VerifyEmail urlpatterns = patterns('', url(r'^$', Register.as_view(), name='rest_register'), - url(r'^verify-email/$', VerifyEmail.as_view(), name='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 # defined just to allow reverse() call inside app, for example when email From aac42af9918134117701563f6eb31a6d10aea07c Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Wed, 15 Oct 2014 17:36:21 +0200 Subject: [PATCH 3/5] fix tests --- rest_auth/tests.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/rest_auth/tests.py b/rest_auth/tests.py index 65671a0..4f66124 100644 --- a/rest_auth/tests.py +++ b/rest_auth/tests.py @@ -154,7 +154,7 @@ class APITestCase1(TestCase, BaseAPITestCase): self.register_url = reverse('rest_register') self.password_reset_url = reverse('rest_password_reset') self.user_url = reverse('rest_user_details') - self.veirfy_email_url = reverse('verify_email') + self.veirfy_email_url = reverse('rest_verify_email') def _login(self): payload = { From 81a96cfe19b40dda27ff5cc7e8e7d3b41d3d9412 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Thu, 16 Oct 2014 13:13:55 +0200 Subject: [PATCH 4/5] final versio of demo project --- .gitignore | 1 + demo/db.sqlite3 | Bin 172032 -> 0 bytes demo/demo/urls.py | 26 ++++++-- demo/templates/base.html | 18 +++--- demo/templates/email_verification.html | 1 - .../fragments/email_verification_form.html | 3 +- demo/templates/fragments/login_form.html | 2 +- .../fragments/password_change_form.html | 25 ++++++++ .../password_reset_confirm_form.html | 20 +++--- .../fragments/password_reset_form.html | 2 +- demo/templates/fragments/signup_form.html | 2 +- .../fragments/user_details_form.html | 39 ++++++++++++ demo/templates/password_change.html | 39 ++++++++++++ demo/templates/password_reset_confirm.html | 18 ++++++ demo/templates/signup.html | 15 ----- demo/templates/user_details.html | 58 ++++++++++++++++++ 16 files changed, 227 insertions(+), 42 deletions(-) delete mode 100644 demo/db.sqlite3 create mode 100644 demo/templates/fragments/password_change_form.html create mode 100644 demo/templates/fragments/user_details_form.html create mode 100644 demo/templates/password_change.html create mode 100644 demo/templates/user_details.html diff --git a/.gitignore b/.gitignore index 6e5e982..eec873e 100644 --- a/.gitignore +++ b/.gitignore @@ -53,3 +53,4 @@ coverage.xml docs/_build/ .DS_Store +db.sqlite3 diff --git a/demo/db.sqlite3 b/demo/db.sqlite3 deleted file mode 100644 index 9f5f009b8427e307baf76f36bf7aff6353f43428..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 172032 zcmeI5d2l1yec#apKoH~rJqNki-PxJJa5%ezUhrp355Ifgszk=$RpQ*l-*tX&BJ5ln{})c&{yE1l z+5Wcucy!;EwtUU{2Nu@+vm-wo`2_YZwrBd1<7;}R?KfVux%PcndsoiKrG{9mrcP=V zsjO{^QaLAADsmxTIpJxJj*=XCev}uN_WZt(-@P7O_8+^?kJru0y&ZHg z0pDKOz3C6TeFvfK^&rYJ;17o0a8GyqY&g}Pf5pG&4=(xl4TUO|RJtWf*%PnS^eNK! z67+I82(IrQ_)(@E9YYy=Jp0#1T}dBiQk$_-%A!-j3BpxS_m$9jBkdE0*lUj`oi^9Q zhuGU69cUQUs|?Md?K{tF1kJ2hXc)pD4tmY=pN_g3_sPJ!*?Bx~;iInohZnQfs(oT0 ztR2DMe*KEgb>|ND*?aw5yUldv9Fot3uqak4^+FlB->F!RrNr_BlHxsG&qvOb6)V+~ zY#}MU}Dplp2WVFkblS&PFrs99o?r5QqHCmOUc`+yT@~4Sj_HNC4Q7H+zjEXrw zW=F^qV@Nqs&h|>;*j`B}y&|+KCKAIUkwuJE1dL}IW-o_7muIKUGsLeGyi@kHBC#fe})z#azoFT4f zeIFFE28D><;K_7&bTyu$;%PCTESwk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1BT%L2eff2 AX8-^I diff --git a/demo/demo/urls.py b/demo/demo/urls.py index 15ac67f..42b4a88 100644 --- a/demo/demo/urls.py +++ b/demo/demo/urls.py @@ -4,11 +4,29 @@ from django.views.generic import TemplateView urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_name="home.html"), name='home'), - url(r'^signup/$', TemplateView.as_view(template_name="signup.html"), name='signup'), - url(r'^email-verification/$', TemplateView.as_view(template_name="email_verification.html"), name='email-verification'), - url(r'^login/$', TemplateView.as_view(template_name="login.html"), name='login'), - url(r'^password-reset/$', TemplateView.as_view(template_name="password_reset.html"), name='password-reset'), + url(r'^signup/$', TemplateView.as_view(template_name="signup.html"), + name='signup'), + url(r'^email-verification/$', + TemplateView.as_view(template_name="email_verification.html"), + name='email-verification'), + url(r'^login/$', TemplateView.as_view(template_name="login.html"), + name='login'), + url(r'^password-reset/$', + TemplateView.as_view(template_name="password_reset.html"), + name='password-reset'), + url(r'^password-reset/confirm/$', + TemplateView.as_view(template_name="password_reset_confirm.html"), + name='password-reset-confirm'), + url(r'^user-details/$', + TemplateView.as_view(template_name="user_details.html"), + name='user-details'), + url(r'^password-change/$', + TemplateView.as_view(template_name="password_change.html"), + name='password-change'), + + + # this url is used to generate email content url(r'^password-reset/confirm/(?P[0-9A-Za-z_\-]+)/(?P[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', TemplateView.as_view(template_name="password_reset_confirm.html"), name='password_reset_confirm'), diff --git a/demo/templates/base.html b/demo/templates/base.html index 8d19353..8a0b0ed 100644 --- a/demo/templates/base.html +++ b/demo/templates/base.html @@ -31,16 +31,16 @@ API endpoints @@ -82,9 +82,9 @@ } $().ready(function(){ - $('form button[type=submit]').click(function(){ - var form = $('form'); - $.post(form.attr('action'), $('form').serialize()) + $('form.ajax-post button[type=submit]').click(function(){ + var form = $('form.ajax-post'); + $.post(form.attr('action'), form.serialize()) .fail(function(data){error_response(data);}) .done(function(data){susccess_response(data);}); return false; diff --git a/demo/templates/email_verification.html b/demo/templates/email_verification.html index eb49b3e..342e4a7 100644 --- a/demo/templates/email_verification.html +++ b/demo/templates/email_verification.html @@ -3,7 +3,6 @@ {% block content %}

E-mail verification


-

Paste here a key which was sent in verification email

{% include "fragments/email_verification_form.html" %}
{% endblock %} diff --git a/demo/templates/fragments/email_verification_form.html b/demo/templates/fragments/email_verification_form.html index 862ef27..aa9a5f6 100644 --- a/demo/templates/fragments/email_verification_form.html +++ b/demo/templates/fragments/email_verification_form.html @@ -1,9 +1,10 @@ -
+
+

Put here a key which was sent in verification email

diff --git a/demo/templates/fragments/login_form.html b/demo/templates/fragments/login_form.html index 23eaf29..ee02b53 100644 --- a/demo/templates/fragments/login_form.html +++ b/demo/templates/fragments/login_form.html @@ -1,5 +1,5 @@ - +
diff --git a/demo/templates/fragments/password_change_form.html b/demo/templates/fragments/password_change_form.html new file mode 100644 index 0000000..9e64ea4 --- /dev/null +++ b/demo/templates/fragments/password_change_form.html @@ -0,0 +1,25 @@ + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ diff --git a/demo/templates/fragments/password_reset_confirm_form.html b/demo/templates/fragments/password_reset_confirm_form.html index 61a1d78..973b05d 100644 --- a/demo/templates/fragments/password_reset_confirm_form.html +++ b/demo/templates/fragments/password_reset_confirm_form.html @@ -1,30 +1,32 @@ -
+
- +
- + +

Uid value sent in email

- +
- + +

Token value sent in email

- +
- +
- +
- +
diff --git a/demo/templates/fragments/password_reset_form.html b/demo/templates/fragments/password_reset_form.html index acae37e..6840193 100644 --- a/demo/templates/fragments/password_reset_form.html +++ b/demo/templates/fragments/password_reset_form.html @@ -1,5 +1,5 @@ - +
diff --git a/demo/templates/fragments/signup_form.html b/demo/templates/fragments/signup_form.html index 335ee64..9a7e43e 100644 --- a/demo/templates/fragments/signup_form.html +++ b/demo/templates/fragments/signup_form.html @@ -1,5 +1,5 @@ - +
diff --git a/demo/templates/fragments/user_details_form.html b/demo/templates/fragments/user_details_form.html new file mode 100644 index 0000000..405403b --- /dev/null +++ b/demo/templates/fragments/user_details_form.html @@ -0,0 +1,39 @@ + + + +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+ +
+ +
+
+ +
+
+ +
+
+ +
+ diff --git a/demo/templates/password_change.html b/demo/templates/password_change.html new file mode 100644 index 0000000..383dfc9 --- /dev/null +++ b/demo/templates/password_change.html @@ -0,0 +1,39 @@ +{% extends "base.html" %} + +{% block content %} + +
+
+ +
+ +

Token received after login

+
+
+
+ +
+

Update User Details


+ {% include "fragments/password_change_form.html" %} +
+{% endblock %} + +{% block script %} + +{% endblock %} diff --git a/demo/templates/password_reset_confirm.html b/demo/templates/password_reset_confirm.html index 09c6000..162cc35 100644 --- a/demo/templates/password_reset_confirm.html +++ b/demo/templates/password_reset_confirm.html @@ -6,3 +6,21 @@ {% include "fragments/password_reset_confirm_form.html" %}
{% endblock %} + + + +{% block script %} + +{% endblock %} diff --git a/demo/templates/signup.html b/demo/templates/signup.html index 4c5a909..0854683 100644 --- a/demo/templates/signup.html +++ b/demo/templates/signup.html @@ -6,18 +6,3 @@ {% include "fragments/signup_form.html" %}
{% endblock %} - -{% comment %} -{% block script %} - -{% endblock %} -{% endcomment %} diff --git a/demo/templates/user_details.html b/demo/templates/user_details.html new file mode 100644 index 0000000..42d19c5 --- /dev/null +++ b/demo/templates/user_details.html @@ -0,0 +1,58 @@ +{% extends "base.html" %} + +{% block content %} + +
+

Retrieve User Details


+
+ +
+ +

Token received after login

+
+ +
+
+ +
+

Update User Details


+ {% include "fragments/user_details_form.html" %} +
+{% endblock %} + +{% block script %} + +{% endblock %} From 28da4dc7c876fb7d8749ef31ff6b8847d8f71c78 Mon Sep 17 00:00:00 2001 From: Mateusz Sikora Date: Thu, 16 Oct 2014 13:31:25 +0200 Subject: [PATCH 5/5] add requirements in demo, update doc --- demo/requirements.pip | 3 +++ docs/demo.rst | 15 +++++++++++++++ docs/index.rst | 1 + 3 files changed, 19 insertions(+) create mode 100644 demo/requirements.pip create mode 100644 docs/demo.rst diff --git a/demo/requirements.pip b/demo/requirements.pip new file mode 100644 index 0000000..caf7db8 --- /dev/null +++ b/demo/requirements.pip @@ -0,0 +1,3 @@ +django==1.7 +django-rest-auth==0.3.0 +django-allauth==0.18.0 diff --git a/docs/demo.rst b/docs/demo.rst new file mode 100644 index 0000000..0482ffe --- /dev/null +++ b/docs/demo.rst @@ -0,0 +1,15 @@ +Demo project +============ + +To run demo project (ideally in virtualenv): + +.. code-block:: python + + cd /tmp + git clone git@github.com:Tivix/django-rest-auth.git + cd django-rest-auth/demo/ + pip install -r requirements.pip + python manage.py syncdb --settings=demo.settings --noinput + python manage.py runserver --settings=demo.settings + +Now, go to ``http://127.0.0.1:8000/`` in your browser. diff --git a/docs/index.rst b/docs/index.rst index a8a74ee..6f9547e 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -21,6 +21,7 @@ Contents Installation API endpoints Configuration + Demo project Changelog