Anonymous
I believe you meant it to be view.UpCategoryList
Anonymous
Please try updating lines 7 and 10 in shop/urls.py with correct view name and try rerunning the program
◇Сущ
🙏 thx
Martín
hello, I'm using a cookiecutter-django template for a project
I'm trying to create a user but after some SQL errors and executing some GRANTs at database, it was showing "[Errno 111] Connection refused"
then I tried to use /admin, but it was the same
then I googled and found about:
$ python manage.py createsuperuser
which I did
Now I'm stuck, because although I created a superuser, it is telling me that CSRF verification failed 😞
Martín
Reason given for failure:
CSRF token missing or incorrect
Anonymous
🙏 thx
Also in the shop app, i noticed you have the views.py file as 'view.py'. Just to keep everything consistent, it would be a good idea to name it as "views.py" and make sure you update it in the urls.py file too. Nothing wrong in current setup, but we normally assume the views would be in the views.py file
◇Сущ
Anonymous
Martín
Martín
yes
Martín
in base.py in the MIDDLEWARE dict
Anonymous
Are you running with DEBUG=False by any chance?
Martín
DEBUG is True
Anonymous
Kindly share the entire error so that someone can check where the error is. Would be hard to guess the problem.. 😊
Martín
mmmmh, ok
Gourav
mmmmh, ok
What is the url where this problem occurred ❓
Martín
Forbidden (CSRF token missing or incorrect.): /es/admin/login/
WARNING 2019-12-22 11:51:20,378 log 19558 140593646114560 Forbidden (CSRF token missing or incorrect.): /es/admin/login/
Martín
does this help?
Martín
I have i18n URLs, I don't know if that is relevant
Martín
also reading around, maybe I need to edit my ALLOWED_HOSTS
Martín
well, this is just setup by cookiecutter-django
Martín
this is the mapping for the /admin/ path
# Django Admin, use {% url 'admin:index' %}
path(settings.ADMIN_URL, admin.site.urls),
Martín
but I don't know which urls file is that or where is it
Martín
neither which template is this using
Martín
I guess it's django.contrib.admin.site.urls ???
Gourav
Can u share ur code❓
Martín
mmmmmh, yes, let me upload it to a repo
Martín
I need some time
Martín
Can u share ur code❓
I have still code to upload, but maybe you can already find the problem here:
https://github.com/madtyn/corelli
Martín
given that it's almost everything cookiecutter-django defaults
Martín
in a couple of minutes I'm uploading every additional change I made
Martín
everything uploaded by now @GouravSaini125
Anonymous
Martín
please, if there is some answer, mention me, I'm going to drive now 🚗
Mirco
Mirco
There's the import on the top
Gaurav
line 15 is causing error as I am trying to use choices in sign up page.....how to resolve it? https://pastebin.com/VY3Sxyrq
Gaurav
here is error: https://pastebin.com/UNBtGh4w
Muflone
Srinivas
Dear all, I am working on a requirement need your valuable inputs
Requirement : User will upload the image in a website, I need a API package where it will validate the image whether it has following conditions.
1. Good Image with good scan quality 300dpi atleast
2. Image is not tilted
3.Image is belongs to the same category (using pattern matching I believe)
Once these conditions satisfied then only the request sent has to be successful else fail
I need all of you please give some suggestions to done
Gaurav
it says choices was unexpected argument
Gaurav
Nikhil
What is slugfield
Nikhil
I can't find a answer that can explain me
Muflone
What is slugfield
a field for slugs, a text that's safe to use in the urls path
Nikhil
Anonymous
Can anyone please tell me custom domain name instead of freenom plzzzz help me
Anonymous
Anonymous
Anonymous
Have u purchased a domain ? If yes, then add it in your ALLOWED HOSTS.. Also, go to your domain manager and add the IP address as an A record
Anonymous
Anonymous
Suggest me which one is best
Anonymous
Try pythonanywhere.. u will get a subdomain
3g
Hi,
I had created a custom user, and now want to make another model "UserData". And i want that userdata into my user serializer.
3g
Anyone can help me?
3g
Who knows Django and Django Rest Framework
Rohan
Rohan
No idea what that is
3g
🙄
Account Deleted
Martín
Martín
only changed ALLOWED_HOSTS for adding a pair of IPs
Martín
and it's not that, because I reverted the changes
Anonymous
Hi everyone, I have a model which I have registered on the admin site but I would like that some of it's parameters can't be edited from admin site, is that possible?
cj
Anonymous
How?
cj
How?
at least, have you tried to search that on Google first?
Anonymous
Yes but couldn't understand much
am π
I implemented Cron job to start python script but it is not running python script .
What am i missing ?
Sabu Siyad
am π
Ec2
Sabu Siyad
I mean, show us the script
PV
PV