Commits

Ihar Niamilentsau  committed 8fc2a85

replace

  • Participants
  • Parent commits cef0677

Comments (0)

Files changed (13)

File admin_tools/adminboard/__init__.py

-from admin_tools.adminboard.dashboards import *
+from admin_tools.adminboard.adminboards import *
 from admin_tools.adminboard.registry import *

File admin_tools/adminboard/dashboards.py

 from django.core.urlresolvers import reverse
 from django.contrib.contenttypes.models import ContentType
 
-from admin_tools.dashboard import modules
+from admin_tools.adminboard import modules
 from admin_tools.utils import get_admin_site_name, uniquify
 
 
     rendering the dashboard (these files should be placed in your
     media path), for example::
 
-        from admin_tools.dashboard import Dashboard
+        from admin_tools.adminboard import Dashboard
 
         class MyDashboard(Dashboard):
             class Media:
 
         from django.core.urlresolvers import reverse
         from django.utils.translation import ugettext_lazy as _
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
 
 
         from django.core.urlresolvers import reverse
         from django.utils.translation import ugettext_lazy as _
-        from admin_tools.dashboard import modules, AppIndexDashboard
+        from admin_tools.adminboard import modules, AppIndexDashboard
 
         class MyAppIndexDashboard(AppIndexDashboard):
 

File admin_tools/adminboard/forms.py

 
     def __init__(self, *args, **kwargs):
         self.user = kwargs.pop('user', None)
-        self.dashboard_id = kwargs.pop('dashboard_id', None)
+        self.adminboard_id = kwargs.pop('dashboard_id', None)
         super(DashboardPreferencesForm, self).__init__(*args, **kwargs)
 
     def save(self, *args, **kwargs):
             **kwargs
         )
         preferences.user = self.user
-        preferences.dashboard_id = self.dashboard_id
+        preferences.adminboard_id = self.adminboard_id
         preferences.save()
         return preferences
 

File admin_tools/adminboard/migrations/0001_initial.py

             'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
         },
-        'dashboard.dashboardpreferences': {
+        'dashboard.adminboardpreferences': {
             'Meta': {'ordering': "('user',)", 'object_name': 'DashboardPreferences', 'db_table': "'admin_tools_dashboard_preferences'"},
             'data': ('django.db.models.fields.TextField', [], {}),
             'id': ('django.db.models.fields.AutoField', [], {'primary_key': 'True'}),

File admin_tools/adminboard/migrations/0002_auto__add_field_dashboardpreferences_dashboard_id.py

 
     def forwards(self, orm):
         
-        # Adding field 'DashboardPreferences.dashboard_id'
+        # Adding field 'DashboardPreferences.adminboard_id'
         db.add_column('admin_tools_dashboard_preferences', 'dashboard_id', self.gf('django.db.models.fields.CharField')(default='dashboard', max_length=100), keep_default=False)
 
 
     def backwards(self, orm):
         
-        # Deleting field 'DashboardPreferences.dashboard_id'
+        # Deleting field 'DashboardPreferences.adminboard_id'
         db.delete_column('admin_tools_dashboard_preferences', 'dashboard_id')
 
 
             'model': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
             'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
         },
-        'dashboard.dashboardpreferences': {
+        'dashboard.adminboardpreferences': {
             'Meta': {'ordering': "('user',)", 'object_name': 'DashboardPreferences', 'db_table': "'admin_tools_dashboard_preferences'"},
             'dashboard_id': ('django.db.models.fields.CharField', [], {'max_length': '100'}),
             'data': ('django.db.models.fields.TextField', [], {}),

File admin_tools/adminboard/models.py

 
 # warnings for deprecated imports
 from admin_tools.deprecate_utils import import_path_is_changed
-from admin_tools.dashboard import dashboards
-from admin_tools.dashboard import modules
+from admin_tools.adminboard import dashboards
+from admin_tools.adminboard import modules
 
 class Dashboard(
           import_path_is_changed(

File admin_tools/adminboard/modules.py

         example, let's build a "history" dashboard module, that will list the
         last ten visited pages::
 
-            from admin_tools.dashboard import modules
+            from admin_tools.adminboard import modules
 
             class HistoryDashboardModule(modules.LinkList):
                 title = 'History'
 
     Here's an example of modules group::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):
 
     Here's a small example of building a link list module::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):
 
     Here's a small example of building an app list module::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):
 
     Here's a small example of building a model list module::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):
 
     Here's a small example of building a recent actions module::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):
 
     Here's a small example of building a recent actions module::
 
-        from admin_tools.dashboard import modules, Dashboard
+        from admin_tools.adminboard import modules, Dashboard
 
         class MyDashboard(Dashboard):
             def __init__(self, **kwargs):

File admin_tools/adminboard/registry.py

     registry = {}
 
     def register(cls, klass, app_name):
-        from admin_tools.adminboard.dashboards import Dashboard
+        from admin_tools.adminboard.adminboards import Dashboard
         if not issubclass(klass, Dashboard):
             raise ValueError('%s is not an instance of Dashboard' % klass)
         if app_name in cls.registry:
     from django.conf import settings
     from django.utils.importlib import import_module
 
-    blacklist.append('admin_tools.dashboard')
+    blacklist.append('admin_tools.adminboard')
     blacklist.append('admin_tools.menu')
     blacklist.append('admin_tools.theming')
 
         except AttributeError:
             continue
 
-        # try to find a app.dashboard module
+        # try to find a app.adminboard module
         try:
             imp.find_module('dashboard', app_path)
         except ImportError:
             continue
 
         # looks like we found it so import it !
-        import_module('%s.dashboard' % app)
+        import_module('%s.adminboard' % app)

File admin_tools/adminboard/tests.py

 from django.core import management
 from django.contrib.auth import models as auth_models
 
-from admin_tools.dashboard import AppIndexDashboard
+from admin_tools.adminboard import AppIndexDashboard
 from admin_tools.adminboard.modules import DashboardModule, Group
 
 class ManagementCommandTest(DjangoTestCase):

File admin_tools/adminboard/utils.py

     return _get_dashboard_cls(getattr(
         settings,
         'ADMIN_TOOLS_INDEX_DASHBOARD',
-        'admin_tools.adminboard.dashboards.DefaultIndexDashboard'
+        'admin_tools.adminboard.adminboards.DefaultIndexDashboard'
     ), context)()
 
 def get_app_index_dashboard(context):
     return _get_dashboard_cls(getattr(
         settings,
         'ADMIN_TOOLS_APP_INDEX_DASHBOARD',
-        'admin_tools.adminboard.dashboards.DefaultAppIndexDashboard'
+        'admin_tools.adminboard.adminboards.DefaultAppIndexDashboard'
     ), context)(app_title, model_list)

File admin_tools/tests.py

 
 
     def test_dashboard(self):
-        from admin_tools.dashboard import models
+        from admin_tools.adminboard import models
 
         self.assertDeprecated(models.Dashboard)
         self.assertDeprecated(models.DefaultIndexDashboard)
         self.assertDeprecated(models.FeedDashboardModule)
 
     def test_dashboard_new(self):
-        from admin_tools.dashboard import dashboards
+        from admin_tools.adminboard import dashboards
 
         self.assertNotDeprecated(dashboards.Dashboard)
         self.assertNotDeprecated(dashboards.DefaultIndexDashboard)
         self.assertNotDeprecated(dashboards.DefaultAppIndexDashboard, '', [])
         self.assertNotDeprecated(dashboards.AppIndexDashboard, '', [])
 
-        from admin_tools.dashboard import modules
+        from admin_tools.adminboard import modules
         self.assertNotDeprecated(modules.DashboardModule)
         self.assertNotDeprecated(modules.AppList)
         self.assertNotDeprecated(modules.ModelList)

File admin_tools/urls.py

 urls = []
 if 'admin_tools.menu' in settings.INSTALLED_APPS:
     urls.append(url(r'^menu/', include('admin_tools.menu.urls')))
-if 'admin_tools.dashboard' in settings.INSTALLED_APPS:
+if 'admin_tools.adminboard' in settings.INSTALLED_APPS:
     urls.append(url(r'^adminboard/', include('admin_tools.adminboard.urls')))
 
 urlpatterns = patterns('', *urls)

File admin_tools/utils.py

     dashboard_cls = getattr(
         settings,
         'ADMIN_TOOLS_INDEX_DASHBOARD',
-        'admin_tools.adminboard.dashboards.DefaultIndexDashboard'
+        'admin_tools.adminboard.adminboards.DefaultIndexDashboard'
     )
 
     if type(dashboard_cls) is types.DictType: