Ogundare
Luis
Hey bros, you know example JWT 😊
Charly
Luis
can u help me😳
Luis
Okay gracias Charly lo reviso rápido 😃🤠
Doragonsureiyā
The Inspired
The Inspired
kiash
Pranav
In my project I have created a template and static files
In static file one file name javacsript and another one img file
In java script file one menu.js how I can give the path of image from img file.
Anonymous
Hi everyone, I have trouble with uploading big files (more 1gb about), so when i upload big file my request is lagging, takes too long to jump to another line of code.
So what can you advise?
DB: sqlite3
This is my code
models: https://dpaste.org/En0WS , https://dpaste.org/uuUhO#L10,11,16 ;
view: https://dpaste.org/xJXV0 ;
upload_func: https://dpaste.org/04fw9#L
Sayidbek
Sayidbek
Anonymous
Elhem
I created an abstractuser method in the models and I created three roles (admin, employee, customer) I will create a list that displays all users with permission how can help me
kmk
Hi all. Tell me, please, is it possible to somehow prevent two sets of queries when the same sum_time field is annotated in them, and when they are attached, they are summed up?
study
I need a small help from you guys...
study
I wanted to load bootstrap in django...
Using python manage.py collect static
study
But the website is not getting css.....
Can anyone help me what to do...
karakurt
kiash
For Bootstrap add it to static files then load static and make sure also you add the link to locate the path of your Bootstrap files or directly load bootstrap cdn
yusof
Hi
here's a question for those who has many experience in project structure.
i have many models that they use File Field in their model.
is it better that i create new model named FileField for exam and connect my models to that model or just put file field in each of them.
thanks
Serhii
Hello. Guys please help me. I have been trying to solve problem for two days.
How I can do search bar on my blog.
I created form with works through post request.
I created method dispatch.
And this actually works
def dispatch(self, request, *args, **kwargs):
if self.request.method == 'POST':
search_data = self.request.POST.get('story', None)
self.object_list = super().get_queryset().filter(full_story__icontains=search_data, status=1)
return self.render_to_response(super().get_context_data(object_list=self.object_list))
But when I want to follow to another page on my pagination list I see error
blog.views.view didn't return an HttpResponse object
I know method get does not return anything
But how get post request and return get request to template, and on other page show result from paginator
Jay
Can anyone share me reference for update form using ajax
Vladyslav
Hi to all
Why I got this error?
SELECT DISTINCT ON expressions must match initial ORDER BY expressions
self.failuresensor_set.select_related("sensor", "sensor__sub_system").filter(
sensor__sub_system=sub_system,
sensor__display_name__in=sensor_failures_components,
critically__in=sensor_failures_criticality).order_by(
'-sensor__update_date', 'sensor__name').distinct('sensor__name')
Mirco
Vladyslav
The same field in order by must be in distinct
Hm, I saw this example: https://docs.djangoproject.com/en/4.1/ref/models/querysets/#distinct
>>> Entry.objects.order_by('author', 'pub_date').distinct('author')
Or I can use only distinct('sensor__update_date') in my case?
Mirco
Anonymous
I'm new to django, refer any proper book
Tanner
They're highly readable and just overall excellent
Anonymous
Thanks
..
I'm new to django, refer any proper book
Don't pick any book. Mostly outdated versions. Read the documentation.
Complete this simple application first. Best for beginners
https://docs.djangoproject.com/en/4.1/intro/tutorial01/
..
Btw i learned Django from this guy. Now it's outdated
https://youtu.be/qgGIqRFvFFk
Gipss
How to collectstatic only for admin app? Or exclude drf from collectstatic?
Gipss
How to collectstatic only for admin app? Or exclude drf from collectstatic?
Or how to fix this error:
whitenoise.storage.MissingFileError: The file 'rest_framework/css/bootstrap.min.css.map' could not be found with <whitenoise.storage.CompressedManifestStaticFilesStorage object at 0x7fd68aece050>.
The CSS file 'rest_framework/css/bootstrap.min.css' references a file which could not be found:
rest_framework/css/bootstrap.min.css.map
I tried to google it but I didn't find anything helpful
Bhokali Topa
Anyone having knowledge about the library django-chutad ?
I found it in my requirements.txt but cant find a reference
Альбина
Hi guys, when I’m trying to run my local server it keeps giving me ModuleNotFoundError: No module named 'django_heroku'.
I did literally everything they say on stackoverflow and it didn’t help. It works perfectly on the heroku server though. Could you recommend something? Im confused
𝙰𝚜𝚑𝚠𝚒𝚗
Альбина
𝙰𝚜𝚑𝚠𝚒𝚗
Done that :/
Maybe django_heroku is missing from requirements.txt, did you checked it?
Альбина
Yep: asgiref==3.5.2
dj-database-url==1.0.0
Django==4.0.6
django-heroku==0.3.1
gunicorn==20.1.0
psycopg2==2.9.3
pytz==2021.3
sqlparse==0.4.2
Rajat
S
Anonymous
So there is one input field and one label
Now whenever i input in input field it send ajax post request and then it save object
Now i wan to show that changes in label!!
How i can do it??
Without refreshing page
Anonymous
Basically i am doing cart
And in cart, whenever i change qty it get saved to model
And now i want to recalculate and show my totalAmmount with new qth which is saved on model
Maksim
All hi! How to solve this problem: "ModelForm has no attribute cleaned_data"?
Bhokali Topa
S
Maksim
I am sorry, i almost understand my problem in code. Need to write is_valid() and after cleaned_data()
S
form object to be specific
Of course
Hi, who saw mosh django tutorial part 3 completely? İ have a question ❓
Maxim
Of course
İ use Message broker(redis) in my project, and so İ must Eun three localhost for this. One for redis in docker, one for django manage.py and one for celery.
But i can't do this
Please some one help me
Anonymous
Hi everyone, I have trouble with uploading big files (more 1gb about), so when i upload big file my request is lagging, takes too long to jump to another line of code.
So what can you advise?
DB: sqlite3
This is my code
models: https://dpaste.org/En0WS , https://dpaste.org/uuUhO#L10,11,16 ;
view: https://dpaste.org/xJXV0 ;
upload_func: https://dpaste.org/04fw9#L
AL
Maksim
Say me reasons is_valid() = False
Maksim
please
Ajay
-----base..html ----
Ajay
https://nekobin.com/lehakehofe
Dave
Neeraj
Extract all the fields data in list and create csv..
You can also use for loop for this if data which export into csv is less.
Krishna
I'm experiencing a ValueError at
return an HttpResponse object. It returned None instead.
Krishna
Anyone can help here...in update view its throwing error
David
You code please~
David
X_ShaygaN_D
S
Maksim
Why dont' validation USERNAME_FIELD