Commits

Mikhail Korobov committed 17bfeec

Do not register Address model by default (it is pretty internal); provide verbose names for Address model

  • Participants
  • Parent commits 663334d

Comments (0)

Files changed (3)

easy_maps/admin.py

     list_display = ['address', 'computed_address', 'latitude', 'longitude', 'geocode_error']
     list_filter = ['geocode_error']
     search_fields = ['address']
+
     class form(forms.ModelForm):
         class Meta:
             widgets = {
                 'address': AddressWithMapWidget({'class': 'vTextField'})
             }
-
-
-admin.site.register(Address, AddressAdmin)

easy_maps/models.py

 
     def __unicode__(self):
         return self.address
+
+    class Meta:
+        verbose_name = "EasyMaps Address"
+        verbose_name_plural = "Address Geocoding Cache"
+

easy_maps_tests/test_app/admin.py

+# -*- coding: utf-8 -*-
+from __future__ import absolute_import
+from django.contrib import admin
+from easy_maps.admin import AddressAdmin
+from easy_maps.models import Address
+
+admin.site.register(Address, AddressAdmin)