Steve
Please I need help with multiple documents upload using Django forms, please I need the maximum number of alternatives because I tried a lot !
Vadim
Hello everyone
Suggest best practices for serving nested models using the REST API.
What applications or approaches do you use?
Like this https://github.com/silverlogic/djangorestframework-expander
Anshu
Anshu
Vadim
What's the issue
It is necessary to reduce the number of returned data. Having one API endpoint, return nested data in the first case. in the second, no (for example)
Poppu
How should I hit this view.index function every time when this path is appear or any path inside the admin panel
path('admin/users/firebaseusers/', views.index),
path('admin/', admin.site.urls),
If I placed like this then it's show the error because there is no return
Or I placed it's below the admin then it's function are never called
Hadi
should i create a python file for every single page of my website
or its better to keep all of pages in views.py?
Hadi
Jay
Hello, what is the best way to implement a login with OTP instead of a password? I went through django-otp but I think that would not serve my case.
kasim >
Malyali poli alle
kasim >
Anshu
Anshu
mAXY
Hey .. how do i create password reset in jwt authentication ??
chaygo
Hello guys! I cant change default language! I set Language_code="tr" but it doesnt change from en-us
НОДИР
Hello everyone, what is an example of an External service?
НОДИР
Thanks for the reply
Alex
Alex
ЯR
Guys, help plz! How to do this without Django ORM? Just with native Python. Thx!
Write a function named user_generator that takes a login as argument, and stores this login at the end of the file named logins.db.
The file logins.db will always be well formatted with one login per line, but it may not exist initially (so be sure to handle that case).
If the login already exists in the database, you will add the suffix 1. If the login exists with that suffix, you will try with 2, then 3, etc-until you find a valid login.
The list of logins doesn't follow any specific order so don't order them. You must simply add the new login at the end of the file.
Genemator
Genemator
or just write your own orm)
Alex
K
Can anyone please tell me how can I call java rest API in Django?
K
Alex
ЯR
Sanjarbek
#error
https://dpaste.org/raM9
#help
Alex
Nope
No atomictiy? Man, that's boring.
ЯR
ЯR
John
#filters.py
class SurveyFilter(django_filters.FilterSet):
Search = django_filters.CharFilter(method='full_search',label="Search")
Status = django_filters.ChoiceFilter(method='Status_filter',choices=USER_STATUS,label="Status")
class Meta:
model = Survey
fields = ('Search',)
def full_search(self, queryset, name, value):
user=self.request.user
return queryset.filter(
Q(SurveyUser__email__icontains=user)
)
Hey guys I'm getting an error when trying to get the current logged in user in filters.py how do I get it please anyone help
ЯR
Poppu
But the function which I want to call it's just features or background service which I want to it's refreshing every time when I load any page in django admin
Poppu
I simple I created a django models where I fetch the data from external api so I want to run functions continually in background
Mahdi
🥰🥰
Anyone can share how to create api with post
Sanjay Krishnan
Alex
Hi everyone,
I stuck with problem in template
addclass - filter, which addclass but only HTML-tags,
index.html:
….
{%load addclass%}
{% for post in posts %}
<h3>
Author: {{ post.author.get_full_name | addclass }} # here How overrride variable in this string on HTML-tag example span?
</h3>
<p>{{ post.text|linebreaksbr }}</p>
{% if not forloop.last %}<hr>{% endif %}
{% endfor %}
Suhaib_0.0
It shows me. 'User' object has no atrribute 'customer'
But I've deleted. 'User' from Model
Please answer me
chaygo
Firstly create venv then django-admin startproject name .
James
Hi. Anyone who can help me how to create and manage user groups and permissions in my custom admin dashboard?
Alisher shamuratov
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
Hi can you help me
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
I cannot manage urls multiple app in one project
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
I'll send codes
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
Can check it out
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
from django.contrib import admin
from django.urls import path, include
urlpatterns = [
path('admin/', admin.site.urls),
path('', include("reviews.urls")),
path('profiles/',include("profiles.urls")),
]
𝔄𝔷𝔞𝔪𝔞𝔱 ℑ𝔨𝔯𝔬𝔪𝔬𝔳
it shows this page isnt working
Anonymous
Sanjarbek
#help
#error
https://dpaste.org/7V5x
Raymond
I want To Learn Django
Raymond
So Pls Suggest Me Any Best Tutorial
Asman
I also
Asman
You can join this channel
Raymond
Fabian
hi devs, do you think 6 second script to load a 4000 rows CSV to the database is slow?
丂Ƥ𝖄๖ۣۜ.
How do I provide youtube video for download on my webapp yt.download(os.path."/Downloads") this works on localhost but when hosted video is not getting downloaded
Aman Jain
Anyone know how seeder work ?? What's kind of logic create for seeder
| Programmer |
i searched about downsides of session authentication for api and one of the result was:
There are several downsides however. First, a session ID is only valid within the browser where log in was performed; it will not work across multiple domains. This is an obvious problem when an API needs to support multiple front-ends such as a website and a mobile app.
but why it cant across multiple domains?
Alex
1 That's unrelated to this group
2 DjangoCRM - not even a single line of tests. More like a student's homework, than a project. Djangoiptvchannel - a few lines of tests and... side packages included in the project's source O_o
Alex
That's strange. If it's rest then it's how you (and anyone else) should use it - by calling via endpoints. Otherwise you should decouple the functionality into separate layers of logic - smth like this https://en.wikipedia.org/wiki/Multitier_architecture
Oh, there is also one way - just import the views and call them as regular functions. Say for CBV:
myview = MyCBV.as_view()
some_request = Request()
myview(some_request)
But I consider this bad practice. Unless it's in your unittests.
Chandra
How to do aunthentication with Django rest api
Nayan
Can we use filesystem storage in production ?
Nayan
I am using specific path to store file outside django project using filesystemstorage
Nayan
But the files are getting saved in outside django project as well as in django project , i got confused in this