1
0
mirror of https://github.com/creyD/asiimov.git synced 2026-06-12 00:52:23 +02:00
This commit is contained in:
2020-01-13 00:45:21 +01:00
3 changed files with 9 additions and 2 deletions

View File

@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
# Application definition
INSTALLED_APPS = [
'core',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',

View File

@@ -1,3 +1,9 @@
from django.contrib import admin
from .models import ItemType, Stickers, ItemInstance, Badge, Gamer
# Register your models here.
@admin.register(ItemType)
class ItemTypeAdmin(admin.ModelAdmin):
list_display = ('paint_index', 'name', 'type', 'rarity', 'min_float', 'max_float', 'tradable')
list_editable = ()

View File

@@ -21,7 +21,7 @@ class ItemType(models.model):
classid = models.IntegerField() # Weapon Class
appid = models.IntegerField() # The appid which items of this type belong to
market_tradable_restriction = models.IntegerField() # How long the item will be trade locked
tradable = models.BooleanField(default=False) # Wether the item is tradable or not
icon_url = models.URLField(max_length=512, null=True)
name = models.CharField(max_length=1000) # i.e. ★ Butterfly Knife
name_color = models.CharField(max_length=7) # Hexadecimal color of the name
@@ -41,7 +41,7 @@ class Stickers(models.model):
class ItemInstance(models.model):
item_class = models.ForeignKey(ItemType, on_delete=models.PROTECT)
instanceid = models.IntegerField(primary_key=True, unique=True) # 0 for something like cases, which will be excluded here
tradable = models.BooleanField(default=False)
market_tradable_restriction = models.IntegerField() # How long the item will be trade locked
inspect_link = models.URLField(max_length=512, null=True)
wear = models.CharField(max_length=100) # tags > category = exterior > localized_tag_name
float = models.FloatField() # Float of the object