在 05-12-24,风尘无限<[EMAIL PROTECTED]> 写道:
>
> 对于非英语的Django用户/爱好者,对每一个"app"也加入一个"verbose_name"或"verbose_name_plural",以便于WEB
> PAGE的友好好浏览是必要的。
>
> 我的实现方式:
> 一、修改adminapplist.py为:
>
> from django.core import template
>
> class AdminApplistNode(template
对于非英语的Django用户/爱好者,对每一个"app"也加入一个"verbose_name"或"verbose_name_plural",以便于WEB
PAGE的友好好浏览是必要的。
我的实现方式:
一、修改adminapplist.py为:
from django.core import template
class AdminApplistNode(template.Node):
def __init__(self, varname):
self.va
Hi,
You don't have a manipulator.flatten_data() call in your view. This is
what fills in those fields.
Take a look at django.contrib.admin.views.main.change_stage to see how
it is used.
-rob
Robert,
Thank you. I checked the link and made the changes in my source.
That is a pity that the doc is not up-to-date.
Regards,
L.
PythonistL wrote:
> Robert,
> Thank you for your reply.
> I am not still an expert( only a beginner) on Django. I tried to copy
> the example from
> http://www.djangoproject.com/documentation/forms/
> and there was no mention about manipulator.flatten_data() .
> Is there any example /description
Robert,
Thank you for your reply.
I am not still an expert( only a beginner) on Django. I tried to copy
the example from
http://www.djangoproject.com/documentation/forms/
and there was no mention about manipulator.flatten_data() .
Is there any example /description how to use manipulator.flatten_d
PythonistL wrote:
> Robert,
> no manipulator.flatten_data() is not nescessary for that.
But, it is extremely stupid not to use it, because that will cause your
form to break if you use any of a wide number of features : foreignkeys,
dates, inline editing, raw_id admin, etc etc. It pretty much
Robert,
no manipulator.flatten_data() is not nescessary for that.
Meanwhile I solved the problem.
The reason why it did not work was the fact that I used
in my template
name="{{Login}}"
instead of
{{form.Login}}
only.
Thank you all for your time and help
regards,
L.
> (FYI, the method I was referring to is created by "magic", and has
> probably already been removed from the magic-removal branch. It is
> django.core.meta.manipulator_flatten_data(), but since this is tied so
> closely into the admin code it probably wouldn't do much for you. Sorry
> to send you
Rob,
Thank you for your reply.
But I am passing the parameters ( the all form's values) like this
return render_to_response('board/TestCreateUserForm', {'form': form})
but stil does not work that is
the form fields do NOT
contain the current values of the object when editing.
But why?
Thank
PythonistL says:
> There is no command like
> new_data = manipulator.flatten_data()
Ahh, woops!
I've had my head in admin code so much lately I forgot this wasn't a
standard manipulator method.
(FYI, the method I was referring to is created by "magic", and has
probably already been removed from t
Rob,
I made my posted sample according to the example at
http://www.djangoproject.com/documentation/forms/
There is no command like
new_data = manipulator.flatten_data()
only
new_data = user.__dict__
Eventhough I tried manipulator.flatten_data(), it did not help.
So, where is the problem then.
T
12 matches
Mail list logo