Re: pgweb : adding a "duplicate event" button ? - Mailing list pgsql-www

From Magnus Hagander
Subject Re: pgweb : adding a "duplicate event" button ?
Date
Msg-id CABUevEy9YOdzA+paF01Pea1v8BSUxkJ-Bo9MeDd3exF-kRxYvg@mail.gmail.com
Whole thread Raw
In response to pgweb : adding a "duplicate event" button ?  (damien clochard <damien@dalibo.info>)
Responses Re: pgweb : adding a "duplicate event" button ?  (damien clochard <damien@dalibo.info>)
List pgsql-www
On Thu, Dec 6, 2012 at 3:46 PM, damien clochard <damien@dalibo.info> wrote:
> Hi,
>
> I'm currently uploading dalibo's training schedule for 2013 to the
> pg.org website. This means I have to submit 35+ events, which have
> almost the same description except for the begin/end dates of course.
> However when I click on the "submit event" button, I get an empty form
> and then I need copy/paste the content from a previous event.
>
> This is quite a boring experience.
>
> Am I the only one doing such thing ? Is anyone interested in a "clone"
> button, so we could just start with a form loaded with data from a
> previous event ?

That might be useful. And since it's all moderated, i guess the risk
of abuse is not *all* that large :)


> I took a brief look at the pgweb source code but I'm not sure where to
> start. I can't even find where the template for :
> https://www.postgresql.org/account/events/new/

All simple forms like this one are handled by simple_form() in
util/helpers.py. You'd either have to extend that one with the
duplicate functionality (which would be useful if we can assume there
will ever be another type of object that we'd want cloning ability
for), or have the events no longer use that one. (it's called from
events/views.py)


--Magnus HaganderMe: http://www.hagander.net/Work: http://www.redpill-linpro.com/



pgsql-www by date:

Previous
From: damien clochard
Date:
Subject: pgweb : adding a "duplicate event" button ?
Next
From: damien clochard
Date:
Subject: Re: pgweb : adding a "duplicate event" button ?