from .models import UserMessage 报错
来源:
撸猫猫吃串串
2017-03-14
#coding=utf-8
from .models import UserMessage
from django.shortcuts import render
import MySQLdb
def getform(request):
all_message = UserMessage.objects.all()
for message in all_message:
print(message.name )
return render(request,'message_form.html')
# Create your views here.
debug时报错:ValueError: Attempted relative import in non-package
写回答
1回答
-
012017-03-16
相似问题