예제 #1
0
    def ready(self):
        from .signals import handlers
        from .models.collection import CollectionBase
        from .admin import CollectionAdminBase

        # Переименование поля файла или модели-владельца файла,
        # изменит также и соответствующие значения, хранящиеся в БД
        pre_migrate.connect(handlers.inject_rename_filefield_operations, sender=self)

        # автоматическая регистрация моделей галерей в админке
        for model in apps.get_models():
            if issubclass(model, CollectionBase) and not site.is_registered(model):
                site.register(model, CollectionAdminBase)
예제 #2
0
 def test_admin(self):
     self.assertTrue(
         site.is_registered(day_totals.SplitTopicDayTotalsMQTTSettings))
예제 #3
0
 def test_admin(self):
     self.assertTrue(
         site.is_registered(telegram.SplitTopicTelegramMQTTSettings))
예제 #4
0
 def test_admin(self):
     self.assertTrue(
         site.is_registered(
             consumption.SplitTopicGasConsumptionMQTTSettings))
예제 #5
0
 def test_admin(self):
     self.assertTrue(site.is_registered(InfluxdbIntegrationSettings))
예제 #6
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(
         site.is_registered(day_totals.SplitTopicDayTotalsMQTTSettings))
예제 #7
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(
         site.is_registered(
             meter_statistics.SplitTopicMeterStatisticsMQTTSettings))
예제 #8
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(DropboxSettings))
예제 #9
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(Note))
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(EnergySupplierPrice))
예제 #11
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(Message))
예제 #12
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(SortedGraph))
예제 #13
0
 def test_admin(self):
     self.assertTrue(site.is_registered(InfluxdbMeasurement))
예제 #14
0
 def test_admin(self):
     self.assertTrue(
         site.is_registered(
             meter_statistics.SplitTopicMeterStatisticsMQTTSettings))
예제 #15
0
 def test_admin(self):
     for current in self.CLASSES:
         self.assertTrue(site.is_registered(current))
예제 #16
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(StatusNotificationSetting))
예제 #17
0
 def test_admin(self):
     self.assertTrue(site.is_registered(GasConsumption))
예제 #18
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(EnergySupplierPrice))
예제 #19
0
 def test_admin(self):
     self.assertTrue(
         site.is_registered(QuarterHourPeakElectricityConsumption))
예제 #20
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(
         site.is_registered(telegram.SplitTopicTelegramMQTTSettings))
예제 #21
0
 def test_admin(self):
     self.assertTrue(site.is_registered(broker.MQTTBrokerSettings))
예제 #22
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(APISettings))
예제 #23
0
 def test_admin(self):
     """ Model should be registered in Django Admin. """
     self.assertTrue(site.is_registered(PVOutputAddStatusSettings))