• 数据模型

    • 关于时间的字段设置

    add_date = models.DateTimeField('保存日期',default = timezone.now)
    mod_date = models.DateTimeField('最后修改日期', auto_now = True)

  • 关于路由

    • django2中path 不能正常匹配正则路由,使用re_path代替即可。
    from django.urls import re_path
    

相关文章:

  • 2022-02-06
  • 2022-12-23
  • 2021-05-18
  • 2021-07-20
  • 2022-12-23
  • 2021-11-17
  • 2021-12-03
  • 2021-08-29
猜你喜欢
  • 2021-11-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-06-03
  • 2021-09-03
  • 2021-11-18
相关资源
相似解决方案