Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9120055
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T05:32:36+00:00 2026-06-17T05:32:36+00:00

My form code: class PlanForm(forms.Form): a = forms.CharField(widget=forms.TextInput(attrs={class, add-up})) b = forms.CharField(widget=forms.TextInput(attrs={class, add-up})) class

  • 0

My form code:

class PlanForm(forms.Form):
    a = forms.CharField(widget=forms.TextInput(attrs={"class", "add-up"}))
    b = forms.CharField(widget=forms.TextInput(attrs={"class", "add-up"}))

    class Media:
        javascript=('test.js', )

My View Code:

def plan_detail(request):
    if request.method == "POST":
        return render(request=request,
                  template_name='pasteur/plan_detail.html',
                      dictionary={ 'message': 'This was a post request. WTF!' })
    else:
        return render(request=request,
                  template_name='pasteur/plan_detail.html',
                      dictionary={ 'form': PlanForm() })

Stack Trace:

environment:

Request Method: GET Request URL:

Django Version: 1.4 Python Version: 2.7.2 Installed Applications:
(‘django.contrib.auth’, ‘django.contrib.contenttypes’,
‘django.contrib.sessions’, ‘django.contrib.sites’,
‘django.contrib.messages’, ‘django.contrib.staticfiles’,
‘django.contrib.admin’, ‘django.contrib.admindocs’, ‘south’,
‘pasteur’) Installed Middleware:
(‘django.middleware.common.CommonMiddleware’,
‘django.contrib.sessions.middleware.SessionMiddleware’,
‘django.middleware.csrf.CsrfViewMiddleware’,
‘django.contrib.auth.middleware.AuthenticationMiddleware’,
‘django.contrib.messages.middleware.MessageMiddleware’)

Template error: In template
/Users/judithjacques/dana/dev/pasteur/src/pasteur/templates/pasteur/plan_detail.html,
error at line 8 ‘set’ object has no attribute ‘get’ 1 :

Traceback: File
“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/core/handlers/base.py”
in get_response
111. response = callback(request, *callback_args, **callback_kwargs) File “/Users/judithjacques/dana/dev/pasteur/src/pasteur/views.py” in
plan_detail
13. dictionary={ ‘form’: form }) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/shortcuts/init.py”
in render
44. return HttpResponse(loader.render_to_string(*args, **kwargs), File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/loader.py”
in render_to_string
176. return t.render(context_instance) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in render
140. return self._render(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in _render
134. return self.nodelist.render(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in render
823. bit = self.render_node(node, context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/debug.py”
in render_node
74. return node.render(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/defaulttags.py”
in render
281. return nodelist.render(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in render
823. bit = self.render_node(node, context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/debug.py”
in render_node
74. return node.render(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/debug.py”
in render
84. output = self.filter_expression.resolve(context) File
“/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in resolve
571. obj = self.var.resolve(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in resolve
721. value = self._resolve_lookup(context) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/template/base.py”
in _resolve_lookup
772. current = current() File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/forms/forms.py”
in as_ul
229. errors_on_separate_row = False) File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/forms/forms.py”
in _html_output
171. label = bf.label_tag(label) or ” File “/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/django/forms/forms.py”
in label_tag
508. id_ = widget.attrs.get(‘id’) or self.auto_id

Exception Type: AttributeError at /pasteur/plan/create/ Exception
Value: ‘set’ object has no attribute ‘get’

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T05:32:38+00:00Added an answer on June 17, 2026 at 5:32 am

    As the error says, {"class", "add-up"} is a set. You need a dictionary: {"class": "add-up"}.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have the following form code: # forms.py class SomeForm(forms.Form): hello = forms.CharField(max_length=40) world
I have this code class ObjectCreate(CreateView): def form_valid(self, form): I want to know that
I've got a bit of Django form code that looks like this: class GalleryAdminForm(forms.ModelForm):
The below class inherits from the Textarea widget and features javascript code that displays
I have the following form code: class DisplaySharerForm(forms.Form): ORDER_BY_CHOICES = ( ('customer_sharer_identifier', 'customer_sharer_identifier'), ('action_count',
i'm using a form with a TypeChoiceField, this is the form's code: class AnagraficaForm(forms.Form):
i saw a example for login form same blow code class Form_Login extends Zend_Form
I have a function definition of the following form (within a large code): class
With this code: public partial class Form1 : Form { private static readonly int
here is what my code looks like i have two forms: class Form_1 extends

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.