-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
guoshijiang
committed
Mar 17, 2024
1 parent
055c1a2
commit e6534b9
Showing
13 changed files
with
379 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
43 changes: 43 additions & 0 deletions
43
airdrop/migrations/0006_period_remove_periodreward_period_and_more.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
# Generated by Django 4.1.1 on 2024-03-17 10:16 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
dependencies = [ | ||
('airdrop', '0005_remove_periodreward_name_periodreward_period_and_more'), | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Period', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)), | ||
('title', models.CharField(default='', max_length=200, verbose_name='活动主题')), | ||
('sub_title', models.CharField(default='', max_length=200, verbose_name='活动副标题')), | ||
('image', models.ImageField(blank=True, null=True, upload_to='period/%Y/%m/%d/', verbose_name='活动图片')), | ||
('link_url', models.CharField(default='', max_length=100, verbose_name='活动链接')), | ||
('period', models.CharField(blank=True, max_length=300, verbose_name='活动周期')), | ||
], | ||
options={ | ||
'verbose_name': 'Period', | ||
'verbose_name_plural': 'Period', | ||
}, | ||
), | ||
migrations.RemoveField( | ||
model_name='periodreward', | ||
name='period', | ||
), | ||
migrations.RemoveField( | ||
model_name='periodreward', | ||
name='sub_title', | ||
), | ||
migrations.RemoveField( | ||
model_name='periodreward', | ||
name='title', | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
"services", | ||
"channels", | ||
'airdrop', | ||
'website', | ||
] | ||
|
||
MIDDLEWARE = [ | ||
|
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
# encoding=utf-8 | ||
|
||
from django.contrib import admin | ||
from website.models import ( | ||
Event, | ||
Forum, | ||
BlogCat, | ||
Blog | ||
) | ||
|
||
|
||
@admin.register(Event) | ||
class AddressAmountStatAdmin(admin.ModelAdmin): | ||
list_display = ('id', 'name', 'link_url', 'describe') | ||
|
||
|
||
@admin.register(Forum) | ||
class AddressAmountStatAdmin(admin.ModelAdmin): | ||
list_display = ('id', 'title', 'link_url', 'describe') | ||
|
||
|
||
@admin.register(BlogCat) | ||
class AddressAmountStatAdmin(admin.ModelAdmin): | ||
list_display = ('id', 'name') | ||
|
||
|
||
@admin.register(Blog) | ||
class AddressAmountStatAdmin(admin.ModelAdmin): | ||
list_display = ('id', 'title', 'link_url', 'tags', 'describe') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
from django.apps import AppConfig | ||
|
||
|
||
class WebsiteConfig(AppConfig): | ||
default_auto_field = 'django.db.models.BigAutoField' | ||
name = 'website' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,78 @@ | ||
# Generated by Django 4.1.1 on 2024-03-17 09:58 | ||
|
||
from django.db import migrations, models | ||
|
||
|
||
class Migration(migrations.Migration): | ||
|
||
initial = True | ||
|
||
dependencies = [ | ||
] | ||
|
||
operations = [ | ||
migrations.CreateModel( | ||
name='Blog', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)), | ||
('title', models.CharField(default='unknown', max_length=200, verbose_name='博客标题')), | ||
('image', models.ImageField(blank=True, null=True, upload_to='blog/%Y/%m/%d/')), | ||
('describe', models.CharField(blank=True, default='', max_length=500, null=True, verbose_name='描述')), | ||
('link_url', models.CharField(default='', max_length=100, verbose_name='博客链接')), | ||
('tags', models.CharField(default='', max_length=200, verbose_name='标签')), | ||
], | ||
options={ | ||
'verbose_name': 'Blog', | ||
'verbose_name_plural': 'Blog', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='BlogCat', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)), | ||
('name', models.CharField(default='unknown', max_length=100, verbose_name='分类名称')), | ||
], | ||
options={ | ||
'verbose_name': 'BlogCat', | ||
'verbose_name_plural': 'BlogCat', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Event', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)), | ||
('name', models.CharField(default='', max_length=100, verbose_name='事件名称')), | ||
('link_url', models.CharField(default='', max_length=100, verbose_name='事件链接')), | ||
('describe', models.CharField(blank=True, default='', max_length=500, null=True, verbose_name='事件描述')), | ||
], | ||
options={ | ||
'verbose_name': 'Event', | ||
'verbose_name_plural': 'Event', | ||
}, | ||
), | ||
migrations.CreateModel( | ||
name='Forum', | ||
fields=[ | ||
('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), | ||
('uuid', models.CharField(blank=True, max_length=100, null=True, unique=True)), | ||
('created_at', models.DateTimeField(auto_now_add=True, db_index=True)), | ||
('updated_at', models.DateTimeField(auto_now=True, db_index=True)), | ||
('title', models.CharField(default='', max_length=100, verbose_name='标题')), | ||
('link_url', models.CharField(default='', max_length=100, verbose_name='form 链接')), | ||
('describe', models.CharField(blank=True, default='', max_length=500, null=True, verbose_name='描述')), | ||
], | ||
options={ | ||
'verbose_name': 'Forum', | ||
'verbose_name_plural': 'Forum', | ||
}, | ||
), | ||
] |
Empty file.
Oops, something went wrong.