Anonymous
👍
H
I want the user to only access a view a certain number of times.
How to do that in django??
H
Any suggestions
Cesar
Cesar
i would do something like this
Anonymous
Hi all.
I try configure nginx proxy to django with custom path location like https://balbal.com/rc-env/.
The django have only admin page.
in settings.py I set
USE_X_FORWARDED_HOST = True
FORCE_SCRIPT_NAME = os.environ.get('DJANGO_FORCE_SCRIPT_NAME', '/rc-env/') # without trailing slash
LOGIN_REDIRECT_URL = FORCE_SCRIPT_NAME + "admin/login/"
LOGIN_URL = FORCE_SCRIPT_NAME + "admin/login/"
STATIC_URL = FORCE_SCRIPT_NAME + 'static/'
I saw login form, but css styles not found.
Can anyone help me?
Cesar
did you ran collectstatic?
Anonymous
Anonymous
can anyone help me with django server
Anonymous
the server generated by django https://127.0.0.0.8000 is not opening in chrome
Anonymous
i am done with setting up local host but it doesn't helped me
Kawin
https://127.0.0.1:8000/
Anonymous
Hii everyone...i am applying python manage.py makemigrations blog , blog is name for db and app , problem is
Anonymous
It is not executing
Anonymous
it's showing same thing again and again
This site can't be reached
127.0.0.1 is refused to connect
Kawin
Anonymous
Its showing import error...cannot import name url from django.urls
Anonymous
can someone help
Anonymous
ImportError: cannot import name 'url' from 'django.urls'
Anonymous
i tried method at https://stackoverflow.com/questions/47703923/how-to-solve-this-importerror-cannot-import-name-url-in-django-2-0/47704439
Anonymous
it didnt worked
$iductive
Kawin
Kawin
You should import path from django.urls and not url
$iductive
Either try from django.conf.urls import url
$iductive
Or from django.urls import path
Cesar
Anonymous
Kawin
Can u pm me the screenshot?
Anonymous
Hi guys please i need help in hostn=ing my django project online.
Kawin
Anonymous
Вадим
Вадим
Django starts to convert all numeric vars to locale representation. Even ids, pks !
Anonymous
i think heroku is pretty good for django hosting
Вадим
what's the difference ?
Anonymous
Hello, could someone indicate me to a Django + Ajax tutorial? I am studying both separately, but I am looking for a tutorial of both together to practice. If possible one for newbie...
AJ
Use intercoolerJS with Django for easy Ajax integration
Omar
Hello... I have a question about Django Rest Framework. Is there any way to get the serializer writing fields programatically? I am trying to generate a JSON with all the writing fields and it validations. But I don't know how to access the list of fields attribute.
Omar
When I try Serializer.fields the attribute is a string or a Tuple
Leonardo
guys, where do you put your business logic at DRF?
Omar
Omar
Jovani Martín
Hello everyone, I'm jovani and I a new Django user, is there any who uses social login to help me with some questions?
Leonardo
In the View
but do you create a service file and import in the view?
Anonymous
Omar
but do you create a service file and import in the view?
Each View class process a different part of your business logic. If each process is too complex I create a Utils file(or folder) with some utilitarian classes to use in the View... But in the end the processing of the request is what I understand as a business logic. Did you mean something else?
Leonardo
Leonardo
thats ok, right?
Nikhil
Can I use react for frontend and django for back end
Cesar
Philip
Hi guys, such a question, how can I send this date to serializers after entering the date from the html field of type datetime-local, I encountered this problem after submitting the form, all fields except the date are sent and I get a 400 error and drf suggests me fill out the field with date
Philip
I even tried to create a model and take a date field from it, after I inserted it as an object of type Date javascript and passed this ajax object, but still got the same
Cesar
Philip
Philip
DRF? or plain DJ?
Thank you, but after I wrote here I immediately fixed it) 2 days I could not understand what was wrong, in the end now I fixed everything
Cesar
Philip
With dateformat?
yes)) I got this date through the date object (13-01-2020), but it was necessary (01.13.2020)
Anonymous
How do you fix indentation error in sublime please google is not bringing up solution
Anonymous
Pros solved just have to edit the preferences
Gedion
Gedion
0⁰0
professor
https://stackoverflow.com/questions/59727930/how-can-to-use-custom-admin-across-applications-in-django
JZA
I never got the mixins
Shreehari
swagBit
Hi all, how to generate receipt form in Django?
Anonymous
Hey all!
How can one send data from ESP32 to a Django web server?
Pls help!
JZA
how are you going about it?
JZA
rest?
JZA
you can try to post data via XML-RPC, or HTTP Data array, or through JSON using a REST protocol.
JZA
you can use Requests to do the push of data.
JZA
https://www.geeksforgeeks.org/get-post-requests-using-python/
JZA
but you need to define exactly what you need...