티스토리 뷰

공부

[Django] remove prefix app name for table

seunggabi 승가비 2020. 7. 9. 02:39
class Bussinesses(models.Model):
    business_email = models.EmailField()
    password = models.CharField(max_length=20)
    contact_first_name = models.CharField(max_length=30)
    contact_last_name = models.CharField(max_length=30)

    class Meta:
        db_table = "bussinesses"

https://stackoverflow.com/questions/9849666/how-to-remove-the-prefix-of-a-table-for-a-django-model

 

How to remove the prefix of a table for a Django model?

I create a new Django app (not project) called Bussinesses, then add following class to the models.py. class Bussinesses(models.Model): business_email = models.EmailField() password = models.

stackoverflow.com

 

'공부' 카테고리의 다른 글

드모르간의 법칙 (De Morgan's law)  (0) 2020.07.13
[Java] mail filename encoding UTF-8  (0) 2020.07.10
[Django] remove prefix app name for table  (0) 2020.07.09
[PyCharm] PYTHONPATH=  (0) 2020.07.09
[Django] created_at, updated_at  (0) 2020.07.09
[Sh] "" == true ? -> if [ -z "$VAR" ];  (0) 2020.07.09
댓글
댓글쓰기 폼