开发者

Can I make a field in database use this django code ,and don't use 'python manage.py startapp xx'

开发者 https://www.devze.com 2022-12-19 00:51 出处:网络
from django.db开发者_开发问答 import models class Person(models.Model): first_name = models.CharField(max_length=30)
from django.db开发者_开发问答 import models

class Person(models.Model):
    first_name = models.CharField(max_length=30)
    last_name = models.CharField(max_length=30)

Is this possible?


If you only want to access a database from Python, I recommend you use SQLAlchemy instead.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号