Skip to content

Commit

Permalink
Fixes #1 close
Browse files Browse the repository at this point in the history
  • Loading branch information
belug23 committed Jan 28, 2013
1 parent cb4efb7 commit 2c7ef61
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 10 deletions.
10 changes: 5 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand Down
16 changes: 13 additions & 3 deletions geoprisma_config/admin.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import django
from django.conf import settings
from django.contrib import admin
from django.contrib.admin.util import unquote
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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,
Expand Down
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -30,4 +30,4 @@
'Topic :: Internet :: WWW/HTTP',
'Topic :: Internet :: WWW/HTTP :: Dynamic Content',
],
)
)

0 comments on commit 2c7ef61

Please sign in to comment.