The Django Book is a useful general introduction; but now more than 2
years old. In a framework like Django, which is under constant
development, such old information gets out-of-date very fast. Tom
correctly pointed you to the docs; and that is really the best place
to work from now that you are
Oh i see..
i read the manual, the django book, no such information about that..
oh my..better update the manual there..
thanks for your quick explanation then, i think not a good way to manualy
assign a dictionarry to the form, not like in the documentation / book of
django. now i get it.
Thanks
Your form is not a model form, and so you cannot pass instance=post.
Since it is just a regular form, you should pass a dictionary of
values, with the keys of the dictionary being the names of the fields.
If the form is representing a model, you should be using a model form.
https://docs.djangopr
hi anyone can help me...
On Mon, Aug 15, 2011 at 12:39 PM, Phang Mulianto wrote:
> Hi Daniel,
>
> i change it to instance, but still got other errors :
>
>
> def myadmin_change_post(request,
> template_name='blog/admin/change_post.html'):
> try:
> id= request.GET.get('id','4')
> e
Hi Daniel,
i change it to instance, but still got other errors :
def myadmin_change_post(request,
template_name='blog/admin/change_post.html'):
try:
id= request.GET.get('id','4')
except ValueError:
id=1
#post = get_object_or_404(Post,pk=id)
post = Post.objects.get(
This line:
form = AdminPostForm(initial=post)*
*
should be
form = AdminPostForm(instance=post)
--
DR.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://groups.google.com/d/msg/django-use
hi..need help..
Here are the model :
class Post(models.Model):
title = models.CharField(max_length=200)
content = models.TextField()
slug = models.SlugField(max_length=50, unique=True, help_text='Unique
Value for Article page URL, created from title.')
is_publish = models.Boolean
7 matches
Mail list logo