hello group,
im a bloody django and python beginner and right now playing arround
with the code provided on
http://code.djangoproject.com/wiki/CookBookNewformsAdminAndUser
on storing the entry in the admin following error occur:
AttributeError at /admin/news/post/add/
'CommentFormFormSet' object has no attribute '__name__'
Request Method: POST
Request URL:
http://127.0.0.1:8000/admin/news/post/add/
Exception Type: AttributeError
Exception Value:
'CommentFormFormSet' object has no attribute '__name__'
Exception Location: /Users/hhanse/django/pct/../pct/news/admin.py in
save_formset, line 31
Python Executable: /System/Library/Frameworks/Python.framework/
Versions/2.5/Resources/Python.app/Contents/MacOS/Python
Python Version: 2.5.1
some more infos:
Environment:
Request Method: POST
Request URL:
http://127.0.0.1:8000/admin/news/post/add/
Django Version: 1.0.2 final
Python Version: 2.5.1
Installed Applications:
['django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.admin',
'tagging',
'pct.news']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware',
'django.middleware.locale.LocaleMiddleware',
'djangologging.middleware.LoggingMiddleware')
Traceback:
File "/Library/Python/2.5/site-packages/django/core/handlers/base.py"
in get_response
86. response = callback(request, *callback_args,
**callback_kwargs)
File "/Library/Python/2.5/site-packages/django/contrib/admin/sites.py"
in root
157. return self.model_page(request, *url.split('/',
2))
File "/Library/Python/2.5/site-packages/django/views/decorators/
cache.py" in _wrapped_view_func
44. response = view_func(request, *args, **kwargs)
File "/Library/Python/2.5/site-packages/django/contrib/admin/sites.py"
in model_page
176. return admin_obj(request, rest_of_url)
File "/Library/Python/2.5/site-packages/django/contrib/admin/
options.py" in __call__
191. return self.add_view(request)
File "/Library/Python/2.5/site-packages/django/db/transaction.py" in
_commit_on_success
238. res = func(*args, **kw)
File "/Library/Python/2.5/site-packages/django/contrib/admin/
options.py" in add_view
497. self.save_formset(request, form, formset,
change=False)
File "/Users/hhanse/django/pct/../pct/news/admin.py" in save_formset
31. if formset.__name__ == 'CommentInline':
Exception Type: AttributeError at /admin/news/post/add/
Exception Value: 'CommentFormFormSet' object has no attribute
'__name__'
i can't find the matter for this - please help!