[英]Can't create superuser on Django 1.8 using python 3.2
Hello i'm someone new to python, django and programming. 您好,我是python,django和编程的新手。 While trying to create a app with Django, i'm following the website's tutorial and i can ##
尝试使用Django创建应用时,我正在关注网站的教程,并且可以##
Run the command for creating a superuser but everytime i try to insert the requested name it gives me this error: 运行用于创建超级用户的命令,但是每次我尝试插入请求的名称时,都会出现此错误:
"Error: Enter a valid username. This value may contain only letters, numbers and @/./+/-/_ characters.
Username (leave blank to use 'joao'):"
Yes, it keeps showing this error everytime Can someone help? 是的,它每次都会显示此错误,有人可以帮忙吗?
Models.url Models.url
import datetime
from django.db import models
from django.utils import timezone
from django.contrib.auth.models import User
# Create your models here.
class Question(models.Model):
question_text = models.CharField(max_length = 200)
pub_date = models.DateTimeField('date published')
def __str__(self):
return self.question_text
class Choice(models.Model):
question = models.ForeignKey(Question)
choice_text = models.CharField(max_length = 200)
votes = models.IntegerField(default = 0)
def __str__(self):
return self.choice_text
Thanks in advance 提前致谢
The error is pretty clear. 错误非常明显。 You can enter only letters, numbers and specified characters while creating a superuser.
创建超级用户时,只能输入字母,数字和指定的字符。 It has got nothing to do with your Models.
它与您的模型无关。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.