Guest User

Untitled

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