<?xml version="1.0"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" version="2.0">
  <channel>
    <title>CKAN: Ticket #2445: Create demo dataset add related page</title>
    <link>http://localhost/ticket/2445</link>
    <description>&lt;p&gt;
Discussion:
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://okfn.basecamphq.com/projects/9558659-demo-ckan-front-end/posts/62821386/comments"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://okfn.basecamphq.com/projects/9558659-demo-ckan-front-end/posts/62821386/comments&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Implementation:
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="http://s031.okserver.org:2375/dataset/adur_district_spending/related/new"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://s031.okserver.org:2375/dataset/adur_district_spending/related/new&lt;/a&gt;
&lt;/p&gt;
</description>
    <language>en-us</language>
    <image>
      <title>CKAN</title>
      <url>http://assets.okfn.org/p/ckan/img/ckan_logo_shortname.png</url>
      <link>http://localhost/ticket/2445</link>
    </image>
    <generator>Trac 0.12.3</generator>
    <item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Mon, 28 May 2012 13:40:27 GMT</pubDate>
      <title>milestone set</title>
      <link>http://localhost/ticket/2445#comment:1</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:1</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                set to &lt;em&gt;current-ckan-sprint-2012-05-29&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Mon, 28 May 2012 13:40:56 GMT</pubDate>
      <title>description changed</title>
      <link>http://localhost/ticket/2445#comment:2</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:2</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/2445?action=diff&amp;amp;version=2"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Mon, 28 May 2012 14:11:53 GMT</pubDate>
      <title>milestone changed</title>
      <link>http://localhost/ticket/2445#comment:3</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:3</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;milestone&lt;/strong&gt;
                changed from &lt;em&gt;ckan-sprint-2012-05-29&lt;/em&gt; to &lt;em&gt;current-ckan-sprint-2012-06-25&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Wed, 30 May 2012 10:56:17 GMT</pubDate>
      <title>cc, description changed</title>
      <link>http://localhost/ticket/2445#comment:4</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:4</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;cc&lt;/strong&gt;
              &lt;em&gt;ross&lt;/em&gt; added
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;description&lt;/strong&gt;
              modified (&lt;a href="/ticket/2445?action=diff&amp;amp;version=4"&gt;diff&lt;/a&gt;)
            &lt;/li&gt;
          &lt;/ul&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Wed, 30 May 2012 10:59:37 GMT</pubDate>
      <title>owner, priority, status changed</title>
      <link>http://localhost/ticket/2445#comment:5</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:5</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              changed from &lt;em&gt;aron.carroll&lt;/em&gt; to &lt;em&gt;ross&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;priority&lt;/strong&gt;
                changed from &lt;em&gt;major&lt;/em&gt; to &lt;em&gt;blocker&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;new&lt;/em&gt; to &lt;em&gt;accepted&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Yup. Will look at this Thurs when I'm back in.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Wed, 30 May 2012 11:42:41 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:6</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:6</guid>
      <description>
        &lt;p&gt;
@Ross you will need to do this based off the feature-2375-demo-theme branch - you can use that branch or one split from it.
&lt;/p&gt;
&lt;p&gt;
new templates want to be in templates/... the old templates live in templates_legacy if you need to copy them across that's fine
&lt;/p&gt;
&lt;p&gt;
talk to aron or I if you need to know anything
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Thu, 31 May 2012 13:47:30 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:7</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:7</guid>
      <description>
        &lt;p&gt;
Okay, the 303 on validation failure seems a little excessive though given that we're posting to that URL.  Is a 200 okay?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Thu, 31 May 2012 13:49:21 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:8</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:8</guid>
      <description>
        &lt;p&gt;
Am working in feature-2445-add-related-new
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Thu, 31 May 2012 13:57:04 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:9</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:9</guid>
      <description>
        &lt;p&gt;
@ross
&lt;/p&gt;
&lt;p&gt;
the validation error seems correct to use 200
&lt;/p&gt;
&lt;p&gt;
for the created the 303 seems ok but i'd just use pylons redirect myself
&lt;/p&gt;
&lt;p&gt;
Also did aron say we want this as a javascript free add item form
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Thu, 31 May 2012 14:02:46 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:10</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:10</guid>
      <description>
        &lt;p&gt;
He didn't say but I assumed yes given current impl uses dodgy JS-&amp;gt;API.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Thu, 31 May 2012 14:06:01 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:11</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:11</guid>
      <description>
        &lt;p&gt;
I generally take the approach that a form submitted via POST should always redirect to a page. This prevents accidental user resubmissions when hitting refresh as well as the annoying popup saying "are you sure you want to re-submit".
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="http://en.wikipedia.org/wiki/Post/Redirect/Get"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;http://en.wikipedia.org/wiki/Post/Redirect/Get&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Looking at the rest of CKAN it doesn't do this so I'll leave it up to you.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Thu, 31 May 2012 14:08:29 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:12</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:12</guid>
      <description>
        &lt;p&gt;
redirects are fine, of course, but redirect on validation failure seems painful ?
&lt;/p&gt;
&lt;p&gt;
Also templates in templates_legacy?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Thu, 31 May 2012 14:28:10 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:13</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:13</guid>
      <description>
        &lt;p&gt;
@aron I'm fine with the redirect thinking it's just the specific 303 rather than just whatever pylons does.
&lt;/p&gt;
&lt;p&gt;
@ross, templates_legacy are there for ckan users who have their own templates as we are completely rewriting all the existing templates
&lt;/p&gt;
&lt;p&gt;
there is a lovely .ini setting to switch between the new and legacy modes
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>ross</dc:creator>

      <pubDate>Fri, 01 Jun 2012 09:19:00 GMT</pubDate>
      <title>owner, status changed</title>
      <link>http://localhost/ticket/2445#comment:14</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:14</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              changed from &lt;em&gt;ross&lt;/em&gt; to &lt;em&gt;aron.carroll&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;accepted&lt;/em&gt; to &lt;em&gt;assigned&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
I *think* this is done in feature-2445-add-related-new although I may have missed something, if you could take a look and let me know if it is what you wanted.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Tue, 05 Jun 2012 15:45:21 GMT</pubDate>
      <title>owner, priority changed</title>
      <link>http://localhost/ticket/2445#comment:15</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:15</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;owner&lt;/strong&gt;
              changed from &lt;em&gt;aron.carroll&lt;/em&gt; to &lt;em&gt;toby&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;priority&lt;/strong&gt;
                changed from &lt;em&gt;blocker&lt;/em&gt; to &lt;em&gt;major&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
Thanks Ross this is exactly what I wanted.
&lt;/p&gt;
&lt;p&gt;
Just wondering about the use of the c.form variable to insert the form into the page. I know we do this with the dataset and groups to support legacy templates, do we need to do this going forward? I'd rather each action just rendered one template and leaves it up to that to render the rest.
&lt;/p&gt;
&lt;p&gt;
Toby, there's a couple of TODO statements in the code where the breadcrumbs need fixing. I think the templates just need access to the package dict.
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://github.com/okfn/ckan/blob/feature-2375-demo-theme/ckan/templates/related/pages/form_page.html#L6"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/okfn/ckan/blob/feature-2375-demo-theme/ckan/templates/related/pages/form_page.html#L6&lt;/a&gt;
&lt;a class="ext-link" href="https://github.com/okfn/ckan/blob/feature-2375-demo-theme/ckan/templates/related/edit.html#L5"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/okfn/ckan/blob/feature-2375-demo-theme/ckan/templates/related/edit.html#L5&lt;/a&gt;
&lt;/p&gt;
&lt;p&gt;
Also if you generate an error message on one of the forms (leave the title blank) the error string comes out wrapped in quotes. eg. u'title is missing'
&lt;/p&gt;
&lt;p&gt;
Also might be of interest, I've converted the templates to use Jinja, and this is a good example of the conversion.
&lt;/p&gt;
&lt;p&gt;
&lt;a class="ext-link" href="https://github.com/okfn/ckan/commit/d779addf6e48be67695b35c031393e2d90d8c22f"&gt;&lt;span class="icon"&gt;​&lt;/span&gt;https://github.com/okfn/ckan/commit/d779addf6e48be67695b35c031393e2d90d8c22f&lt;/a&gt;
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>aron.carroll</dc:creator>

      <pubDate>Tue, 05 Jun 2012 15:46:30 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:16</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:16</guid>
      <description>
        &lt;p&gt;
Oh forgot to mention I've merged the code into feature-2375-demo-theme. We should delete the feature-2445-add-related-new branch.
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Wed, 06 Jun 2012 09:40:00 GMT</pubDate>
      <title></title>
      <link>http://localhost/ticket/2445#comment:17</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:17</guid>
      <description>
        &lt;p&gt;
@aron,
&lt;/p&gt;
&lt;p&gt;
this is as good a place as anywhere to answer your question about the c.form thing.
&lt;/p&gt;
&lt;p&gt;
a) some of this we are sort of stuck with.  datasets for example can be of different types and have different forms for different datasets. so they need to be rendered separately.  I have no idea why or how much this is used but it exists as an option to complicate everything, not much we can do about it.
&lt;/p&gt;
&lt;p&gt;
b) I think trying to do pages as a single rendering is not going to be easy because of the way ckan has been created maybe we can change this over time.  One major issue for me is that ckan does lots of crazy stuff for some reasons but these reasons are not apparent from the code.  Maybe there is some documentation somewhere but I'm not convinced.
&lt;/p&gt;
&lt;p&gt;
anyhow we should maybe close this ticket now.  You've added some stuff in the comment for me to do maybe that should be added as a new ticket?
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item><item>
      
        <dc:creator>toby</dc:creator>

      <pubDate>Wed, 06 Jun 2012 11:39:14 GMT</pubDate>
      <title>status changed; resolution set</title>
      <link>http://localhost/ticket/2445#comment:18</link>
      <guid isPermaLink="false">http://localhost/ticket/2445#comment:18</guid>
      <description>
          &lt;ul&gt;
            &lt;li&gt;&lt;strong&gt;status&lt;/strong&gt;
                changed from &lt;em&gt;assigned&lt;/em&gt; to &lt;em&gt;closed&lt;/em&gt;
            &lt;/li&gt;
            &lt;li&gt;&lt;strong&gt;resolution&lt;/strong&gt;
                set to &lt;em&gt;fixed&lt;/em&gt;
            &lt;/li&gt;
          &lt;/ul&gt;
        &lt;p&gt;
closing as todos moved to other tickets and also completed
&lt;/p&gt;
      </description>
      <category>Ticket</category>
    </item>
 </channel>
</rss>