forked from Fediversity/Fediversity
remove stray old file
This commit is contained in:
parent
4435b99851
commit
666e6de065
1 changed files with 0 additions and 18 deletions
|
@ -1,18 +0,0 @@
|
|||
from django.db import models
|
||||
import os
|
||||
import inspect
|
||||
|
||||
class VersionedConfiguration(models.Model):
|
||||
"""Base class for all configuration versions"""
|
||||
|
||||
class Meta:
|
||||
abstract = True # don't create a table for this model
|
||||
|
||||
|
||||
def __init__(self, *args, **kwargs):
|
||||
super().__init__(*args, **kwargs)
|
||||
# get version from file name and set it on the model instance
|
||||
frame = inspect.stack()[1]
|
||||
module = inspect.getmodule(frame[0])
|
||||
module_file = os.path.basename(module.__file__)
|
||||
self.version = int(module_file.replace('v', '').split('.')[0])
|
Loading…
Add table
Reference in a new issue