Hello
I am trying to use a charfield with the prepopulate_from option to
generate an url. My problem is just that prepopulate_from does'nt
allow the use of /.
I'm using it like this in the admin.py:
prepopulated_fields = {"url" : ('_url',)}
Does anyone
or sure, but I thought it used to. That's why I
> > asked. I wonder why that functionality wasn't there by default...
>
> Because in many cases it would be a usability problem. What if you've
> manually adjusted the slug - do you really want your manual changes
What if you've
manually adjusted the slug - do you really want your manual changes
automatically erased anytime you touch the prepopulate_from field?
If you really want a fully-automatic, non-editable slug field,
consider doing it on the server side with one of the
<[EMAIL PROTECTED]>wrote:
>
>>
>> Before the new forms and admin came, I could've sworn that the
>> prepopulate_from (now prepopulated_fields) stuff worked when creating
>> a new object in the admin, __AND__ when you edit an existing object.
>>
>> Can som
On Tue, Sep 30, 2008 at 2:41 PM, lingrlongr <[EMAIL PROTECTED]> wrote:
>
> Before the new forms and admin came, I could've sworn that the
> prepopulate_from (now prepopulated_fields) stuff worked when creating
> a new object in the admin, __AND__ when you edit an existing
Before the new forms and admin came, I could've sworn that the
prepopulate_from (now prepopulated_fields) stuff worked when creating
a new object in the admin, __AND__ when you edit an existing object.
Can someone confirm if this should work for editing objects too?
Currently, it doe
On Tue, Aug 19, 2008 at 12:33 AM, Daniel Roseman
<[EMAIL PROTECTED]> wrote:
>
> On Aug 19, 6:18 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
>> On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>>
>> > On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
>> >> I want to use text st
On Aug 19, 6:18 am, "Jorge Vargas" <[EMAIL PROTECTED]> wrote:
> On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>
> > On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
> >> I want to use text stored in field title to generate slugs.
> > In the svn (> 0.96) you have to use Model
On Mon, Aug 11, 2008 at 1:26 AM, Donn <[EMAIL PROTECTED]> wrote:
>
> On Monday, 11 August 2008 08:56:13 Oleg Oltar wrote:
>> I want to use text stored in field title to generate slugs.
> In the svn (> 0.96) you have to use ModelAdmin like this:
>
> clas Toon(models.Model):
> title = models.CharFi
Many thanks! This was really timely and helpful. In case someone's
googling, I'm 99% sure that the book Oleg is referring to is Practical
Django Projects by James Bennett.
It's mostly excellent, but I haven't been so far found anywhere on the
Apress site that has a) a list of errata b) code snipp
nk)
> >
> > slug =
> models.SlugField("url_prefix",max_length=50,unique=True,prepopulate_from=('name',),help_text='e.g.
> > "janez_marijan_potokar_novak" (PAZI, SUMNIKI)')
> >
> > any ideas what am i doing wrong?
>
On Apr 10, 10:50 am, "Almir Karic" <[EMAIL PROTECTED]> wrote:
> i have an error caused by the following line (which worked without
> problems on regular django trunk)
>
> slug =
> models.SlugField("url_prefix",max_length=50,unique=True,
i have an error caused by the following line (which worked without
problems on regular django trunk)
slug =
models.SlugField("url_prefix",max_length=50,unique=True,prepopulate_from=('name',),help_text='e.g.
"janez_marijan_potokar_novak" (PAZI, SUMNIKI)
On Nov 20, 1:11 am, Mogga <[EMAIL PROTECTED]> wrote:
> great article... very interesting and answered some old questions...
> not using it for URLS...
> i'm developing some file system mgmt tools for software packages that
> don't like hyphens. i'll have to hack the slugifier or create my own
>
PROTECTED]> wrote:
> > is it possible to specify a custom delimeter for the prepopulate_from
> > option for slugfields? ie. underscore instead of hyphen?
> > thanks in advance!!
>
> The delimiter is part of a hardcoded regular expression used by the
> "slugifier"
> is it possible to specify a custom delimeter for the prepopulate_from
> option for slugfields? ie. underscore instead of hyphen?
> thanks in advance!!
The delimiter is part of a hardcoded regular expression used by the
"slugifier" Javascript. So, it's not customizable
is it possible to specify a custom delimeter for the prepopulate_from
option for slugfields? ie. underscore instead of hyphen?
thanks in advance!!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django
Still no dice. I'm noticing a couple quirks. The first comes where I
have two fields prepopulating from one:
Class Event(models.Model):
name = models.CharField(maxlength=200)
slug = models.SlugField(prepopulate_from=("name",))
print_title = models.CharFiel
Weird ...
If I add prepopulate_from to a handful of fields, the text fields
typically prepopulate fine (although sometimes they don't), but nothing
populates from the ForeignKeys. FireBug says it's not a Javascript
error, so I assumed it was a framework limitation. I'll give
On 6/28/06, Chase <[EMAIL PROTECTED]> wrote:
> I'd like to set up an admin form that will use something like a
> SlugField's prepopulate_from to fill several text fields with
> information from foreignkey, float, and other fields. It doesn't seem
> Django'
Hi all
I'd like to set up an admin form that will use something like a
SlugField's prepopulate_from to fill several text fields with
information from foreignkey, float, and other fields. It doesn't seem
Django's current function will meet my needs, but I'm trying to f
<[EMAIL PROTECTED]> wrote:
>
> On 1/26/06, Tim Terlegård <[EMAIL PROTECTED]> wrote:
> > Why is a field with prepopulate_from populated using javascript?
> > It's ok that javascript is used for some tasks, but why is it used for
> > populating a field before
On 1/26/06, Tim Terlegård <[EMAIL PROTECTED]> wrote:
> Why is a field with prepopulate_from populated using javascript?
> It's ok that javascript is used for some tasks, but why is it used for
> populating a field before it's saved? Can't it be done in the save()
>
Why is a field with prepopulate_from populated using javascript?
It's ok that javascript is used for some tasks, but why is it used for
populating a field before it's saved? Can't it be done in the save()
method instead?
Tim
24 matches
Mail list logo