Skip to content

Commit

Permalink
Merge pull request #137 from jpulec/remove-django-1.8-deprecation-war…
Browse files Browse the repository at this point in the history
…ning

Fix deprecation error for Django 1.8
  • Loading branch information
macro1 committed Nov 4, 2014
2 parents e20cf9e + 31e03f4 commit 13be41e
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions simple_history/admin.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,9 @@ def get_urls(self):
admin_site = self.admin_site
opts = self.model._meta
try:
info = opts.app_label, opts.module_name
except AttributeError:
info = opts.app_label, opts.model_name
except AttributeError:
info = opts.app_label, opts.module_name
history_urls = patterns(
"",
url("^([^/]+)/history/([^/]+)/$",
Expand Down
4 changes: 2 additions & 2 deletions simple_history/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -149,9 +149,9 @@ def revert_url(self):
"""URL for this change in the default admin site."""
opts = model._meta
try:
app_label, model_name = opts.app_label, opts.module_name
except AttributeError:
app_label, model_name = opts.app_label, opts.model_name
except AttributeError:
app_label, model_name = opts.app_label, opts.module_name
return ('%s:%s_%s_simple_history' %
(admin.site.name, app_label, model_name),
[getattr(self, opts.pk.attname), self.history_id])
Expand Down

0 comments on commit 13be41e

Please sign in to comment.