Guest User

Untitled

a guest
Jul 30th, 2018
216
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.83 KB | None | 0 0
  1. CSRF verification failed. Request aborted. on django
  2. Forbidden (403)
  3. CSRF verification failed. Request aborted.
  4. Help
  5. Reason given for failure:
  6. CSRF token missing or incorrect.
  7.  
  8. INSTALLED_APPS = (
  9. 'django.contrib.auth',
  10. 'django.contrib.contenttypes',
  11. 'django.contrib.sessions',
  12. 'django.contrib.sites',
  13. 'django.contrib.messages',
  14. 'django.contrib.staticfiles',
  15. # Uncomment the next line to enable the admin:
  16. 'django.contrib.admin',
  17. # Uncomment the next line to enable admin documentation:
  18. # 'django.contrib.admindocs',
  19. 'djangocricket.Cricket',
  20. 'djangocricket.cms'
  21. )
  22.  
  23. urlpatterns = patterns('',
  24. # Examples:
  25. url(r'^$', 'djangocricket.Cricket.views.index', name='default'),
  26. url(r'^user/(w+)/$', 'djangocricket.Cricket.views.user_home', name='user home'),
  27. url(r'^login/$', 'django.contrib.auth.views.login'),
  28. # url(r'^djangocricket/', include('djangocricket.foo.urls')),
  29.  
  30. # Uncomment the admin/doc line below to enable admin documentation:
  31. #url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
  32.  
  33. # Uncomment the next line to enable the admin:
  34. url(r'^news/', 'djangocricket.cms.views.index', name='index'),
  35. #url(r'^news/(?P<slug>[^.]+).html', 'djangocricket.cms.views.detail', name='get_single_news_item'),
  36. url(r'^admin/', include(admin.site.urls)),
  37. )
  38.  
  39. <html>
  40. <head>
  41. <title>Django Bookmarks - User Login</title>
  42. </head>
  43. <h1>User Login</h1>
  44. {% if form.errors %}
  45. <p>Your username and password didn't match.
  46. Please try again.</p>
  47. {% endif %}
  48. <form method="post" action=".">
  49. <p><label for="id_username">Username:</label>
  50. {{ form.username }}</p>
  51. <p><label for="id_password">Password:</label>
  52. {{ form.password }}</p>
  53. <input type="hidden" name="next" value="/" />
  54. <input type="submit" value="login" />
  55. </form>
  56. </body>
  57. </html>
Add Comment
Please, Sign In to add comment