Hi everyone.
I use django.views.generic.create_update.create_object to allow users
to post new entries on my site.
How can I make model automatically save the user currently logged in?
Model like
class MyModel(Model):
user = ForeignKey(User)
--~--~-~--~~~---~--~---
It did the job. Thanks!
On Jul 9, 3:51 pm, Jonathan Buchanan
wrote:
> 2009/7/9 Viktor Semykin :
>
>
>
> > Hi everyone.
>
> > I'm trying to generate slugs automatically and disallow user to
> > interfere with this. I think way to go is something like:
&
Why not to add dots to your regexp? For example, [\w\d\-\.]+ ?
On Jul 9, 3:36 pm, Dids wrote:
> Hi,
>
> I'm struggling to get the regex right in my urls.py file to match a
> url with a dot inside it. (think ip address).
>
> for exmaple :
> http://servername/Url.With.Dot
>
> I'm not even
Hi everyone.
I'm trying to generate slugs automatically and disallow user to
interfere with this. I think way to go is something like:
class Entry(Model):
title=CharField(max_length=100)
slug=SlugField(default=slugify(...title...))
but I have no idea how to pass title field (or at lea
Tim Chase wrote:
> but Django lets you drop to raw SQL pretty easily,
> so it shouldn't be a big deal.
Thanks. I think I will stop on raw SQL.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
Hi everyone.
I'm trying to create comment overview page. I want to select all
content entries that were recently commented. The problem is that I
don't know how to do that. In SQL I would run something like
select distinct object_pk from (select * from django_comments order by
submit_date desc)
6 matches
Mail list logo