Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

KeyError at /course/relate-sample/grant-exception/171/exam-1/3516/ #25

Closed
dzhuang opened this issue Jun 6, 2015 · 3 comments
Closed

Comments

@dzhuang
Copy link
Contributor

dzhuang commented Jun 6, 2015

'set_access_rules_tag'

Request Method: POST
Request URL:    http://127.0.0.1:8000/course/relate-sample/grant-exception/171/exam-1/3516/
Django Version: 1.8.1
Exception Type: KeyError
Exception Value:    
'set_access_rules_tag'
Exception Location: E:\git-trial\course\relate\course\views.py in grant_exception_stage_3, line 786
Python Executable:  d:\Python27\python.exe
Python Version: 2.7.9

git SHA: 316742d

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/course/relate-sample/grant-exception/171/exam-1/3516/

Django Version: 1.8.1
Python Version: 2.7.9
Installed Applications:
('django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'course',
 'crispy_forms',
 'jsonfield',
 'bootstrap3_datetime',
 'djangobower')
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',
 'course.auth.ImpersonateMiddleware')


Traceback:
File "d:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  132.                     response = wrapped_callback(request, *callback_args, **callback_kwargs)
File "E:\git-trial\course\relate\course\utils.py" in wrapper
  434.         return f(pctx, *args, **kwargs)
File "d:\Python27\lib\site-packages\django\utils\decorators.py" in inner
  145.                     return func(*args, **kwargs)
File "E:\git-trial\course\relate\course\views.py" in grant_exception_stage_3
  786.             new_access_rules_tag = form.cleaned_data["set_access_rules_tag"]

Exception Type: KeyError at /course/relate-sample/grant-exception/171/exam-1/3516/
Exception Value: 'set_access_rules_tag'

@dzhuang
Copy link
Contributor Author

dzhuang commented Jun 9, 2015

The errors seems to be the dict form.cleaned_data doesn't have a key named set_access_rules_tag while it is visited.

BTW, I am wondering where to set the tags for access rules, manually? . I can only use <<<NONE>>>, while it seem there can be more options.

@dzhuang
Copy link
Contributor Author

dzhuang commented Jun 11, 2015

Thank you :)

@dzhuang
Copy link
Contributor Author

dzhuang commented Jun 11, 2015

It works like a charm. Thanks again!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant