Hi everyone. I'm using Django 1.1.0, importing it and using in another
file "robot_parser.py". I've been using it for months.

The script aggregates news from different sources and saves them using
Django ORM. Presently I used primary key for urls (http://www.site.com/
news/2009/jan/12/72828/), but then decided to use "slugs" (http://
www.site.com/news/2009/jan/12/slug-of-the-news/).

I changed the model adding slug field.
---
class Element(models.Model):
    date = models.DateTimeField()
    title = models.CharField(max_length=200)
    slug = models.SlugField(max_length=200)
---

Also I added a field to MySQL table.

Here's the code that adds an element from the "robot_parser.py".
---
title = "test title"
slug = slugify(title)
new_element = Element(title=title, slug=slugify(title),
date=datetime.now())
new_element.save()
---

That throws an error: TypeError: 'slug' is an invalid keyword argument
for this function.

What am I doing wrong?

--

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


Reply via email to