*its give a forbidden error* *by dhaval joshi* 
New <http://dpaste.com/> Yours <http://dpaste.com/yours/> API 
<http://dpaste.com/api/v2/> Help <http://dpaste.com/help/> 
  6.1 KB, *Python 2*
     Soft wrap Raw text <http://dpaste.com/142N0TG.txt> Duplicate 
<http://dpaste.com/142N0TG/duplicate/> Delete 
<http://dpaste.com/142N0TG/delete/> Change expiry 
<http://dpaste.com/142N0TG/expiry/> 
 
  1 <http://dpaste.com/142N0TG#line-1>  2 <http://dpaste.com/142N0TG#line-2>  3 
<http://dpaste.com/142N0TG#line-3>  4 <http://dpaste.com/142N0TG#line-4>  5 
<http://dpaste.com/142N0TG#line-5>  6 <http://dpaste.com/142N0TG#line-6>  7 
<http://dpaste.com/142N0TG#line-7>  8 <http://dpaste.com/142N0TG#line-8>  9 
<http://dpaste.com/142N0TG#line-9> 10 <http://dpaste.com/142N0TG#line-10> 11 
<http://dpaste.com/142N0TG#line-11> 12 <http://dpaste.com/142N0TG#line-12> 13 
<http://dpaste.com/142N0TG#line-13> 14 <http://dpaste.com/142N0TG#line-14> 15 
<http://dpaste.com/142N0TG#line-15> 16 <http://dpaste.com/142N0TG#line-16> 17 
<http://dpaste.com/142N0TG#line-17> 18 <http://dpaste.com/142N0TG#line-18> 19 
<http://dpaste.com/142N0TG#line-19> 20 <http://dpaste.com/142N0TG#line-20> 21 
<http://dpaste.com/142N0TG#line-21> 22 <http://dpaste.com/142N0TG#line-22> 23 
<http://dpaste.com/142N0TG#line-23> 24 <http://dpaste.com/142N0TG#line-24> 25 
<http://dpaste.com/142N0TG#line-25> 26 <http://dpaste.com/142N0TG#line-26> 27 
<http://dpaste.com/142N0TG#line-27> 28 <http://dpaste.com/142N0TG#line-28> 29 
<http://dpaste.com/142N0TG#line-29> 30 <http://dpaste.com/142N0TG#line-30> 31 
<http://dpaste.com/142N0TG#line-31> 32 <http://dpaste.com/142N0TG#line-32> 33 
<http://dpaste.com/142N0TG#line-33> 34 <http://dpaste.com/142N0TG#line-34> 35 
<http://dpaste.com/142N0TG#line-35> 36 <http://dpaste.com/142N0TG#line-36> 37 
<http://dpaste.com/142N0TG#line-37> 38 <http://dpaste.com/142N0TG#line-38> 39 
<http://dpaste.com/142N0TG#line-39> 40 <http://dpaste.com/142N0TG#line-40> 41 
<http://dpaste.com/142N0TG#line-41> 42 <http://dpaste.com/142N0TG#line-42> 43 
<http://dpaste.com/142N0TG#line-43> 44 <http://dpaste.com/142N0TG#line-44> 45 
<http://dpaste.com/142N0TG#line-45> 46 <http://dpaste.com/142N0TG#line-46> 47 
<http://dpaste.com/142N0TG#line-47> 48 <http://dpaste.com/142N0TG#line-48> 49 
<http://dpaste.com/142N0TG#line-49> 50 <http://dpaste.com/142N0TG#line-50> 51 
<http://dpaste.com/142N0TG#line-51> 52 <http://dpaste.com/142N0TG#line-52> 53 
<http://dpaste.com/142N0TG#line-53> 54 <http://dpaste.com/142N0TG#line-54> 55 
<http://dpaste.com/142N0TG#line-55> 56 <http://dpaste.com/142N0TG#line-56> 57 
<http://dpaste.com/142N0TG#line-57> 58 <http://dpaste.com/142N0TG#line-58> 59 
<http://dpaste.com/142N0TG#line-59> 60 <http://dpaste.com/142N0TG#line-60> 61 
<http://dpaste.com/142N0TG#line-61> 62 <http://dpaste.com/142N0TG#line-62> 63 
<http://dpaste.com/142N0TG#line-63> 64 <http://dpaste.com/142N0TG#line-64> 65 
<http://dpaste.com/142N0TG#line-65> 66 <http://dpaste.com/142N0TG#line-66> 67 
<http://dpaste.com/142N0TG#line-67> 68 <http://dpaste.com/142N0TG#line-68> 69 
<http://dpaste.com/142N0TG#line-69> 70 <http://dpaste.com/142N0TG#line-70> 71 
<http://dpaste.com/142N0TG#line-71> 72 <http://dpaste.com/142N0TG#line-72> 73 
<http://dpaste.com/142N0TG#line-73> 74 <http://dpaste.com/142N0TG#line-74> 75 
<http://dpaste.com/142N0TG#line-75> 76 <http://dpaste.com/142N0TG#line-76> 77 
<http://dpaste.com/142N0TG#line-77> 78 <http://dpaste.com/142N0TG#line-78> 79 
<http://dpaste.com/142N0TG#line-79> 80 <http://dpaste.com/142N0TG#line-80> 81 
<http://dpaste.com/142N0TG#line-81> 82 <http://dpaste.com/142N0TG#line-82> 83 
<http://dpaste.com/142N0TG#line-83> 84 <http://dpaste.com/142N0TG#line-84> 85 
<http://dpaste.com/142N0TG#line-85> 86 <http://dpaste.com/142N0TG#line-86> 87 
<http://dpaste.com/142N0TG#line-87> 88 <http://dpaste.com/142N0TG#line-88> 89 
<http://dpaste.com/142N0TG#line-89> 90 <http://dpaste.com/142N0TG#line-90> 91 
<http://dpaste.com/142N0TG#line-91> 92 <http://dpaste.com/142N0TG#line-92> 93 
<http://dpaste.com/142N0TG#line-93> 94 <http://dpaste.com/142N0TG#line-94> 95 
<http://dpaste.com/142N0TG#line-95> 96 <http://dpaste.com/142N0TG#line-96> 97 
<http://dpaste.com/142N0TG#line-97> 98 <http://dpaste.com/142N0TG#line-98> 99 
<http://dpaste.com/142N0TG#line-99>100 <http://dpaste.com/142N0TG#line-100>101 
<http://dpaste.com/142N0TG#line-101>102 <http://dpaste.com/142N0TG#line-102>103 
<http://dpaste.com/142N0TG#line-103>104 <http://dpaste.com/142N0TG#line-104>105 
<http://dpaste.com/142N0TG#line-105>106 <http://dpaste.com/142N0TG#line-106>107 
<http://dpaste.com/142N0TG#line-107>108 <http://dpaste.com/142N0TG#line-108>109 
<http://dpaste.com/142N0TG#line-109>110 <http://dpaste.com/142N0TG#line-110>111 
<http://dpaste.com/142N0TG#line-111>112 <http://dpaste.com/142N0TG#line-112>113 
<http://dpaste.com/142N0TG#line-113>114 <http://dpaste.com/142N0TG#line-114>115 
<http://dpaste.com/142N0TG#line-115>116 <http://dpaste.com/142N0TG#line-116>117 
<http://dpaste.com/142N0TG#line-117>118 <http://dpaste.com/142N0TG#line-118>119 
<http://dpaste.com/142N0TG#line-119>120 <http://dpaste.com/142N0TG#line-120>121 
<http://dpaste.com/142N0TG#line-121>122 <http://dpaste.com/142N0TG#line-122>123 
<http://dpaste.com/142N0TG#line-123>124 <http://dpaste.com/142N0TG#line-124>125 
<http://dpaste.com/142N0TG#line-125>126 <http://dpaste.com/142N0TG#line-126>127 
<http://dpaste.com/142N0TG#line-127>128 <http://dpaste.com/142N0TG#line-128>129 
<http://dpaste.com/142N0TG#line-129>130 <http://dpaste.com/142N0TG#line-130>131 
<http://dpaste.com/142N0TG#line-131>132 <http://dpaste.com/142N0TG#line-132>133 
<http://dpaste.com/142N0TG#line-133>134 <http://dpaste.com/142N0TG#line-134>135 
<http://dpaste.com/142N0TG#line-135>136 <http://dpaste.com/142N0TG#line-136>137 
<http://dpaste.com/142N0TG#line-137>138 <http://dpaste.com/142N0TG#line-138>139 
<http://dpaste.com/142N0TG#line-139>140 <http://dpaste.com/142N0TG#line-140>141 
<http://dpaste.com/142N0TG#line-141>142 <http://dpaste.com/142N0TG#line-142>143 
<http://dpaste.com/142N0TG#line-143>144 <http://dpaste.com/142N0TG#line-144>145 
<http://dpaste.com/142N0TG#line-145>146 <http://dpaste.com/142N0TG#line-146>147 
<http://dpaste.com/142N0TG#line-147>148 <http://dpaste.com/142N0TG#line-148>149 
<http://dpaste.com/142N0TG#line-149>150 <http://dpaste.com/142N0TG#line-150>151 
<http://dpaste.com/142N0TG#line-151>152 <http://dpaste.com/142N0TG#line-152>153 
<http://dpaste.com/142N0TG#line-153>154 <http://dpaste.com/142N0TG#line-154>155 
<http://dpaste.com/142N0TG#line-155>156 <http://dpaste.com/142N0TG#line-156>157 
<http://dpaste.com/142N0TG#line-157>158 <http://dpaste.com/142N0TG#line-158>159 
<http://dpaste.com/142N0TG#line-159>160 <http://dpaste.com/142N0TG#line-160>161 
<http://dpaste.com/142N0TG#line-161>162 <http://dpaste.com/142N0TG#line-162>163 
<http://dpaste.com/142N0TG#line-163>164 <http://dpaste.com/142N0TG#line-164>165 
<http://dpaste.com/142N0TG#line-165>166 <http://dpaste.com/142N0TG#line-166>167 
<http://dpaste.com/142N0TG#line-167>168 <http://dpaste.com/142N0TG#line-168>169 
<http://dpaste.com/142N0TG#line-169>170 <http://dpaste.com/142N0TG#line-170>171 
<http://dpaste.com/142N0TG#line-171>172 <http://dpaste.com/142N0TG#line-172>173 
<http://dpaste.com/142N0TG#line-173>174 <http://dpaste.com/142N0TG#line-174>175 
<http://dpaste.com/142N0TG#line-175>176 <http://dpaste.com/142N0TG#line-176>177 
<http://dpaste.com/142N0TG#line-177>178 <http://dpaste.com/142N0TG#line-178>179 
<http://dpaste.com/142N0TG#line-179>180 <http://dpaste.com/142N0TG#line-180>181 
<http://dpaste.com/142N0TG#line-181>182 <http://dpaste.com/142N0TG#line-182>183 
<http://dpaste.com/142N0TG#line-183>184 <http://dpaste.com/142N0TG#line-184>185 
<http://dpaste.com/142N0TG#line-185>186 <http://dpaste.com/142N0TG#line-186>187 
<http://dpaste.com/142N0TG#line-187>188 <http://dpaste.com/142N0TG#line-188>189 
<http://dpaste.com/142N0TG#line-189>190 <http://dpaste.com/142N0TG#line-190>191 
<http://dpaste.com/142N0TG#line-191>192 <http://dpaste.com/142N0TG#line-192>193 
<http://dpaste.com/142N0TG#line-193>194 <http://dpaste.com/142N0TG#line-194>195 
<http://dpaste.com/142N0TG#line-195>196 <http://dpaste.com/142N0TG#line-196>197 
<http://dpaste.com/142N0TG#line-197>198 <http://dpaste.com/142N0TG#line-198>199 
<http://dpaste.com/142N0TG#line-199>200 <http://dpaste.com/142N0TG#line-200>201 
<http://dpaste.com/142N0TG#line-201>202 <http://dpaste.com/142N0TG#line-202>203 
<http://dpaste.com/142N0TG#line-203>204 <http://dpaste.com/142N0TG#line-204>205 
<http://dpaste.com/142N0TG#line-205>206 <http://dpaste.com/142N0TG#line-206>207 
<http://dpaste.com/142N0TG#line-207>208 <http://dpaste.com/142N0TG#line-208>209 
<http://dpaste.com/142N0TG#line-209>210 <http://dpaste.com/142N0TG#line-210>211 
<http://dpaste.com/142N0TG#line-211>212 <http://dpaste.com/142N0TG#line-212>213 
<http://dpaste.com/142N0TG#line-213>214 <http://dpaste.com/142N0TG#line-214>215 
<http://dpaste.com/142N0TG#line-215>216 <http://dpaste.com/142N0TG#line-216>217 
<http://dpaste.com/142N0TG#line-217>218 <http://dpaste.com/142N0TG#line-218>219 
<http://dpaste.com/142N0TG#line-219>220 <http://dpaste.com/142N0TG#line-220>221 
<http://dpaste.com/142N0TG#line-221>222 <http://dpaste.com/142N0TG#line-222>223 
<http://dpaste.com/142N0TG#line-223>224 <http://dpaste.com/142N0TG#line-224>225 
<http://dpaste.com/142N0TG#line-225>226 <http://dpaste.com/142N0TG#line-226>227 
<http://dpaste.com/142N0TG#line-227>

Forbidden (403)CSRF verification failed. Request aborted.HelpReason given for 
failure:    CSRF token missing or incorrect.    In general, this can occur when 
there is a genuine Cross Site Request Forgery, or when Django's CSRF mechanism 
has not been used correctly. For POST forms, you need to ensure:    Your 
browser is accepting cookies.    The view function passes a request to the 
template's render method.    In the template, there is a {% csrf_token %} 
template tag inside each POST form that targets an internal URL.    If you are 
not using CsrfViewMiddleware, then you must use csrf_protect on any views that 
use the csrf_token template tag, as well as those that accept the POST 
data.You're seeing the help section of this page because you have DEBUG = True 
in your Django settings file. Change that to False, and only the initial error 
message will be displayed.You can customize this page using the 
CSRF_FAILURE_VIEW setting.this error is accurd what to do for solve 
iturl.pyfrom django.conf.urls import patterns, include, urlfrom django.contrib 
import adminurlpatterns = patterns('',    # Examples:    # url(r'^$', 
'mbrsgvp.views.home', name='home'),    # url(r'^blog/', include('blog.urls')),  
  url(r'^admin/', include(admin.site.urls)),    url(r'^$', 'mbrs.views.home'),  
  url(r'^log/', 'mbrs.views.log'),)views.pyfrom django.shortcuts import 
render,HttpResponse,render_to_responsefrom .models import logindef 
home(request):    return render_to_response('home.html')def log(request):       
  q=login("123","1423")    q.save    return HttpResponse("success")html 
template<!DOCTYPE html>{% load staticfiles %}<html lang="en">  <head>         
<link rel="stylesheet" type="text/css" href="{% static 'engine1/style.css' %}" 
/></head><body><div id="navbar" class="navbar-collapse collapse">               
                 {% block content %}                             <form 
class="navbar-form navbar-right" action="log/" method="post">                   
                  {% csrf_token %}                                        
<input type="hidden" name="csrfmiddlewaretoken" value="{{ csrf_token }}">       
                                <div class="form-group form-group-sm">          
                                <div>                                           
        <p style="color:white">                                                 
                                                                </p>            
                                </div>                                          
<div class="input-group">                                                       
<span class="input-group-addon">Employee ID</span>                              
                        <input type="text" class="form-control" 
id="inputGroupSuccess1" aria-describedby="inputGroupSuccess1Status" 
placeholder="Your Employee Id">                                             
</div>                                          <div class="input-group">       
                                                <span 
class="input-group-addon">Password</span>                                       
          <input type="password" placeholder="Your Password" 
class="form-control">                                                </div>     
                                     <div class="input-group">                  
                                     <button type="submit" class="btn 
btn-success"><span class="glyphicon glyphicon-lock" aria-hidden="true"></span> 
Log in</button>                                         </div>                  
                        <div class="input-group">                               
                        <a href="#myModalLabel">                                
                                <button type="button" class="btn btn-default" 
><span class="glyphicon glyphicon-user" aria-hidden="true"></span>Sign 
up</button>                                                        </a>         
                                   </div>                                  
</div>                          </form>                         {% endblock %}  
                </div></body></html>admin.py"""Django settings for mbrsgvp 
project.For more information on this file, 
seehttps://docs.djangoproject.com/en/1.7/topics/settings/For the full list of 
settings and their values, 
seehttps://docs.djangoproject.com/en/1.7/ref/settings/"""# Build paths inside 
the project like this: os.path.join(BASE_DIR, ...)import osBASE_DIR = 
os.path.dirname(os.path.dirname(__file__))# Quick-start development settings - 
unsuitable for production# See 
https://docs.djangoproject.com/en/1.7/howto/deployment/checklist/# SECURITY 
WARNING: keep the secret key used in production secret!SECRET_KEY = 
'cc#6($5ix#vpzqj@#8$cl)pd4pia6v*_k-8!5&=5za9v6d2k2h'# SECURITY WARNING: don't 
run with debug turned on in production!DEBUG = TrueTEMPLATE_DEBUG = 
TrueALLOWED_HOSTS = []# Application definitionINSTALLED_APPS = (    
'django.contrib.admin',    'django.contrib.auth',    
'django.contrib.contenttypes',    'django.contrib.sessions',    
'django.contrib.messages',    'django.contrib.staticfiles',    
'mbrs',)MIDDLEWARE_CLASSES = (    
'django.contrib.sessions.middleware.SessionMiddleware',    
'django.middleware.common.CommonMiddleware',    
'django.middleware.csrf.CsrfViewMiddleware',    
'django.contrib.auth.middleware.AuthenticationMiddleware',    
'django.contrib.auth.middleware.SessionAuthenticationMiddleware',    
'django.contrib.messages.middleware.MessageMiddleware',    
'django.middleware.clickjacking.XFrameOptionsMiddleware',)ROOT_URLCONF = 
'mbrsgvp.urls'WSGI_APPLICATION = 'mbrsgvp.wsgi.application'# Database# 
https://docs.djangoproject.com/en/1.7/ref/settings/#databasesDATABASES = {    
'default': {        'ENGINE': 'django.db.backends.postgresql_psycopg2',        
'NAME': 'student',        'USER': 'gvpmca',        'PASSWORD': '123456',        
'HOST': 'localhost',        'PORT': '5432',         }}TEMPLATES = [    {        
'BACKEND': 'django.template.backends.django.DjangoTemplates',        'DIRS': [ 
os.path.join(BASE_DIR,'templates'),],        'APP_DIRS': True,        
'OPTIONS': {            'context_processors': [                
'django.template.context_processors.debug',                
'django.template.context_processors.request',                
'django.contrib.auth.context_processors.auth',                
'django.contrib.messages.context_processors.messages',            ],        },  
  },]# Internationalization# 
https://docs.djangoproject.com/en/1.7/topics/i18n/LANGUAGE_CODE = 
'en-us'TIME_ZONE = 'UTC'USE_I18N = TrueUSE_L10N = TrueUSE_TZ = True# Static 
files (CSS, JavaScript, Images)# 
https://docs.djangoproject.com/en/1.7/howto/static-files/#STATIC_URL = 
'/static/'STATIC_URL = '/static/'STATICFILES_DIRS = (                    
os.path.join(BASE_DIR,'static'),                     )TEMPLATE_DIRS =(    
os.path.join(BASE_DIR,'templates'),    ) 

 Pasted now — Expires in *30 days* 
 About dpaste.com <http://dpaste.com/about/> 

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/5e111cb0-cb21-4dd3-ad18-47d2a21691a3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to