Nope. Sorry for misdescription... Same error is "TypeError: 'slug' is
an invalid keyword argument" when using:
---
new_element = Element(title="title", date=datetime.now(),
source=source_object, slug="slug")
new_element.save()
---
And the same "_mysql_exceptions.Warning: Field 'slug' doesn't have
On Dec 12, 2009, at 8:08 AM, tezro wrote:
> Nope. Did it again on a clean project with the same models migrated
> then by South.
>
> Same error. Any other clues?
>
> Thanks for replies.
When you say "same error," do you mean this one: "Duplicate key name
'news_element_slug'"?
If so, then it
Nope. Did it again on a clean project with the same models migrated
then by South.
Same error. Any other clues?
Thanks for replies.
On Dec 12, 3:25 am, Shawn Milochik wrote:
> Why did you manually add a 'slug' field to your database after modifying the
> model? Django's syncdb does a lot more
Oops, sorry. Didn't remove the index. Now it worked. Proceeding :)
On Dec 12, 3:51 pm, tezro wrote:
> Added a migration with South... Ran it.
>
> ---
> Running migrations for news:
> - Migrating forwards to 0002_add_slug.
> > news: 0002_add_slug
> Traceback (most recent call last):
> File "/h
Added a migration with South... Ran it.
---
Running migrations for news:
- Migrating forwards to 0002_add_slug.
> news: 0002_add_slug
Traceback (most recent call last):
File "/home/tezro/lib/python2.5/South-0.6.2-py2.5.egg/south/
migration.py", line 330, in run_migrations
db.execute_deferr
Why did you manually add a 'slug' field to your database after modifying the
model? Django's syncdb does a lot more than just create the field; depending on
which database you're using, it does a few other things and overrides some
defaults. I wonder if there's a disconnect there. If this proje
Wooof, thanks for reply. Well, look. I had a "news/models.py" file
with definitions of Source (type of news) and Element(the news
elements theirselves) with a foreign key "Source".
The script I used to gather news from different sites looks like this:
---
title = "title"
date=datetime.now())
new_e
On Dec 11, 2009, at 4:51 PM, tezro wrote:
> Seems like no clues...
>
> On Dec 10, 12:21 am, bruno desthuilliers
> wrote:
>> On 9 déc, 18:58, tezro wrote:
>> (snip)
>>
>>
>>
>>> That throws an error: TypeError: 'slug' is an invalid keyword argument
>>> for this function.
>>
>>> What am I do
Seems like no clues...
On Dec 10, 12:21 am, bruno desthuilliers
wrote:
> On 9 déc, 18:58, tezro wrote:
> (snip)
>
>
>
> > That throws an error: TypeError: 'slug' is an invalid keyword argument
> > for this function.
>
> > What am I doing wrong?
>
> Not posting the full traceback - tracebacks are
That was really smart of you, thanks... Here's the traceback, hope it
helps.
---
Traceback (most recent call last):
File "", line 1, in
File "robot_parser.py", line 383, in update
news = Element(source = the_source, title = title, date =
date_published, short = short, full = full, link =
On 9 déc, 18:58, tezro wrote:
(snip)
>
> That throws an error: TypeError: 'slug' is an invalid keyword argument
> for this function.
>
> What am I doing wrong?
Not posting the full traceback - tracebacks are here to help debugging
a problem, not to fill your term with random gibberish !-)
--
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
12 matches
Mail list logo