Andrew
Hi guys a quick qn about Django FileSystem for user uploaded images. Simple hosting on a Linode General Droplet running on CentOS, I wonder if there is a best practice for putting the media folder structure? I am concern if there are too many files lump together, it might slow down the read and write for both the OS and Django, if everything is just thrown into the /Media folder
Andrew
Would it help if I sort by date? /Media/2022/Aug for example? Please do share if you have had any experience and guidelines on this, thank you! 😊
Rohit 007
Hi is there any way to use authentication without a database in django
Ritesh
How we can implement jwt authentication without rest framework in django
Ritesh
Can anyone help me on this point..
Mirco
without DRF so REST API , you don't need JWTs
D
I need someone to review my code
Amir
hi does anybody can guide me what design patterns I should know as a django developer?
Doragonsureiyā
I need someone to review my code
Looks like you need an offtopic group, please continue this conversation at @pythonofftopic as it's not related to Python
Mirco
hi does anybody can guide me what design patterns I should know as a django developer?
Nothing specific, the more you know, the better for your programming skills Consider that Django is based on MVC pattern So at least the MVC, if you wanna dig into a specific one for Django
D
I need to apply for jobs with django
D
I dont know when i will be able to convence companies
Doragonsureiyā
I dont know when i will be able to convence companies
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Ravi
Is there any best project to look the api concept in advance in django
Doragonsureiyā
Is there any best project to look the api concept in advance in django
Adding the word Django to your Off-Topic question doesn't magically turn it to a Django related question, so move to @PythonOfftopic group and ask there.
Arslan
Hello everyone, this question does not work, the form does not give an error, but returns the following response "POST /create_person/ HTTP/1.1" 200 2781 but through the view Class everything works and the response is POST /create_person/ HTTP/1.1" 302 0 Here is my view def create_person( request): if request.method == 'POST': form = PersonForm(request.POST) if form.is_valid() and form.clean_phone() and form.clean_date(): form.save() context = { 'form': PersonForm } return render(request, 'create_person.html', context) Who can tell me what the problem is, thanks in advance))))))))))))
Arslan
wow maybe, thanks
Eslam
Guys, I learning from a book django 3 and there are advanced logic, and I understand the code, but I do not know how to write it on my own. Is it normal? If I need this code, I search for it or do I have to write the code on my own
@lex
how to fix django-admin startproject prjname error in cmd
@lex
show is not recognize
@lex
Depends on the rror
coz I want to create a project file
Fife
Does anyone have experience with callback url?
Fife
Do you mind giving me a few pointers?🙏🏾
nikita
I'm waiting for questions
Fife
Well I haven't started working with it, I'm just trying to gather knowledge on how it would work
nikita
something like this: you call callback - you get a response i used it this way: >callback url was called from a third party service , set some information in cookies and return redirect to web/admin/mobile
nikita
it's a normal feature, nothing out of the ordinary
nikita
I'm not sure if Google Translate translated what I wanted to say correctly
Deleted
Who has worked with Django forms and not having to manually customized the registration or login on html templates ?
Charly
Yes
And whats stopping you from doing it?
Deleted
I Couldn’t do it so I had to use crispy form
Marco
Hi, is there some library on django4 to create SDF files?
Charly
I Couldn’t do it so I had to use crispy form
Just an example: https://www.laravelcode.com/post/django-how-to-create-custom-login-page
Charly
Hi, is there some library on django4 to create SDF files?
Whats a SDF file? You may want to search on google for python not specific to django then use it in a view o command as you need
Deleted
On my way to work now I will get back at it when I get home
Marco
Whats a SDF file? You may want to search on google for python not specific to django then use it in a view o command as you need
Structure database file. File standard extension not asociated with database version nor program
Marco
Those files can be import and be exported with a lot db programs
Charly
sufiyan
https://linkode.org/#9ao0cmP3pyhtyWlBIDCML7
sufiyan
Code is working for success
sufiyan
but not for failure
sufiyan
i wrote the code for success mail only but i also want to show failure mail and when i'm using except block there it's giving me error
sufiyan
Any ideas what should i do?
sufiyan
https://linkode.org/#aBodBr51bsiqZuVS0fSYY4
karakurt
Guys is there any difference between this class EmployeeSerializer(serializers.ModelSerializer): position = PositionSerializer() class Meta: model = Employee fields = '__all__' and this class EmployeeSerializer(serializers.ModelSerializer): class Meta: model = Employee fields = '__all__' def to_representation(self, instance): ret = super().to_representation(instance) ret['position'] = PositionSerializer(instance.position).data return ret
No
Any one can help me with pycharm
Doragonsureiyā
Any one can help me with pycharm
Your question is not related to Django. If it's a Python related question go to @Python group, otherwise please move to @PythonOfftopic group and ask there.
Evgenii
Hello everyone! I have two models: 1. Order (client, service) 2. Service (name, amount) Is there a way to get count of every performed distinct service? Something like this: [ { 'service': 1, 'count': 5 }, { 'service': 2, 'count': 3 }, { 'service': 3, 'count': 2 }, ... ] EDITED Found solution: https://stackoverflow.com/questions/34947824/django-count-objects-with-the-same-value
Ôscar
Guys in the procfile of heroku what should i type ?
Madhu
Hello, i have issue in django Google login authentication .
Madhu
Unable to validate and fetch data from gsheet
Farik
Hi guys, how can I intercept a query before executing it, I need to add a condition where deletet_at = null, because i don’t want to refactor all queries?
Farik
Is there an example?
The Inspired
the docs have it
sufiyan
For the success email only the data is showing in the template however i want to show the fail email data also
sufiyan
If anyone can help me or give me an idea it would be very helpful
Saydullayev
Hello! When I stick one of the dates, nothing changes in the input field. What could be the problem?
sufiyan
Can anyone help me?
https://linkode.org/#u1OsX36HZKBm8QtVFG12W5
sufiyan
This is template file where i need to success and failure email details, I'm able to get the success but not failure
Sergey
Hello. I am looking for a good solution for this problem. I have some kind of hierarchical structure. Right now I'm using something like model->model1->model2->model3->model4->model5 where -> is FK. So how can I optimize this (bearing in mind that the structure of these models is not similar), i.e. using a closure table seems impossible
Артём
I have a django project, where I have two templates: notification.html and base.html. Using get_context_data() method I display the number of answers at the notification.html. I tried to use the same variable in base.html, but it didn't work. I also created CBV that and used get_context_data() to pass the same logic and display it at the base.html, but it doesn't work. How do I display the variable in another template? I also tried: {% include 'forum/notification.html' with answers=answers %}, but it didn’t help. So the problem is that I don’t know how to transfer and display a variable answers in another template?