[refactor][m]: rename extension from exampletheme to example as per new repository name.
[ckanext-datagovau.git] / ckanext / example / plugin.py
blob:a/ckanext/example/plugin.py -> blob:b/ckanext/example/plugin.py
--- a/ckanext/example/plugin.py
+++ b/ckanext/example/plugin.py
@@ -54,8 +54,11 @@
                 config.get('extra_public_paths', '')])
         config['extra_template_paths'] = ','.join([template_dir,
                 config.get('extra_template_paths', '')])
+        # add in the extra.css
+        config['ckan.template_head_end'] = config.get('ckan.template_head_end', '') +\
+                                           '<link rel="stylesheet" href="/css/extra.css" type="text/css"> '
         # set the title
-        config['ckan.site_title'] = "An example CKAN theme"
+        config['ckan.site_title'] = "Example CKAN theme"
         # set the customised package form (see ``setup.py`` for entry point)
         config['package_form'] = "example_form"
 
@@ -79,14 +82,18 @@
         Note that we have also provided a custom register form
         template at ``theme/templates/user/register.html``.
         """
-        # Note that when we set up the route, we must use the form
-        # that gives it a name (i.e. in this case, 'register'), so it
-        # works correctly with the url_for helper::
-        #    h.url_for('register')
-        map.connect('register',
-                    '/user/register',
+        # Hook in our custom user controller at the points of creation
+        # and edition.
+        map.connect('/user/register',
                     controller='ckanext.example.controller:CustomUserController',
-                    action='custom_register')
+                    action='register')
+        map.connect('/user/edit',
+                    controller='ckanext.example.controller:CustomUserController',
+                    action='edit')
+        map.connect('/user/edit/{id:.*}',
+                    controller='ckanext.example.controller:CustomUserController',
+                    action='edit')
+
         map.connect('/package/new', controller='package_formalchemy', action='new')
         map.connect('/package/edit/{id}', controller='package_formalchemy', action='edit')
         return map