From 7cce276ce60fa4ce67d420cc6d82dfd174a0ec8e Mon Sep 17 00:00:00 2001 From: rgrp Date: Fri, 17 Jun 2011 16:16:24 +0100 Subject: [PATCH 1/4] [doc/kforge][xs]: remove kforge index page (long irrelevant). --- doc/kforge/index.html | 14 -------------- 1 file changed, 14 deletions(-) delete mode 100644 doc/kforge/index.html diff --git a/doc/kforge/index.html b/doc/kforge/index.html deleted file mode 100644 index ea04ea5cf69..00000000000 --- a/doc/kforge/index.html +++ /dev/null @@ -1,14 +0,0 @@ - - - CKAN - Comprehensive Knowledge Archive Network - - - - -

- CKAN -

-

Redirecting to CKAN project homepage: http://knowledgeforge.net/ckan/trac/

- - - From 7682be72a84ff09f7f19f6e63f5635aea68d0d72 Mon Sep 17 00:00:00 2001 From: rgrp Date: Thu, 23 Jun 2011 08:21:54 +0100 Subject: [PATCH 2/4] [controllers/user][xs]: crude spam filter for user registration. --- ckan/controllers/user.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ckan/controllers/user.py b/ckan/controllers/user.py index 9dbb6d60833..e0c76da6573 100644 --- a/ckan/controllers/user.py +++ b/ckan/controllers/user.py @@ -138,7 +138,12 @@ def edit(self, id=None): c.user_email = request.params.getone('email') elif 'save' in request.params: try: - user.about = request.params.getone('about') + about = request.params.getone('about') + if 'http://' in about: + msg = 'Edit not allowed as looks like spam. Please avoid links in your description' + h.flash_error(msg) + return render('user/edit.html') + user.about = about user.fullname = request.params.getone('fullname') user.email = request.params.getone('email') try: From 248d69373cebce97f753346b36e05f0e357acd68 Mon Sep 17 00:00:00 2001 From: rgrp Date: Thu, 23 Jun 2011 08:33:18 +0100 Subject: [PATCH 3/4] [doc,refactor][s]: remove design.rst as now at http://wiki.ckan.net/Design_and_Architecture. --- doc/design.rst | 53 -------------------------------------------------- doc/index.rst | 1 - 2 files changed, 54 deletions(-) delete mode 100644 doc/design.rst diff --git a/doc/design.rst b/doc/design.rst deleted file mode 100644 index fb9640283f9..00000000000 --- a/doc/design.rst +++ /dev/null @@ -1,53 +0,0 @@ -=========== -CKAN Design -=========== - -Overview -======== - -As a system CKAN functions as a synthesis of several different services: - -.. image:: ckan-features.png - :alt: CKAN Features - -CKAN is part of a larger set of tools and services designed to enable automated -use and reuse of content and data: - -.. image:: ckan-vision.png - :alt: The Debian of Data Services Stack - -Architecture -============ - -The key entity in CKAN is a Package. The data model for a package is pretty -much what you see on: http://www.ckan.net/package/new - -This in turn is heavily based on the kind of packaging information provided for -software but with some modifications. One of our aims is to keep things simple -and as generic as possible as we have data from a lot of different domains. -Thus we've tried to keep the core metadata pretty restricted but allow for -additional info either via tags or via "extra" arbitrary key/value fields. So -very roughly: - - * unique name - * title - * url + download url - * author/maintainer info - * license - * notes - * tags - * [extendable with "extra" fields] - -All, the code is open-source and if you want to see the actual -model definitions in code see here (probably start with core.py): - - - -One thing to note here is that all changes to package data are versioned in a -wiki-like manner. This gives us a lot of flexibility in how we manage access to -the system (as well as providing features like change logging for free!). - -The rdfizing code can be found here: - - - diff --git a/doc/index.rst b/doc/index.rst index 19b5ede952a..71f4745bb86 100644 --- a/doc/index.rst +++ b/doc/index.rst @@ -11,7 +11,6 @@ Contents: :maxdepth: 2 README - design deployment configuration paster From d72570ef7e688915369086a82c8e75ab5962bb37 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adri=C3=A0=20Mercader?= Date: Thu, 23 Jun 2011 11:19:31 +0100 Subject: [PATCH 4/4] [forms] Fix trivial bug in old formalchemy forms for groups --- ckan/controllers/group_formalchemy.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ckan/controllers/group_formalchemy.py b/ckan/controllers/group_formalchemy.py index e91d4cef0e1..e3db591b2c7 100644 --- a/ckan/controllers/group_formalchemy.py +++ b/ckan/controllers/group_formalchemy.py @@ -65,7 +65,7 @@ def new(self): for extension in self.extensions: extension.create(group) model.repo.commit_and_remove() - h.redirect_to(action='read', id=c.groupname) + h.redirect_to(controller='group', action='read', id=c.groupname) if request.params: data = forms.edit_group_dict(ckan.forms.get_group_dict(), request.params) @@ -122,4 +122,4 @@ def edit(self, id=None): # allow id=None to allow posting for extension in self.extensions: extension.edit(group) model.repo.commit_and_remove() - h.redirect_to(action='read', id=c.groupname) + h.redirect_to(controller='group', action='read', id=c.groupname)