Adel
Ghorz
English please. This is a global community
Adel
English please. This is a global community
sorry, looking for dev from Russia
Doragonsureiyā
sorry, looking for dev from Russia
Rule 🔟: Job-related offers are only allowed in the offtopic group. To not be considered spam, Job offers must include: • Skillset/techstack • Contact information • Brief job description • Pay figure • And can only be posted in @PythonOfftopic.
Ghorz
Ok
k9
Hello guys am experiencing a suspiciousFile operation in my Django project yet my setting I have included MEDIA_URL='media' MEDIA_ROOT= Base / 'media/' Mywebsite urls. Py file I have included +static(settings. MEDIA_ROOT, document_root=settings. MEDIA_ROOT) Of course I had already imported settings And my model. Py Image = models. ImageField(upload_to='uploads', blank=True, null=true) Anyone who might know where I went wrong please help much appreciated
k9
My settings. Py It's MEDIA_URL = BASE_DIR / 'media/' Not the other one I wrote sorry for that
âshîsh
I have Linux server and a domain name. Can I host my Django project on Linux server along with domain name instead of localhost ? Pls guide.
Suprit
How can I accept onle first user request, not upcoming in django
Anonymous
How can I accept onle first user request, not upcoming in django
You mean for instance user click on button for n times Just accept one of that requests?
Rup
django.db.utils.ProgrammingError: relation "item_item" does not exist. iam facing this error many time. dont know the exact answer. right now i am delete database and again migrate it. but this is not the right procedure. can anyone tell me please how to solve it?
MuRy
Hey guys Please I'm trying to get the value of a deferred attribute in django I always get <django.models.utils.query_utils deferred attribute at > instead of the actual value, I have no idea what to do🙏🏾🙏🏾
Bunty chhatri wala..
I'm using a API which is region specific.. How do i access its content.. API is India specific but when i deploy the script to the server, its region changes and i get 404 error.. How to solve that?
Dev__master
Replace media root with this MEDIA_ROOT = os.path.join(BASE_DIR,'media/')
Dev__master
Ok let me try that
Tell me your exact requirement with this
k9
Tell me your exact requirement with this
Still it gives a suspiciousFileOperation Exception value: file name uploads/image. Jpeg includes path elements
Anonymous
Hello friends How can I make autocomplete_field for foreign key in django forms like autocomplete in django admin
Anonymous
What is the difference bw Django nd Django Rest framework?
Hello
DRF is a package which makes making rest api easy with django
cj
What is better Wagtail CMS or DRF?
they are two totally and completely DIFFERENT things, you can't compare them
Anonymous
can I make my custom admin panel with dj?
Anonymous
Yes
by following Documentation?
Anonymous
is there any tutorial on youtube?
Charly
is there any tutorial on youtube?
maybe, you can search it
Anonymous
Hello friends How can I make autocomplete_field for foreign key in django forms like autocomplete in django admin
Use select 2 jquery plugin Or use autocomplete-light as django third-party app I suggest you use select 2
moshe
Anyone?
Have the server in India? You might be able to bypass it, but if they catch you you might be in great trouble. you can check with the API provider if they can open it for you somehow or might have other solution for those kind of situations if you provide your services for Indian in India
Anonymous
If i were to rename an app i should change the settings.py and folder name right? Or should i create a new app and move files?
Harish
I'm using a API which is region specific.. How do i access its content.. API is India specific but when i deploy the script to the server, its region changes and i get 404 error.. How to solve that?
Use an AWS server based in Mumbai run your API and stuff there have a django signal which populates another database to wherever you want it
Anonymous
Hello friends How can I make autocomplete_field for foreign key in django forms like autocomplete in django admin
Use—> resquest.post, instance=self.user.(model name here ) inside the view
Well Done
Hi, I have a list of user data (name, secondname, id) and I want to use id when I build url in template {% for user in subs %} <a href="{% url 'profiles/' + str(user.2) %}"> {{ user.0 }} {{ user.1 }} </a> {% endfor %} Also I have 'profiles/<id: int>' pattern in urls How can I do this?
Well Done
Ok, I fixed it
Sadriddin 🟢
Hello everyone how i can Django rest framework multiple authentification and all classes required for example token, basic, jwt, session ...
Sadriddin 🟢
Define them in AUTHENTICATION_CLASSES
I did but not all reqiured if base auth success then request work by I want all classes required
Mirco
I did but not all reqiured if base auth success then request work by I want all classes required
It has no sense Only one auth method Django will use If u specify many class, it will check one by one in order until one is valid
Anonymous
I copied bootstrap 5 navbar code.. And paste it in vscode.. But dropdown is not working.... Can anyone give me a solution .. Plsss
Zey
DataError at /seller/seller_register/ value too long for type character varying(50)
Mirco
why i am getting this error
The error is clear, you are passing a too long string for that field
Zey
i am just passing an email in emailfield
Mirco
i am just passing an email in emailfield
Too long The max u have set is 50 chars
Anonymous
I was making a website in django..
Anonymous
I copied code on HTML page
Mirco
it hs length of 22 only
Nope, u r passing something greater than 50 chars Django is not mad
Zey
this is my mail how its too long?
Mirco
arjunreddy2907@gmail.com
Maybe it's another field I don't know your model if you don't share it
Anonymous
I want to help in permissions in Django
Doragonsureiyā
I want to help in permissions in Django
Don't ask meta questions like: "Any user of $x here?" "Anyone used technology $y?" "Hello, I need help on $z!" Just ask directly! The better you are at explaining the problem, the more likely you are to get help. Asking smart questions
MuRy
Please how can i get the value of a deferred attribute in django instead of the pointer to a memory location
Ahmed
gonna try this
Anonymous
oh yes
Anonymous
I am send password reset mail, for now printing it in console but it's printing 4 times, the same email
Anonymous
How to resolve?
Zey
i am using postgres database and i have to deploy my website on heroku what changes i have to do in setting.py in database field?
Manal
hi , please i have a problem with django , my website basically is about leaning languages it’s very similar to Duolingo , my problem is i have cards contains flags images to make the user choose the language he wants to learn , so how could i save the name of language in sqlite after he clicked the card ??? Please i spent 10 hours to solve this and I couldn’t 😭 you can message me for more details
Suprit
You mean for instance user click on button for n times Just accept one of that requests?
No not I am saying that the if mutliple users visits homepage then only first user of them will at home page, others should wait
Neo
what is the best way to add created_by and updated_by fields auto populate ? currently i am doing like this on a create views setting created_by = request.user and same for all update views
Mirco
what is the best way to add created_by and updated_by fields auto populate ? currently i am doing like this on a create views setting created_by = request.user and same for all update views
You can use django-models-utils and inherit every model by TimeStampedModel or using python's partial from functools with DateTimeField https://adamj.eu/tech/2021/05/05/3-uses-for-functools-partial-in-django/
Neo
You can use django-models-utils and inherit every model by TimeStampedModel or using python's partial from functools with DateTimeField https://adamj.eu/tech/2021/05/05/3-uses-for-functools-partial-in-django/
i am currently using django-model-utils(timestamped model) for created and updated datetimes, but i want to do the same for created_by and updated_by users.
Zey
i am using postgres database and i have to deploy it on heroku what i have to put in HOST and PORT?
Neo
Use the same strategy with your custom proxy model to inherit by
i want to track who created and who updated the object