I'm not sure why it might work on one server but not on another unless the
version of Django was different but as far as I know form.slug is not really
guaranteed to exist. Normally it gets added to form.fields or somesuch by
the forms metaclass.

The actual data from the post request should also not be retrieved this way
either. You should probably be doing the slugify() inside the is_valid() if
block and accessing whether the slug was passed in the POST data or not by
checking "slug" in form.cleaned_data.

On Wed, Jun 24, 2009 at 8:40 AM, saxon75 <saxo...@gmail.com> wrote:

>  form = AddArticleForm(request.POST)
>        if not form.slug:
>          form.slug = slugify(form.title)
>        if form.is_valid():
>



-- 
=======================================
株式会社ビープラウド  イアン・ルイス
〒150-0012
東京都渋谷区広尾1-11-2アイオス広尾ビル604
email: ianmle...@beproud.jp
TEL:03-5795-2707
FAX:03-5795-2708
http://www.beproud.jp/
=======================================

--~--~---------~--~----~------------~-------~--~----~
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 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to