On 3/28/06, yml <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> As discussed above I spend mos of my evening learning about
> manipulator. I was pretty happy since it seems much more difficult than
> it is.
> This is what I thaught when I did the couple of examples I found  on
> the web.
>
> So what I did is generate the custom manipulator using the script that
> I found there: http://code.djangoproject.com/wiki/ManipulatorScript
>
> The first trouble I had was with radio_admin. Django for some reason
> was complaining about them. Here it is the message:

I think you can check the forms/__init__.py source code to see all
FormField defined in django and see which parameters used in each
FormField class.

> ++++++++++++++++++++++++++
> TypeError at /profiles/create_manip/
> __init__() got an unexpected keyword argument 'radio_admin'
> Request Method:         POST
> Request URL:    http://localhost:8000/profiles/create_manip/
> Exception Type:         TypeError
> Exception Value:        __init__() got an unexpected keyword argument
> 'radio_admin'
> Exception Location:
>         
> E:\instal\django\view_servicealapersonne\votreservice\..\votreservice\announceManager\views.py
> in __init__, line 58
> ++++++++++++++++++++++++++
> So I remove those keyword. Does someone can tell me what I should do to
> solve this?

And I see that SelectField has not a radio_admin parameter existed.


>     def save(self, new_data):
>         temp = Profile(
>             user=new_data['user'],
>             pseudo=new_data['pseudo'],
>             gender=new_data['gender'],
>             address=new_data['address'],
>             phonenumber=new_data['phonenumber'],
>
> want_to_publised_personal_info=new_data['want_to_publised_personal_info'],
>             memberShipLevel=new_data['memberShipLevel']
>         )
>         temp.set_localisation(newdata['localisation'])
>         temp.save()
>         return temp
> =================
> prodiles_form.py
> ============
>
> {% block content %}
> {% block js %}
> <script type="text/javascript" src="/admin/jsi18n/"></script>
> <script type="text/javascript" src="/media/js/core.js">
> </script><script type="text/javascript"
> src="/media/js/admin/RelatedObjectLookups.js">
> </script><script type="text/javascript" src="/media/js/calendar.js">
> </script><script type="text/javascript"
> src="/media/js/admin/DateTimeShortcuts.js"></script>
> </script><script type="text/javascript"
> src="/media/js/SelectBox.js"></script>
> </script><script type="text/javascript"
> src="/media/js/SelectFilter2.js"></script>
>
> {% endblock %}
>
> {% if object %}
> <h1>Update Profile:</h1>
> {% else %}
> <h1>Create a Profile</h1>
> {% endif %}
>
> {% if form.has_errors %}
> <h2>Please correct the following error{{ form.errors|pluralize }}:</h2>
> {% endif %}
>
> <form method="POST" action=".">
>   <p>
>     <label for="id_user">User:</label>
>     {{ form.user }}
>     {% if form.user.errors %}
>       *** {{ form.user.errors|join:", " }}
>     {% endif %}
>   </p>
>     <p>
>     <label for="id_pseudo">pseudo:</label>
>     {{ form.pseudo }}
>     {% if form.pseudo.errors %}
>       *** {{ form.pseudo.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_gender">gender:</label>
>     {{ form.gender }}
>     {% if form.gender.errors %}
>       *** {{ form.gender.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_address">address:</label>
>     {{ form.address }}
>     {% if form.address.errors %}
>       *** {{ form.address.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_phonenumber">phonenumber:</label>
>     {{ form.phonenumber }}
>     {% if form.phonenumber.errors %}
>       *** {{ form.phonenumber.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_want_to_publised_personal_info">want to publised
> personal info:</label>
>     {{ form.want_to_publised_personal_info }}
>     {% if form.want_to_publised_personal_info.errors %}
>       *** {{ form.want_to_publised_personal_info.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_localisation">localisation:</label>
>     {{ form.localisation }}
>     {% if form.localisation.errors %}
>       *** {{ form.localisation.errors|join:", " }}
>     {% endif %}
>   </p>
>   <p>
>     <label for="id_memberShipLevel">membership:</label>
>     {{ form.memberShipLevel }}
>     {% if form.memberShipLevel.errors %}
>       *** {{ form.memberShipLevel.errors|join:", " }}
>     {% endif %}
>   </p>
> <input type="submit" value="submit" />
> </form>
>
> {% endblock %}
>
> ==========================
> The error I am getting
> ===================
> Traceback (most recent call last):
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\servers\basehttp.py",
> line 272, in run
>     self.result = application(self.environ, self.start_response)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\servers\basehttp.py",
> line 615, in __call__
>     return self.application(environ, start_response)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\handlers\wsgi.py",
> line 155, in __call__
>     response = self.get_response(request.path, request)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\handlers\base.py",
> line 109, in get_response
>     return self.get_technical_error_response(request)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\handlers\base.py",
> line 139, in get_technical_error_response
>     return debug.technical_500_response(request, *sys.exc_info())
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\views\debug.py",
> line 126, in technical_500_response
>     return HttpResponseServerError(t.render(c), mimetype='text/html')
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\__init__.py",
> line 146, in render
>     return self.nodelist.render(context)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\__init__.py",
> line 707, in render
>     bits.append(self.render_node(node, context))
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\__init__.py",
> line 725, in render_node
>     result = node.render(context)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\defaulttags.py",
> line 112, in render
>     nodelist.append(node.render(context))
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\defaulttags.py",
> line 179, in render
>     return self.nodelist_true.render(context)
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\__init__.py",
> line 707, in render
>     bits.append(self.render_node(node, context))
>
>   File
> "c:\python24\lib\site-packages\django-0.91-py2.4.egg\django\core\template\__init__.py",
> line 735, in render_node
>     raise wrapped
>
> TemplateSyntaxError: Caught an exception while rendering.
>
>
There seems a template bug when render the template, but I cann't find
it for now.
>
> I hope that I gave you all the needed information to help me.
>
> Thank you for your time and support.
>

--
I like python!
My Blog: http://www.donews.net/limodou
NewEdit Maillist: http://groups.google.com/group/NewEdit

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

Reply via email to