I wanna to store multiple value in django model using DRF e.g. i have to
choose three days from a week. I am using django rest framework. I have
tried many solution but failed
1. Which field i have to implement in django model? CharField? Postgre
ArrayField?
2. How to serialize the data to s
class UserManager(DjangoUserManager):
def create_one_user(self, username, email, password, **extra_fields):
return self._create_user(
username, email, password, type="one", **extra_fields
)
def create_two_user(self, username, email, password, **extra_fields):
return self._create_user(
username, em
*I am trying to add a token to graphene-django headers using pytest. But
It always return that user is anonymous as shown at the end but it
should return user as token is added in fixture@pytest.fixture def
client_query(client): def func(*args, **kwargs): return
graphql_query(*args, **kwargs, clien
Use intersection
On Wed, Jan 26, 2022, 4:06 PM bnmng wrote:
> Thank you. I think I'll go with sets as advised, although this method
> also looks very neat:
> intersection = [item for item in list1 if item in list2] found at
> https://datagy.io/python-intersection-between-lists/
>
>
>
>
> On Tue
a = [1,2,3,4]
b = [3,4,5,6]
Convert list a to set
a_set = set(a)
print(a_set.intersection(b))
On Wed, Jan 26, 2022, 5:47 PM Muhammad Shehzad
wrote:
> Use intersection
>
> On Wed, Jan 26, 2022, 4:06 PM bnmng wrote:
>
>> Thank you. I think I'll go with sets as advise
5 matches
Mail list logo