Using / in prepopulate_from fields

2009-02-23 Thread lol lollrtsen
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

Re: SlugField & prepopulate_from

2008-10-01 Thread Keith Eberle
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

Re: SlugField & prepopulate_from

2008-10-01 Thread Carl Meyer
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

Re: SlugField & prepopulate_from

2008-09-30 Thread Keith Eberle
<[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

Re: SlugField & prepopulate_from

2008-09-30 Thread Karen Tracey
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

SlugField & prepopulate_from

2008-09-30 Thread lingrlongr
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

Re: prepopulate_from

2008-08-19 Thread Jorge Vargas
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

Re: prepopulate_from

2008-08-18 Thread Daniel Roseman
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

Re: prepopulate_from

2008-08-18 Thread Jorge Vargas
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

Re: prepopulate_from

2008-08-18 Thread Greg Detre
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

Re: prepopulate_from

2008-04-10 Thread Almir Karic
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? >

Re: prepopulate_from

2008-04-10 Thread Daniel Roseman
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,

[newforms-admin] prepopulate_from

2008-04-10 Thread Almir Karic
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)

Re: prepopulate_from delimiter

2007-11-20 Thread RajeshD
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 >

Re: prepopulate_from delimiter

2007-11-19 Thread Mogga
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"

Re: prepopulate_from delimiter

2007-11-19 Thread RajeshD
> 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

prepopulate_from delimiter

2007-11-19 Thread Mogga
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

Re: prepopulate_from

2006-06-29 Thread Chase
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

Re: prepopulate_from

2006-06-29 Thread Chase
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

Re: prepopulate_from

2006-06-28 Thread Adrian Holovaty
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'

prepopulate_from

2006-06-28 Thread Chase
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

Re: prepopulate_from

2006-05-30 Thread Samuel Wright
<[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

Re: prepopulate_from

2006-01-26 Thread Adrian Holovaty
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() >

prepopulate_from

2006-01-26 Thread Tim Terlegård
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