Johnnybrand
Jasur
Aritra
in Django suppose I want to do some job after returning a request... suppose this is a lengthy job, and the outcome of this job has nothing to do with what I will return... if we start doing this job before returning, it will take minutes... we can't make the user wait that long... specially when he/she doesn't need the outcome of that job
Software Engineer
Mirco
Software Engineer
Same result
Mirco
Krishnajith US
How i supposed to differentiate the users in django rest..
Here i am using react frontend end and django jwt for authentication.I have two users.One normal user and one freelancer user..can anyone suggest any docs or tutorial
Smile
hello
i have func with property in my model. How to call it in ClassView ?
class FeedBackView(SingleObjectMixin, FormView):
template_name = 'single-project.html'
model = Project
form_class = ReviewForm
login_url = '/login'
model.get_vote_count # property
Georg
hello. How can I remove annotated fields after Entity.objects.annotate(fld=..).filter(fld=..), to get distinct() of original entities ?
Maxim
Georg
again?
Georg
to make two queries?
Maxim
Georg
I wish not to do overhead of queries
Doragonsureiyā
Georg
haha
Georg
Georg
nope, no any aggregations.
I have two models: Entity and Sub (for example). I need to join Entity and Sub, filter by some kind of computed field of Sub, then get a pure Entity records (without duplicates, so Sub is a detail model)
ꜱᴀᴇᴇᴅ
Hello friends
I want to model the products
Read the products that are similar to one of the products from the database
Now I want to add an item to each of these products that can be found to identify whether the logged in user has been liked or not.
And the information related to the likes of products is in another model whose fields are user and product
Is it possible to do something like this?
Aritra
Hi!
I have a model with an imageField in django. It is actually the Profile Picture of an User. Whenever a user signs up (we don't ask him for the picture), we generate a random image (by an API call) and want to put that as his Profile Picture.
Here is my Profile Model:
class Profile(models.Model):
user = models.OneToOneField(User, on_delete=models.CASCADE)
dp = models.ImageField(...)
...
Here is a part of my views.py
profile = Profile(
user = user,
# dp = the random image,
)
profile.save()
Suppose I have a function get_random_dp() to get the url of the random profile image
Manoj
I have a problem
Manoj
fm.cleaned_data['name']
Manoj
is returning an error
Manoj
object has no attribute 'cleaned_data'
Manoj
'StudentRegistration' object has no attribute 'cleaned_data'
Sarvar
Uzmanium
Hi Everbody, I have set up a project called userServices with Microservices architecture, Django, Rest Framework, SimpleJWT, Dj-Rest-Auth and AllAuth and it's working.
I have to keep the User Database somewhere else. (by law - GDPR)
The other two teams programmed the product and content microservices with Django. These are using the same database.
I also looked at session sharing but it doesn't work in api calls due to Token check.
How should I go about the common Api Auth of other django projects?
Uzmanium
I will try solution by setting up custom OAuth service.
https://django-oauth-toolkit.readthedocs.io/en/latest/index.html
Sebastian
Hello community, I am designing a SAAS system but I have the question of how to limit the space in the cloud for each user. In other words, I would like to separate it by plans, the more you pay, the more memory. Is the limit and separation of these done directly with the service provider, for example aws, azure, Google or is it programmed directly into the software? Thank you
Daniel
Guys, how do i add more than one item to a FK?
sports_lover.
hello, guys,I am using django as backend
I am sending the custom token to the frontend through the login data's response,Because of sending in response that token shows me in network tab after inspect function. If the token appears in the Network tab, what can be the problem with security? Or what secret path could I take to send the token?
Daniel
Gaurav
File "C:\Users\HP\Desktop\celery\env\lib\site-packages\redis\connection.py", line 599, in <lambda>
lambda: self._connect(), lambda error: self.disconnect(error)
TypeError: Channel._connparams.<locals>.Connection.disconnect() takes 1 positional argument but 2 were given
Gaurav
getting this error while settuping celery with django
K
I am python developer I have 6 years good experience in django..so any good work for me so plzz message me...
🧚♂️
Hello, I tried to deploy on the railway, gives this error
🧚♂️
Application Error
Is your app correctly listening on $PORT?
🧚♂️
web:
build: .
ports:
- "8000:8000"
command: sh -c "python manage.py migrate && python manage.py collectstatic --noinput && python manage.py runserver 0.0.0.0:$PORT"
Anurag
how to solve iterable problem... i have passed a queryset but it is not iterating in template for loop
Jaanleva
Hello Everyone, I'm facing an issue while downloading blob from the azure storage. Please check https://stackoverflow.com/questions/74832025/downloding-blob-from-azure-storage-taking-too-much-time Any help would be highly appreciated.
Anurag
Georg
is there any way to do unique constraint with condition on a model if this model is an inherited model and fields for to unique is in the last model of hierarchy but a constraint field is in the parent model?
Georg
I think that RDBMS can't do that.. but maybe it is possible in django engine level
Georg
oh.. It seems I got it. A trigger
🧚♂️
Georg
Hi, is django-suit alive for django 4.1?
Fathullo
hi guys who knows how to fix this problem
Fathullo
hi guys who knows how to fix this problem
PS C:\Users\angren\Desktop\Django-lessons\test> pipenv install django
pipenv : The term 'pipenv' is not recognized as the name of a cmdlet, function, script file, or operable program. Check the spelling of the name, or if a path was
included, verify that the path is correct and try again.
At line:1 char:1
+ pipenv install django
+ ~~~~~~
+ CategoryInfo : ObjectNotFound: (pipenv:String) [], CommandNotFoundException
+ FullyQualifiedErrorId : CommandNotFoundException
Eliphaz
Perhaps you can try to find a fork who support Django 4.1
Eliphaz
Fathullo
yes i using pipenv to create django project
Fathullo
i ware leaning django on youtube with. Programing with mosh
Fathullo
Eliphaz
To activate the virtual environment make : pipenv shell
Eliphaz
Or run directly by: pipenv run <command>
Eliphaz
But you should ensure you if pipenv is correctly installed on your system
🧚♂️
Eliphaz
Eliphaz
Yes
You see this error because railway don't find this environment variable $PORT.
You should ensure you if you have good added PORT environment variable
https://docs.railway.app/develop/variables
Fathullo
Fathullo
Eliphaz
how to add it
Ok check this to do it : https://www.pythontutorial.net/python-basics/install-pipenv-windows/
His
His
talha
I cannot use {% load static %} in external css file, in order to reverse static files I have to use it inline css but I don't want that. is there any proper fix for this?
GOJO
Krunal
How to use django_apscheduler in windows server with MS SQL server? or any other alternative to schedule django task in windoes server.
Johnnybrand
Kinder #pupu
Hi all. Maybe someone faced such a problem.
I am using ArrayField. And it doesn't translate the item limit exceeded message. That is, despite the localization settings, it writes in English. Writing your message is somehow strange, since localization is what it is for.