Typically, that indicates a permissions problem.  Are you signed in to your 
app?  Does the account you are signed into have permissions to access that URL? 
 Check your decorators.

From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of mohammad
Sent: Thursday, January 11, 2018 8:11 AM
To: Django users
Subject: HTTP Error 403: Forbidden

hi,  i try to submit a form but it gives me this err
if any one can help me

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/images/create/

Django Version: 1.8.6
Python Version: 3.6.1
Installed Applications:
('django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'account',
 'django.contrib.admin',
 'social.apps.django_app.default',
 'images',
 'medic',
 'sorl.thumbnail')
Installed Middleware:
('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',
 'django.middleware.security.SecurityMiddleware')


Traceback:
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\core\handlers\base.py"
 in get_response
  132.                     response = wrapped_callback(request, *callback_args, 
**callback_kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\lib\site-packages\django\contrib\auth\decorators.py"
 in _wrapped_view
  22.                 return view_func(request, *args, **kwargs)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\views.py"
 in image_create
  47.             new_item = form.save(commit=False)
File 
"C:\Users\mohammad\Documents\Scripts\dj_env\Packt.Django.By.Example.2015\env\bookmarks\bookmarks\images\forms.py"
 in save
  28.         response = request.urlopen(image_url)
File "c:\python\Lib\urllib\request.py" in urlopen
  223.     return opener.open(url, data, timeout)
File "c:\python\Lib\urllib\request.py" in open
  532.             response = meth(req, response)
File "c:\python\Lib\urllib\request.py" in http_response
  642.                 'http', request, response, code, msg, hdrs)
File "c:\python\Lib\urllib\request.py" in error
  570.             return self._call_chain(*args)
File "c:\python\Lib\urllib\request.py" in _call_chain
  504.             result = func(*args)
File "c:\python\Lib\urllib\request.py" in http_error_default
  650.         raise HTTPError(req.full_url, code, msg, hdrs, fp)

Exception Type: HTTPError at /images/create/
Exception Value: HTTP Error 403: Forbidden
--
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 
django-users+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/4a1387e6-5a74-47cf-9134-149fbbd14ecf%40googlegroups.com<https://groups.google.com/d/msgid/django-users/4a1387e6-5a74-47cf-9134-149fbbd14ecf%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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 django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/268bcdadc5bd471a85059f61a619d445%40ISS1.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

Reply via email to