Currently I tend to go for the "super().save(*args, **kwargs)" (no
unnecessary return) as done in the Django documentation and to be
explicit in the present (it doesn't return anything)... but I have my
own doubts :-)
I would return the result from super() It may return None, but so do
you
That is definitely much more clear.
The usual way of doing this is to handle it like a shopping cart (plenty of
examples only a google search away).
Typically you store this information in the user's session in the first
view, then retrieve it in the subsequent view(s).
Note that
Hi django-users,
I have a a question that I don't know where to send. Since it happened
programming in Django and I usually read this list I thought of sending
it here. I would like to ask if someone has strong feelings or if I
have missed some styling documentation.
This could be a generic
Sorry I did not ask the question well.
Question:
How to first send some data with an Ajax request to Django view and then
with a post request, send the form information to the same view and use the
data sent in the previous request (Ajax request) in the second request ?
def planing(request):
Hi
How to first send some data with an Ajax request to Django view and then
with a post request, send the form information to the same view and use the
data sent in the previous request (Ajax request) in the second request ?
def planing(request):
if request.is_ajax():
This kind of error happens when working with classes. When you create
methods for a class, you must always pass self as the first argument
self designates the object in which it is called. You have to pass self as
the first argument for each method.
Does this help ?
On Tuesday, November 30,
Hi there!
I have posted this issue like 3 months ago.
https://github.com/django/channels/discussions/1736
And there are many others encountering similar problem, like this:
https://stackoverflow.com/questions/68194577/typeerror-call-missing-1-required-positional-argument-send-django/
The
The first thing you can do is create a model to save user details. Then,
you could create a mapping of users and teams using another model. This
model would establish foreign key constraint between user and team entity.
Then, the foreign key should help you in accessing team specific data.
On
I would like to know about sso. Answer related to your question is you can
use tuple before your custom user model and then pass it with
choices=created tuple ajd then in your v views just filter the team posts
according the given role.
On Tue, 30 Nov 2021, 7:02 pm Tim Chase,
wrote:
> On
On 2021-11-30 02:11, Kumar Gaurav wrote:
> How Can I group the users and show the contents related to them
> only.
You presumably have some sort of User model and have added some sort
of Group model. Depending on your business logic, either a User can
belong to one-and-only-one group in which
Define a method on your queryset that sets up the filter
class RecognitionQuerySet: def allowed(self, user): return
self.filter(team=user.team)
Class RecognitionManager: def get_queryset(self): return
RecognitionQuerySet(self.model, using=self._db)
Class Recognition: objects =
Hi Gaurav,
This might be a way of solving your situation, You can use customuser model
and then add a field like role or group ( choice field of Team A, Team B).
Once you have segregated the user in groups, you can check the user.role at
the time of log in and then redirect them to their own
Thank you very much. Then I see that I should use jupyter only for other
projects, but not for django. And you have provided me with alternatives. I
always thought these IDEs would be very expensive.
On Monday, November 29, 2021 at 10:38:11 PM UTC+1 Kasper Laudrup wrote:
> On 29/11/2021 14.22,
Hello All,
I have a recognition portal where people can post recognition for their
team members. It is being used within one team only at present.
Now I want to scale it to other teams but I want to render only the content
specific to their team coming to the portal. Means If I am from Team A
On 30/11/2021 02.25, Kay TV wrote:
Hi everyone.
First of all, instead of a generic subject and screaming things like
urgent. Try to write a more descriptive subject. It will increase the
chances of someone being willing to help you.
> Can anyone please help. I have a Django project which i
15 matches
Mail list logo