Enam_may
Thank you by the way🙏
Mirco
I meant in django
You should upgrade packages that are not compatible anymore and have lot of patience
Mirco
If you have a test suite, the process can be faster
Anonymous
What's the difference b/w saving images to db and saving it to seperate media folder? Where the images in media folder will actually be saved(if not in db)?
Anonymous
And how will it affect at production?
Anonymous
Can anyone plz help?
Mirco
What's the difference b/w saving images to db and saving it to seperate media folder? Where the images in media folder will actually be saved(if not in db)?
In Django you don't save into database files, only "links" to the file saved into the media folder
Diego
Hey guys, i need to insert some python scripts (web scraper) in my django project, this script would parse some data then save in the db(postgre) for consulting in the front,Should i add the data in the python script directly or i must create a model to save this data and query after
Bais
Good night guys, I have CORS error when I try login with postman on django , I tried all manual I found.
Bais
CORS_ORIGIN_WHITELIST = ( 'https://localhost:8080', ) I tried this my frontend is in vue
Raj__Django
I dont get it when i runned server it didnt give me that error as yours
When we go to / admin then that error occurs insted of admin login page
Anonymous
Hi guys I am looking for fest frame work part time developer interested guys pls call me what's up /call : 9966147793
Anonymous
How get all data from database and how can I convert to json
arth
Can you share you tube link
Can I share you that link I don't know if it is allowed to share link here
Anonymous
Hi am a newbie in django . While trying to create a api hit from postman. I'm getting an errror parse() missing 1 required positional arguement when the code was JSONParser.parse(request).how to fix it
Ab2697
Anyone need coding blocks django course ?
Ab2697
At low price
Sandeep
How get all data from database and how can I convert to json
Return JsonResponse({objects:Abcd.objects.all()})
Venom
What virtual environment you prefer ?
thenils
Guys i am looking for complete user base for my project There user cam make sigin, sign out but without using django User model , Give me suggestions please
Джентльмен
Guys i am looking for complete user base for my project There user cam make sigin, sign out but without using django User model , Give me suggestions please
Inherit your custom model from AbstractBaseUser, override your authentication backend. In outcome you would have 2 user models
Джентльмен
Can you share any blog or anything else so it would be easy to understand
request.user has either User model or AnonymousUser model
Джентльмен
You can use the logic of AnonymousUser model. And you would have 3 different models for request.user: User, AnonymousUser, CustomUserModel
thenils
So the User model will override or will be deleted
Джентльмен
thenils
Thanks
thenils
I am trying
Джентльмен
I am trying
https://github.com/django/django/blob/master/django/contrib/auth/models.py
Джентльмен
https://github.com/django/django/blob/master/django/contrib/auth/models.py
Here you can see how AnonymousUser has been implemented
Джентльмен
In your custom authentication backend just return: instance of your custom user model and payload (token)
Джентльмен
yah this will help me a lot
But do not forget to inherit from AbstractBaseUser
thenils
But do not forget to inherit from AbstractBaseUser
yah thats what i am doing as first step
thenils
in models.py
B419045_Rashmi Ranjan Das
I am building a Youtube Downloader app using django. But the files are being downloaded into the server. Is there any way so that the file gets downloaded into the clients local system rather than the server? Please help
Anonymous
Good morning everyone, do you know any course that implement microservices with django?
Anonymous
Hello Huys How Can save Object to my django model ı get this firstLocation = request.POST.get('firstLocation') its comeşin [object Object] I need to save my django model but ıcan fixed my problem anyone help to me =
Anonymous
ı was check here but ı cant do
Alex
ı was check here but ı cant do
Then read carefully. Again and again until you don't get it.
Alex
I am building a Youtube Downloader app using django. But the files are being downloaded into the server. Is there any way so that the file gets downloaded into the clients local system rather than the server? Please help
At first, as far as I remember, downloading videos from YT breakes their ToS. At second - You could bufferize this data in server's memory, say, by BytesIO object and then stream it right to your clients... but I doubt that will be effective.
Fazil
def get_posts(request): posts = post.objects.all() return JsonResponse([post.serialize() for post in posts], safe=False)
Fazil
object has no attribut serialize
Fazil
what's wrong?
Dev
Use serializer
B419045_Rashmi Ranjan Das
File*
Alex
Any other way to do this..or any way to serve the downloaded tile to client from server
> Any other way to do this Maybe there is. Or maybe not. > to serve the downloaded tile to client from server nginx.
Антон
Hi. How do you make this work? <img src="{% static 'screenshot/{{name_of_photo}}.png' %}"
Alex
Hi. How do you make this work? <img src="{% static 'screenshot/{{name_of_photo}}.png' %}"
Let's start from the opposite side - what doesn't work in your case?
Jerome
Hi. How do you make this work? <img src="{% static 'screenshot/{{name_of_photo}}.png' %}"
you need to add the url & the dir in your settings for static files for a dir named "static" : STATIC_URL = '/static/' STATICFILES_DIRS = [os.path.join(BASE_DIR, 'static')] also you may need a root directory if static files are processed like so: STATIC_ROOT = os.path.join(BASE_DIR, 'staticfiles') if you use whitenoise there's nothing to do with "static" in your main urls.py
Akshay
guys m getting this error . Please see and suggest me.. user model imported from django.contrib.auth.models pylint(imported-auth-user)
Focky
If you want, i can share the code with you
Dev
Static file
Delete {{ }}
Dev
Only dir of file
Anonymous
I have created a class called Datebase. I initiated mysql database connection in a method inside the class However, when I use the connector in another method of same class I get an error "ReferenceError: weakly-referenced object no longer exists" I looked it up but nothing worked for me. Check the code here- https://hastebin.com/yiwoxogode.rb
abhijith
How do you run your test?
Python manage.py test
Maltapopoulos 🇲🇹
Could you share a part of your code ?
abhijith
I just tried with both Testcase class and ApiTestcase
abhijith
That thing is working but it take lot of time
abhijith
I checked the backend and noticed that db is creating
abhijith
Totally 130+ tables are there
Anonymous
Hi i need help in hosting django project which is the best and cheap platform for hosting django projects
Anonymous
HI everyone, do you know any course that implement microservices with django?
Anonymous
Hello guys .. anyone know how to make user in django from frontend (sign-up page) not from admin