Y
Size: a a a
Y
A
class Meta:
indexes = [
models.Index(fields=['first_name',]),
]
T
NS
class Meta:
indexes = [
models.Index(fields=['first_name',]),
]
A
D
A
NS
Б
NS
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
при попытке в INSTALLED_APPS вставитьNS
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
при попытке в INSTALLED_APPS вставитьNS
django.core.exceptions.AppRegistryNotReady: Apps aren't loaded yet.
при попытке в INSTALLED_APPS вставитьDT
Y
g
Б
DT
Б
NS
def register(request):
if request.method == "POST":
username = request.POST["username"]
email = request.POST["email"]
password = request.POST["password"]
confirmation = request.POST["confirmation"]
if password != confirmation:
return render(request, "commerce/register.html", {
"message": "Passwords must match."
})
try:
user = User.objects.create_user(username, email, password)
user.save()
except IntegrityError:
return render(request, "commerce/register.html", {
"message": "Username already taken."
})
login(request, user)
return redirect('index')
else:
return render(request, "commerce/register.html")
DT
def register(request):
if request.method == "POST":
username = request.POST["username"]
email = request.POST["email"]
password = request.POST["password"]
confirmation = request.POST["confirmation"]
if password != confirmation:
return render(request, "commerce/register.html", {
"message": "Passwords must match."
})
try:
user = User.objects.create_user(username, email, password)
user.save()
except IntegrityError:
return render(request, "commerce/register.html", {
"message": "Username already taken."
})
login(request, user)
return redirect('index')
else:
return render(request, "commerce/register.html")