Skip to content

Commit

Permalink
support django 1.7: use AppConfig instead off AppLabelRenamer
Browse files Browse the repository at this point in the history
  • Loading branch information
areski committed Mar 11, 2015
1 parent 8997a5e commit c348304
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 76 deletions.
2 changes: 2 additions & 0 deletions country_dialcode/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,5 @@
__contact__ = "areski@gmail.com"
__homepage__ = "http://www.areskibelaid.com"
__docformat__ = "restructuredtext"

default_app_config = 'country_dialcode.apps.CountryDialcodeConfig'
8 changes: 3 additions & 5 deletions country_dialcode/admin.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
from django.contrib import admin
from django.utils.translation import ugettext_lazy as _
from country_dialcode.models import Country, Prefix
from country_dialcode.app_label_renamer import AppLabelRenamer
AppLabelRenamer(native_app_label=u'country_dialcode', app_label=_('Country Dialcode')).main()


class CountryAdmin(admin.ModelAdmin):
Expand All @@ -21,9 +18,10 @@ class PrefixAdmin(admin.ModelAdmin):
search_fields = ('prefix', 'destination')
list_display = ('prefix', 'destination', 'country_name', 'carrier_name')
ordering = ('prefix', )
#list_filter = ['country_name', 'carrier_name']
# list_filter = ['country_name', 'carrier_name']

def __init__(self, *args, **kwargs):
super(PrefixAdmin, self).__init__(*args, **kwargs)
#self.list_display_links = (None, )
# self.list_display_links = (None, )

admin.site.register(Prefix, PrefixAdmin)
71 changes: 0 additions & 71 deletions country_dialcode/app_label_renamer.py

This file was deleted.

6 changes: 6 additions & 0 deletions country_dialcode/apps.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
from django.apps import AppConfig
from django.utils.translation import ugettext_lazy as _


class CountryDialcodeConfig(AppConfig):
verbose_name = _('Country Dialcode')

0 comments on commit c348304

Please sign in to comment.