mirror of
https://github.com/creyD/asiimov.git
synced 2026-06-14 09:52:23 +02:00
Merge branch 'master' of https://github.com/creyD/asiimov
This commit is contained in:
@@ -31,6 +31,7 @@ ALLOWED_HOSTS = []
|
|||||||
# Application definition
|
# Application definition
|
||||||
|
|
||||||
INSTALLED_APPS = [
|
INSTALLED_APPS = [
|
||||||
|
'core',
|
||||||
'django.contrib.admin',
|
'django.contrib.admin',
|
||||||
'django.contrib.auth',
|
'django.contrib.auth',
|
||||||
'django.contrib.contenttypes',
|
'django.contrib.contenttypes',
|
||||||
|
|||||||
@@ -1,3 +1,9 @@
|
|||||||
from django.contrib import admin
|
from django.contrib import admin
|
||||||
|
from .models import ItemType, Stickers, ItemInstance, Badge, Gamer
|
||||||
|
|
||||||
|
|
||||||
# Register your models here.
|
# 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 = ()
|
||||||
|
|||||||
@@ -21,7 +21,7 @@ class ItemType(models.model):
|
|||||||
classid = models.IntegerField() # Weapon Class
|
classid = models.IntegerField() # Weapon Class
|
||||||
appid = models.IntegerField() # The appid which items of this type belong to
|
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)
|
icon_url = models.URLField(max_length=512, null=True)
|
||||||
name = models.CharField(max_length=1000) # i.e. ★ Butterfly Knife
|
name = models.CharField(max_length=1000) # i.e. ★ Butterfly Knife
|
||||||
name_color = models.CharField(max_length=7) # Hexadecimal color of the name
|
name_color = models.CharField(max_length=7) # Hexadecimal color of the name
|
||||||
@@ -41,7 +41,7 @@ class Stickers(models.model):
|
|||||||
class ItemInstance(models.model):
|
class ItemInstance(models.model):
|
||||||
item_class = models.ForeignKey(ItemType, on_delete=models.PROTECT)
|
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
|
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)
|
inspect_link = models.URLField(max_length=512, null=True)
|
||||||
wear = models.CharField(max_length=100) # tags > category = exterior > localized_tag_name
|
wear = models.CharField(max_length=100) # tags > category = exterior > localized_tag_name
|
||||||
float = models.FloatField() # Float of the object
|
float = models.FloatField() # Float of the object
|
||||||
|
|||||||
Reference in New Issue
Block a user