Skip to content
Browse files

Fixes #1 close

  • Loading branch information...
1 parent cb4efb7 commit 2c7ef61e0e1812b656cc031974cce71a7c4ede8d @belug23 belug23 committed Jan 28, 2013
Showing with 20 additions and 10 deletions.
  1. +5 −5 README.md
  2. +13 −3 geoprisma_config/admin.py
  3. +2 −2 setup.py
View
10 README.md
@@ -25,14 +25,14 @@ Contrib Admin is required.
1. Add "geoprisma_config" to your INSTALLED_APPS setting like this::
- INSTALLED_APPS = (
- ...
- 'geoprisma_config',
- )
+ INSTALLED_APPS = (
+ ...
+ 'geoprisma_config',
+ )
2. Include the geoprisma_config URLconf in your project urls.py like this::
- url(r'^geoprisma_config/', include('geoprisma_config.urls')),
+ url(r'^geoprisma_config/', include('geoprisma_config.urls')),
3. Run `python manage.py syncdb` to create the geoprisma_config models.
View
16 geoprisma_config/admin.py
@@ -1,3 +1,4 @@
+import django
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.util import unquote
@@ -115,8 +116,12 @@ def changelist_changeform_view(self, request, extra_context=None, add=False, obj
pass
try:
- cl = ChangeList(request, self.model, list_display, self.list_display_links, self.list_filter,
- self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self)
+ if django.VERSION[0:2] < (1, 4):
+ cl = ChangeList(request, self.model, list_display, self.list_display_links, self.list_filter,
+ self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_editable, self)
+ else:
+ cl = ChangeList(request, self.model, list_display, self.list_display_links, self.list_filter,
+ self.date_hierarchy, self.search_fields, self.list_select_related, self.list_per_page, self.list_max_show_all, self.list_editable, self)
except IncorrectLookupParameters:
# Wacky lookup parameters were given, so redirect to the main
@@ -188,13 +193,18 @@ def changelist_changeform_view(self, request, extra_context=None, add=False, obj
else:
action_form = None
+ if django.VERSION[0:2] < (1, 4):
+ root_path = self.admin_site.root_path
+ else:
+ root_path = request.get_full_path()
+
context = {
'model_name': force_unicode(self.model._meta.verbose_name),
'lc': {
'title': cl.title,
'cl': cl,
'media': media,
- 'root_path': self.admin_site.root_path,
+ 'root_path': root_path,
'app_label': app_label,
},
'action_form': action_form,
View
4 setup.py
@@ -8,7 +8,7 @@
setup(
name = 'geoprisma_config',
- version = '0.0.1',
+ version = '0.0.2dev',
packages = ['geoprisma_config'],
include_package_data = True,
license = 'BSD License',
@@ -30,4 +30,4 @@
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
-)
+)

0 comments on commit 2c7ef61

Please sign in to comment.
Something went wrong with that request. Please try again.