mirror of
https://github.com/daniviga/django-ram.git
synced 2025-08-04 13:17:50 +02:00
Add singleton configuration
This commit is contained in:
@@ -1,3 +1,6 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from solo.admin import SingletonModelAdmin
|
||||||
|
|
||||||
# Register your models here.
|
from driver.models import DriverConfiguration
|
||||||
|
|
||||||
|
admin.site.register(DriverConfiguration, SingletonModelAdmin)
|
||||||
|
@@ -1,3 +1,14 @@
|
|||||||
from django.db import models
|
from django.db import models
|
||||||
|
from solo.models import SingletonModel
|
||||||
|
|
||||||
# Create your models here.
|
|
||||||
|
class DriverConfiguration(SingletonModel):
|
||||||
|
remote_host = models.GenericIPAddressField(
|
||||||
|
protocol="IPv4", default="192.168.4.1")
|
||||||
|
remote_port = models.SmallIntegerField(default=2560)
|
||||||
|
|
||||||
|
def __str__(self):
|
||||||
|
return "Driver Configuration"
|
||||||
|
|
||||||
|
class Meta:
|
||||||
|
verbose_name = "Driver Configuration"
|
||||||
|
Reference in New Issue
Block a user