mirror of
https://github.com/nottinghamtec/PyRIGS.git
synced 2026-01-20 15:02:31 +00:00
Make dark theme a user level property, lazy load dark CSS
- Also now respects the colour-scheme media query - Added meta tag to tell the browser we support dark theme, allowing dark UA stylesheet if the user sends said media query - Means you only have to set it once per account rather than once per machine - Dark themed embeds!
This commit is contained in:
@@ -146,10 +146,7 @@ class Asset(models.Model, RevisionMixin):
|
||||
return reverse('asset_detail', kwargs={'pk': self.asset_id})
|
||||
|
||||
def __str__(self):
|
||||
out = "{} | {}".format(self.asset_id, self.description)
|
||||
if self.is_cable and self.cable_type is not None:
|
||||
out += '{} - {}m - {}'.format(self.cable_type.plug, self.length, self.cable_type.socket)
|
||||
return out
|
||||
return "{} | {}".format(self.asset_id, self.description)
|
||||
|
||||
def clean(self):
|
||||
errdict = {}
|
||||
|
||||
Reference in New Issue
Block a user