[ckan-changes] commit/ckan: 4 new changesets

Bitbucket commits-noreply at bitbucket.org
Fri Sep 9 12:54:19 UTC 2011


4 new changesets in ckan:

http://bitbucket.org/okfn/ckan/changeset/5c9ae18f8daf/
changeset:   5c9ae18f8daf
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-09 13:13:51
summary:     [ux,tests][s]: Tests can no longer expect to add resources during dataset creation.
affected #:  1 file (3 bytes)

--- a/ckan/tests/functional/test_package.py	Thu Sep 08 16:29:29 2011 +0100
+++ b/ckan/tests/functional/test_package.py	Fri Sep 09 12:13:51 2011 +0100
@@ -1079,8 +1079,8 @@
         fv[prefix+'title'] = title
         fv[prefix+'version'] = version
         fv[prefix+'url'] = url
-        fv[prefix+'resources__0__url'] = download_url
-        fv[prefix+'resources__0__description'] = u'description escape: & umlaut: \xfc quote "'.encode('utf8')
+        #fv[prefix+'resources__0__url'] = download_url
+        #fv[prefix+'resources__0__description'] = u'description escape: & umlaut: \xfc quote "'.encode('utf8')
         fv[prefix+'notes'] = notes
         fv[prefix+'license_id'] = license_id
         fv[prefix+'tag_string'] = tags_txt
@@ -1102,7 +1102,7 @@
         assert pkg.title == title
         assert pkg.version == version
         assert pkg.url == url
-        assert pkg.resources[0].url == download_url
+        #assert pkg.resources[0].url == download_url
         assert pkg.notes == notes
         assert pkg.license.id == license_id
         saved_tagnames = [str(tag.name) for tag in pkg.tags]


http://bitbucket.org/okfn/ckan/changeset/1b593449e7b4/
changeset:   1b593449e7b4
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-09 13:16:21
summary:     [ux,tests][s]: 'resources' is now a surplus field; if no resources exist the field will not be posted by the dataset add/edit form.
affected #:  1 file (200 bytes)

--- a/ckan/controllers/package.py	Fri Sep 09 12:13:51 2011 +0100
+++ b/ckan/controllers/package.py	Fri Sep 09 12:16:21 2011 +0100
@@ -63,13 +63,19 @@
         '''Check if the return data is correct, mostly for checking out if
         spammers are submitting only part of the form'''
 
+        # Resources might not exist yet (eg. Add Dataset)
         surplus_keys_schema = ['__extras', '__junk', 'state', 'groups',
-                               'extras_validation', 'save', 'return_to']
+                               'extras_validation', 'save', 'return_to',
+                               'resources']
 
         schema_keys = package_form_schema().keys()
         keys_in_schema = set(schema_keys) - set(surplus_keys_schema)
 
-        if keys_in_schema - set(data_dict.keys()):
+        missing_keys = keys_in_schema - set(data_dict.keys())
+
+        if missing_keys:
+            #print data_dict
+            #print missing_keys
             log.info('incorrect form fields posted')
             raise DataError(data_dict)
 


http://bitbucket.org/okfn/ckan/changeset/c8601fd8611f/
changeset:   c8601fd8611f
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-09 13:25:33
summary:     [merge][m]: Merging in Rufus' upload changes to my test changes.
affected #:  5 files (233.8 KB)
Diff too large to display.
http://bitbucket.org/okfn/ckan/changeset/ccc28ad40017/
changeset:   ccc28ad40017
branch:      feature-1294-ux-improvements-dataset
user:        zephod
date:        2011-09-09 13:40:32
summary:     [ux][s]: Glitchfix: Was accidently setting the hashtag on every page on the site.
affected #:  1 file (90 bytes)

--- a/ckan/public/scripts/application.js	Fri Sep 09 12:25:33 2011 +0100
+++ b/ckan/public/scripts/application.js	Fri Sep 09 12:40:32 2011 +0100
@@ -6,7 +6,6 @@
     CKAN.Utils.setupTagAutocomplete($('input.autocomplete-tag'));
     CKAN.Utils.setupFormatAutocomplete($('input.autocomplete-format'));
     CKAN.Utils.setupMarkdownEditor($('.markdown-editor a, .markdown-editor .markdown-preview'));
-    CKAN.Utils.setupDatasetEditNavigation();
     // set up ckan js
     var config = {
       endpoint: '/'
@@ -27,6 +26,9 @@
 
     var isDatasetEdit = $('body.package.edit').length > 0;
     if (isDatasetEdit) {
+      // Set up hashtag nagivigation
+      CKAN.Utils.setupDatasetEditNavigation();
+      // Create Backbone view for adding resources
       var $el=$('.resource-add');
       var view=new CKAN.View.ResourceAdd({
         model: null,

Repository URL: https://bitbucket.org/okfn/ckan/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.




More information about the ckan-changes mailing list