'module' object has no attribute 'Manipulator'

433 views
Skip to first unread message

CareerDhaba tech

unread,
Jun 24, 2011, 4:00:28 PM6/24/11
to django...@googlegroups.com
Hey,

I am very new to Django just started working around with forms. I have been facing difficulty in getting a user registered. Anyways i was following steps given in James Bennet blog.

http://www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/

I have defined my classes, forms similar to whats given on the blog post.

Here is my traceback :
-----------------------------------------------------------------------------------
Environment:


Request Method: GET
Request URL: http://127.0.0.1:8000/cd/

Django Version: 1.3
Python Version: 2.7.1
Installed Applications:
['django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'django.contrib.admin',
 'registration']
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',
 'django.middleware.csrf.CsrfResponseMiddleware')


Template error:
In template c:\users\pradeep\desktop\cd\templates\index.html, error at line 6
   Caught AttributeError while rendering: 'module' object has no attribute 'Manipulator'
   1 : <html>


   2 : <head>


   3 : </head>


   4 : <body>


   5 : Hey you are on index page


   6 : <a href=" {% url registration %} ">Register</a>


   7 : </body>


   8 : </html>

Traceback:
File "C:\Python27\lib\site-packages\django\core\handlers\base.py" in get_response
  111.                         response = callback(request, *callback_args, **callback_kwargs)
File "C:\Users\pradeep\Desktop\cd\views.py" in indexPage
  8.     return direct_to_template(request, template='index.html')
File "C:\Python27\lib\site-packages\django\views\generic\simple.py" in direct_to_template
  28.     return HttpResponse(t.render(c), mimetype=mimetype)
File "C:\Python27\lib\site-packages\django\template\base.py" in render
  123.             return self._render(context)
File "C:\Python27\lib\site-packages\django\template\base.py" in _render
  117.         return self.nodelist.render(context)
File "C:\Python27\lib\site-packages\django\template\base.py" in render
  744.                 bits.append(self.render_node(node, context))
File "C:\Python27\lib\site-packages\django\template\debug.py" in render_node
  73.             result = node.render(context)
File "C:\Python27\lib\site-packages\django\template\defaulttags.py" in render
  437.             url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in reverse
  391.             *args, **kwargs)))
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in reverse
  312.         possibilities = self.reverse_dict.getlist(lookup_view)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_reverse_dict
  229.             self._populate()
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _populate
  208.                     for name in pattern.reverse_dict:
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_reverse_dict
  229.             self._populate()
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _populate
  197.         for pattern in reversed(self.url_patterns):
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_url_patterns
  279.         patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
File "C:\Python27\lib\site-packages\django\core\urlresolvers.py" in _get_urlconf_module
  274.             self._urlconf_module = import_module(self.urlconf_name)
File "C:\Python27\lib\site-packages\django\utils\importlib.py" in import_module
  35.     __import__(name)
File "C:\Users\pradeep\Desktop\cd\registration\urls.py" in <module>
  2. from registration import views
File "C:\Users\pradeep\Desktop\cd\registration\views.py" in <module>
  10. from registration.forms import UserForm, StateForm, CityForm, RegForm, LoginForm, UserSchoolForm, UserCollegeForm, UserUnivForm, UserCompanyForm
File "C:\Users\pradeep\Desktop\cd\registration\forms.py" in <module>
  15. class UserForm(forms.Manipulator):

Exception Type: TemplateSyntaxError at /cd/
Exception Value: Caught AttributeError while rendering: 'module' object has no attribute 'Manipulator'
 
------------------------------------------------------------------------------------------------

I tried using django-registration but couldn't figure out how everything works as i couldn't find good documentation or working examples using the same :( .

Glad if you people can help me out with this error and also if there is an easy way to use the default auth user table and also creating our own user profile.

Regards,
Pradeep

Jacob Kaplan-Moss

unread,
Jun 24, 2011, 4:21:08 PM6/24/11
to django...@googlegroups.com
On Fri, Jun 24, 2011 at 3:00 PM, CareerDhaba tech <te...@careerdhaba.com> wrote:
> I am very new to Django just started working around with forms. I have been
> facing difficulty in getting a user registered. Anyways i was following
> steps given in James Bennet blog.
>
> http://www.b-list.org/weblog/2006/sep/02/django-tips-user-registration/

This is an incredibly old example, and it's written using Django's old
form system. I suggest you start with the official docs:

https://docs.djangoproject.com/en/1.3/topics/forms/

In general, the official docs are going to be better than most of what
you find randomly online, especially for basic stuff like "how do I
use forms?" Try to get familiar with the official docs and how to move
around and find things in 'em and I think you'll find most of what
you're looking for there.

Jacob

CareerDhaba tech

unread,
Jun 24, 2011, 4:30:13 PM6/24/11
to django...@googlegroups.com
Thanks Jacob for the reply although u didn't answer giving a reason for the error. Well that's where i started, have gone through the basic docs for forms/models etc. I have worked with many other forms, all kinds of models of data and saving them to database etc. The only problem i am facing is while registering the user for the existing auth tables.

Its and old example i know but couldn't find any better ones where registration of the user is completely and given in detail.
 


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django...@googlegroups.com.
To unsubscribe from this group, send email to django-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.


Tim Shaffer

unread,
Jun 24, 2011, 5:31:14 PM6/24/11
to django...@googlegroups.com
On Friday, June 24, 2011 4:30:13 PM UTC-4, django_cd wrote:
Thanks Jacob for the reply although u didn't answer giving a reason for the error. 

The reason for the error is that you are using a different version of Django than that tutorial was written for.

That tutorial is from 2006 and probably using Django 0.95 or so. The current version (and the version you're using) is 1.3.

JDaniel

unread,
Jul 19, 2012, 5:28:23 AM7/19/12
to django...@googlegroups.com
You may autopopulate created_by field via admin interface following this guideline:


Hope it helps!
Reply all
Reply to author
Forward
0 new messages