Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgdBj-0005dV-8H for pgsql-www@arkaria.postgresql.org; Thu, 06 Dec 2012 15:16:35 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.72) (envelope-from ) id 1TgdBi-0006p5-E1 for pgsql-www@arkaria.postgresql.org; Thu, 06 Dec 2012 15:16:34 +0000 Received: from makus.postgresql.org ([98.129.198.125]) by malur.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgdBh-0006p0-U9 for pgsql-www@postgresql.org; Thu, 06 Dec 2012 15:16:34 +0000 Received: from mail-la0-f46.google.com ([209.85.215.46]) by makus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1TgdBf-0008G1-FY for pgsql-www@postgresql.org; Thu, 06 Dec 2012 15:16:32 +0000 Received: by mail-la0-f46.google.com with SMTP id p5so5342213lag.19 for ; Thu, 06 Dec 2012 07:16:29 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:x-gm-message-state; bh=I/nvy/fCgkSXgwF+UNt+RKWainAQWjh+YsjkW2+CanU=; b=Tvmwj8lzC0IFn4N2bD1qs+pyd7rBw9zWPZZnxzJaDv44hzdqAK+fgTNrr2uai4Q9eW fnYtor6M/SIFY9aCuVLdJMp/rDKHMSe6R5J+0R0VGYPK1eaZpwT1erWd37d9o6Fdv90T C3Gs/HWjhU2Ja1LDRoua7t5EdxexevstjGfSoQqn+9oyn4JX6o+jJ4kl8BbGkOpeI53I OBqma+uTC7f6B4ByvjZBHo2k1Jh08SNhx2cUmk+cytejiSiEzKKNoH84+nOhIHaM/iyt vBvyTHhPfDod8+4Dckd4Bp8GFynZa4PrwgCGf5st4HzJXk2njBwnFvYGRql5jNBHrHVu WK2w== MIME-Version: 1.0 Received: by 10.112.84.65 with SMTP id w1mr1005833lby.121.1354806989331; Thu, 06 Dec 2012 07:16:29 -0800 (PST) Received: by 10.152.111.70 with HTTP; Thu, 6 Dec 2012 07:16:29 -0800 (PST) In-Reply-To: <50C0AFA9.6000806@dalibo.info> References: <50C0AFA9.6000806@dalibo.info> Date: Thu, 6 Dec 2012 16:16:29 +0100 Message-ID: Subject: Re: pgweb : adding a "duplicate event" button ? From: Magnus Hagander To: damien clochard Cc: PostgreSQL www Content-Type: text/plain; charset=ISO-8859-1 X-Gm-Message-State: ALoCoQnYTlltnKezN1g4AuqtbD5cCvqYo/DFVZ1wWwceDA/BlMuWGPGmmgoRs7uKEvgZMISmW3k/ X-Pg-Spam-Score: -2.6 (--) List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-www Precedence: bulk Sender: pgsql-www-owner@postgresql.org On Thu, Dec 6, 2012 at 3:46 PM, damien clochard 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 Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/ -- Sent via pgsql-www mailing list (pgsql-www@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-www