09 2022 档案
摘要:models.py中 from django.contrib.auth.models import AbstractUser from django_pandas.managers import DataFrameManager # Create your models here. class Us
阅读全文
摘要:urls.py中 from django.views.static import serve from zaobaobiao import settings urlpatterns = [ path('admin/', admin.site.urls), # 主页 path('', views.st
阅读全文
摘要:form中设置 class TotalMarkForm(forms.Form): crew_infos = forms.ModelChoiceField( queryset=models.Crew2Train.objects.all(), ) closing_date = forms.DateFie
阅读全文
摘要:import datetime from datetime import timedelta now = datetime.datetime.now() # 今天 today = now # 昨天 yesterday = now - timedelta(days=1) # 明天 tomorrow =
阅读全文