django管理员更改未反映在pythonanywhere免费服务器上

时间:2018-08-29 16:11:21

标签: django python-3.6

我在pythonanywhere.com免费服务器上使用django 1.11和python 3.6创建了一个应用程序“ mybook”。 应用程序的网址为http://suryavsics07.pythonanywhere.com/,问题是所有更改均未反映在管理员身上。我创建了customer模型

目录结构如下:

moneybook media/ moneybook/ __init__.py __init__.pyc settings.py settings.pyc urls.py urls.pyc wsgi.py mymoney/ __init__.py admin.py apps.py models.py tests.py urls.py views.py static/ db.sqlite3 manage.py

我运行python3 manage.py check,发现0错误。我哪里错了?

model.py文件中的代码:

from django.db import models

# Create your models here.

class Customer(models.Model):
    cust_id = models.IntegerField("Customer Id",unique=True,db_index=True)
    cust_name = models.CharField("Name",max_length=200,null=True)
    cust_email = models.EmailField("Email Id",max_length=200,unique=True,default='NULL',null=True,)
    cust_mobile = models.CharField( "Mobile No.",max_length=15,null=True)
    cust_pin = models.IntegerField("PIN",blank=True)
    cust_created_date = models.DateField("Registration Date",auto_now=True)

def __str__(self):
    """String for representing the Model object."""
    return self.cust_name

0 个答案:

没有答案