Muflone
client wants /static/your_image.jpg
web server intercepts the /static path and serve you the static file directly without passing from the django web app
Muflone
this is the way to handle static files
and the reason django doesn't serve them after you set debug=False
Anonymous
Hi guys
I hope you all are doing well)
Question: How to handle multi step form in django rest framework
Anonymous
Anonymous
Hi, could you watch my gist:
https://gist.github.com/navifundendi/8ef9075c99a55fb732745164464d1509
if q = car, red I get a post with tags car, red. It's good. But when q = red, car I get a post with the tags car, red and post with the tags airplane, red, instead of a post with the tags car, red. It is not right. I am trying to do an exact search. Could you share your experience and tell me what the error is. (A similar search model logic at pornhub and rule34).
Well, thanks for ignore, I found the answer
Deep Narayan
Naveen
Deep Narayan
Anonymous
Django cms slide image plugin or app that work have try alot on google but none of them works
Anonymous
Anonymous
Thanks
Ayy
I am working on a shipments-management app.
I want to show a Followup form to the user 30 mins after a new shipment is added.
I don't want to include celery and redis etc if it can be done by django in a simple manner. Any suggestions?
Ayy
The user can be on any screen, but needs to see the followup popup (modal basically) for all the shipments added 30 mins before.
Anonymous
GeoIP path must be a valid file or directory.
Anonymous
how ı can fixed this problem ?
Anonymous
anyone know geoıp2 ?
Gil
maybe a timmer from JS every X minutes, and from backend, api—to—function to verify the info and construct a response
Anonymous
I want to start a new project in Django (RESTful), along with my previous database of more than 60 table with a lot of relationships . What is the best architecture to implement it?
Rohan
Anonymous
Anonymous
I really need to understand cbv's I already know the attributes where am stuck at is how to overwrite their methods and which method to overwrite
Mirco
Post it into @python
R
Hello everyone, how can I fix that?I need to name my 'admin/' path but Django debugger always throw this error when I trying to give any string in 'name' attribute (not 'admin' only).
R
index.html : https://pastebin.com/7EJbqFA2
urls.py(exactly in project) : https://pastebin.com/NCMtngFX
error : https://imgur.com/a/6lYm8AH
Gil
R
Wow, both work, thank you!!!
R
I think only "admin" isn't good reverse, doesn't exists. Try 'admin:login' instead ( or maybe admin:index )
JZA
hi, I want to know in a nutshell what is fabric
Anonymous
How can change deffualt user model I Django?
Anonymous
JZA
right just extend them, by filling the new fieds that are not present on the object.
JZA
class UserForm(forms.ModelForm):
class Meta:
model = User
fields = ('first_name', 'last_name', 'email')
JZA
https://simpleisbetterthancomplex.com/tutorial/2016/07/22/how-to-extend-django-user-model.html
Altaf
Getting 500 error on setting Debug=False
Altaf
Same error on heroku platform...
Altaf
Getting no problem in fresh django project but in my existing project when i set debug=False...500 error
Altaf
So how to fix it...any solution???
Mirco
We don't have a magic ball
If you don't give us more details, it's impossible to help u
Altaf
Altaf
Settings?
Mirco
Starting from sharing what you receive into logs / console ?
Altaf
Urls?
Mirco
The traceback, this is the first thing you need to check
Altaf
Altaf
"Get /HTTP/1.1" 500 27
Altaf
Getting this error in console
Rahul
Tell some good resources to learn django
Altaf
And i have mentioned localhost in Allowed_Hosts
Rohan
Rohan
I don't understand your question
Altaf
Mirco
@pyflare
What are u using to run Django ?
runserver ?
Mirco
gunicorn ?
Altaf
Mirco
Runserver
So runserver should show you more info and not only the endpoint called with the status code
Altaf
Altaf
Also heroku configuration are also their in my project
Altaf
Altaf
And if i removed heroku config then static files don't load...then no 500 error
Altaf
Mirco
So what should i do now??
If you set up correctly the email settings, just put your email into the ADMINS tuple and you'll receive the full traceback via email 😁
Mirco
Or you need to change the logging settings or even better run Django with gunicorn or uwsgi and check the errors logs files
Mirco
https://docs.djangoproject.com/en/3.0/howto/error-reporting/
fyi
Altaf
マクスイム • グセブ
Hello everyone 🙂
Anonymous
local variable 'user' referenced before assignment
Anonymous
hello good day
Anonymous
i need your help
su
Anonymous
def register(request):
form = RegisterForm(request.POST or None)
if request.method == 'POST' and form.is_valid():
username = form.cleaned_data.get('username') # diccionario
email = form.cleanead_data.get('email')
password = form.cleaned_data.get('password')
user=User.objects.create_user(username,email,password)
if user:
login(request,user)
messages.success(request,f'Felicidades {user.username}')
return redirect('index')
Mirco
Mirco
And use code sharing tools