Better use JSON Field to store all the informations
On Mon, Jun 20, 2022 at 12:16 PM Abhinandan K
wrote:
> how to store the data in django databse table if user append fields
> according to their need
> for example i have 1 one field 1) name 2) age 3) salary and the sign('+)
> if user click on +
*
* >,
>, >]>*
*Instead of returnning one matched object inside queryset it's returnning
three matched object because I have three contact details for this user.*
*Thank you in advance*
*Regards,*
*Soumen Khatua*
--
You received this message because you are subscribed to the Goog
no,directly I'm using *TIME_ZONE = 'Asia/Kolkata',*
On Sun, Aug 30, 2020 at 11:37 PM Kunal Solanke
wrote:
> Are you using timezone for saving time
> which is exported from django.utils or the python datetime module?
>
> On Sun, Aug 30, 2020, 23:34 Soumen Khatua
>
Hi Folks,
In my model one *column *is their called *start *which is *datetime field*
and start is storing *datetime *by using *django specific datetime field*
like: *Aug. 30, 2020, 7:44 p.m. *
But after ran one *get *query when I tried to access the date and time,I'm
getting wrong time like: *2020
multiple hours on this problem.but still I don't have any
clue what is the way to solve it.
Thank you
Regards,
Soumen Khatua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails f
Hi Folks,
Actually I want to set up multiple Databases like one DB for User-specific
table and another DB for Blog Post, But in this case, User should be a
Foreign Key in Post table. Is it possible to do that, if it is then How I
can write a query(ORM)?
Thank you
Regards,
Soumen
--
You receiv
Yes, at the time of add a new record in model, automatically I want to
create a custom ID and insert it into model
On Wed 24 Jun, 2020, 7:18 AM Clive Bruton, wrote:
>
> On 23 Jun 2020, at 23:32, Oleg Kishenkov wrote:
>
> > Hello Soumen, you should use a CharField with the primary_key=True
> > at
odels/fields/#primary-key
>
> You should be able to create a field in your model and set the primary_key
> to True
>
>
> On Tue, Jun 23, 2020 at 1:18 PM Soumen Khatua
> wrote:
>
>> Hi Folks,
>>
>> In Django is there any way to create custom Primark Key like:
Hi Folks,
In Django is there any way to create custom Primark Key like:
M01234GH, M056YUOIP, etc.
Please help me guys.
Thank you in advance
Regards,
Soumen Khatua
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe
Thank you for your response.
On Tue 16 Jun, 2020, 6:29 AM Soumen Khatua,
wrote:
> Yeah but in this way the time complexity will be very high, just think if
> I'll have more than 1 million post than it will check all the field if it
> is available or not.
> However my query is
slug = '{}-{}'.format(slug, num)
>> num += 1
>> return unique_slug
>>
>> def save(self, *args, **kwargs):
>> if not self.slug:
>> self.slug = self._get_unique_slug()
>> super().save(*args, **kwar
Could you give me an example??
On Mon, Jun 15, 2020 at 1:21 PM Kayode Oladipo
wrote:
> There's an id field built into every Django model (aka, the primary key
> (pk))
>
> Just do, ModelInstance.id and that should do the trick.
>
> Cheers.
>
> On Mon, Jun 15, 2020, 8
Hi Folks,
I have one Blog post project here user can see the blog and by clicking on
the blog title they can see the details of the blog, so here Slug will be
working here as a URL,but in the details view, How I can fetch that
particular content details without having the ID because slug/title is
Hi Folks,
I have one Follower system and here I want to check those are following to
me, we have a mutual connection or not. If they are following to me and
I'm not following to them, I want to set in frontend follow back. Inside
the views I'm fetching the data and sending them to serializer bu
Hi Folks,
Actually my problem is very simple, here I'm calling to those users I'm
following but whenever I'm sending the data inside the serializers.I'm not
getting any value. I don't know what is happening here?!
*models.py---*
*class Follow(models.Model):follower = models
_name="Example")
>
> Or:
>
> User.objects.filter(profile__profiles__institute_name__in=["Example 1",
> "Example 2"])
> אורי
> u...@speedy.net
>
>
> On Thu, May 28, 2020 at 11:27 PM Soumen Khatua
> wrote:
>
>> Actually I wa
>
>> Saygılarımla,
>> Sencer HAMARAT
>>
>>
>>
>> On Fri, May 29, 2020 at 7:32 AM אורי wrote:
>>
>>> Hi Soumen,
>>>
>>> Sometimes prefetch_related is much faster and more efficient than
>>> select_relate
r table by using __, for
> example:
>
> User.objects.filter(profile__profiles__institute_name="Example")
>
> Or:
>
> User.objects.filter(profile__profiles__institute_name__in=["Example 1",
> "Example 2"])
> אורי
> u...@speedy.net
>
>
> On T
Actually I want to filter all users those are matched with currently logged
in users based on location or education details like maybe institute_name
or specialization. Is it possible to search in multiple tables?!
I almost spent 2 days but still I stuck in the position.
Any help would be appreciat
Actually I want to fetch all users from User table and users location from
Location table which is many to many relation from same Profile table. Is
it possible???
On Thu 28 May, 2020, 2:54 AM Soumen Khatua,
wrote:
> Now I'm facing one problem whenever I'm trying to iterate a loop
ds,
Soumen
On Thu, May 28, 2020 at 2:12 AM Chetan Ganji wrote:
>
> Profile.objects.filter().select_related("user").prefetch_related("location")
>
> On Thu, May 28, 2020, 2:01 AM Soumen Khatua
> wrote:
>
>> I also know about this concept but I
il.com
> http://ryucoder.in
>
>
> On Wed, May 27, 2020 at 4:51 PM Soumen Khatua
> wrote:
>
>> Hi Folks,
>> I have many to many relationships and Foreign Key in the table, I'm using
>> select_realted(foreign key filed name) to optimize the query but I want to
Hi Folks,
I have many to many relationships and Foreign Key in the table, I'm using
select_realted(foreign key filed name) to optimize the query but I want to
fetch many to many and foreign key at the same time , How I can do this in
very optimized way?
Thank You
Regards,
Soumen
--
You received
Hi Folks,
Actually my requirement is a registered user can create a room/group where
n(could be any number) number of peoples can join for a certain period of
time like 1 hr,But I don't have any idea about this,How I can do this in
Django?!
Any help will be appreciated
Thank You
Regards,
Soumen
Hi Guys,
I want to use Django-pipeline library, Does anyone know how I can use it?
I'm also using AWS S3 storage. Any help will be appreciated.
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and s
Hi Folks,
I'm using AWS S3 bucket for my django project,now I want to serve all the
sattic files using this s3 bucket. So I copied all the all static file from
CDN and websites to my S3 bucket.All are working fine for font-awesome I'm
getting some error like:
*Access to font at
'**https://xyz.s3.
Hi Folks,
I'm using many to many relationship of a model by I'm not able update one
person record. I don't know how to update a particular person's record when
I'm using many to many relationship.
Thank you
Regards,
Soumen
--
You received this message because you are subscribed to the Google G
Hi Folks,
Actually I'm extending user model as foreignkey into my own model called
Skills. So, suppose a user called X has skill of python and another user
called Y has the same skill set then I'm creating two instance into my
Skills table. But I want to do something like if X and Y have same skil
Hi Folks,
My profile model is Foreignkey in another model called Skill,Now I fetch
all the data of this user from Profile table(model) and store it into a
variable called user_profile and now my query is I want to fetch the data
of the Skill table(model) by using this variable.How I can do that??
Hi Folks,
I'm extending user model as OneToOneField in my own model. So it's mean one
user can contain only one field. But if I'll try to do another request I
getting unique contrainr failed so as of now it's absolutely fine. But my
query is I want to handle this error and send a message to that u
Could you tell me how I can save image in aws S3 bucket after resizing the
image into some random pixels??
Thank you
On Wed, Mar 4, 2020 at 12:11 PM Soumen Khatua
wrote:
> obj.save(force_insert=True, using=self.db)
> TypeError: save() got an unexpected keyword argument 'f
obj.save(force_insert=True, using=self.db)
TypeError: save() got an unexpected keyword argument 'force_insert'
[04/Mar/2020 12:11:16] "POST /register/ HTTP/1.1" 500 108601
On Wed, Mar 4, 2020 at 12:00 PM Soumen Khatua
wrote:
> okay..sure
>
> On Wed, Mar 4,
okay..sure
On Wed, Mar 4, 2020 at 11:56 AM Naveen Arora
wrote:
> Can you share the complete traceback of error + what are you passing and
> where so that i can understand the flow. ?
>
> Cheers
>
> On Tuesday, 3 March 2020 19:15:56 UTC+5:30, Soumen Khatua wrote:
>>
&g
2020 13:46:11 UTC+5:30, Soumen Khatua wrote:
>>
>> Hi Folks,
>>
>> I'm using AWS S3 Bucket to store media folder(images) but I want to
>> resize each every image in 300*300. So, I'm overriding the save method
>> inside django model class. But I'm
Hi Folks,
I'm using AWS S3 Bucket to store media folder(images) but I want to resize
each every image in 300*300. So, I'm overriding the save method inside
django model class. But I'm getting one error caled:
* NotImplementedError: This backend doesn't support absolute paths.*
*My django models
Actually I'm storing this files in aws s3 bucket..but I want to know Is it
a good practice to store all the images and documents inside media folder.
On Sat 29 Feb, 2020, 6:45 PM Appu Yadav, wrote:
> store image and documents in aws bucket or Google stroage
>
> On Sat, 29 Feb 2020, 10:25 Naveen
Okay, sure.
Thank you for your response.
On Sat 29 Feb, 2020, 11:33 AM Naveen Arora,
wrote:
> Hi
>
> have a look at this -
> https://github.com/codingforentrepreneurs/Guides/blob/master/all/Heroku_Django_Deployment_Guide.md
>
> Cheers
>
> --
> You received this message because you are subscribe
oject.com/en/3.0/howto/static-files/
>
> Have a look here. Hope it helps :)
> Cheers
>
> On Thursday, 27 February 2020 16:48:46 UTC+5:30, Soumen Khatua wrote:
>>
>> Hi Folks,
>>
>> I'm storing users images and documents inside media folder during
>> d
Hi Folks,
I'm using DRF APIView to upload images, but I don't know how to write a
POST request to accept image. Please advise me how I can do it?
my *serializers.py*
*class ImageSerializer(serializers.ModelSerializer):class Meta:
model = Profilefields = ['user','profile_pic']
me name NOTE make sure that you have a media
> folder added to you your settings.py file or you can pass the path to where
> to save the image like this fs = FileSystemStorage(location=
> 'media/rent_pictures/') Hope this helps another thing is that image is
> also a file and
Hi Folks,
I'm storing users images and documents inside media folder during
development. but I don't how to serve this files for production level.Any
one have any idea, actually I read the documentation but I'm still confuse.
Thank You in advance
regards,
soumen
--
You received this message b
Hi Folks,
Actually I have one image filed called profile_pic and another is file
field called documents but I don't know what is best practise to store it.
Most importantly how I can make each user details is unique.
Thank you in advance
Regards,
Soumen
--
You received this message because yo
Hi Folks,
after creating superuser by using this command python manage.py
createsuperuser. Whenever I'm entering the same(exact) login
credentials.I'm getting this error:
Please enter the correct phone number and password for a staff account.
Notethat both fields may be case-sensitive .
But I'm getting one error
On Tue 25 Feb, 2020, 5:59 PM Naveen Arora,
wrote:
> Hi, this is simple just enclose {{name}} into " " as "{{name}}" for your
> part.
>
> Thanks
>
> On Tuesday, 25 February 2020 15:56:05 UTC+5:30, Soumen Khatua wrote:
>>
Hi Folks,
I'm sending some context data into html like
name = 'soumen'
return render(request,'xyz.html', context = {'name':name})
inside myjs.js(js script has been integrated to html):
---
var my_name = {{name}};
I'm getting an erro
If I'm using serializer then it's working fine but I want to return only
database object. So for that Do I need to add serializer.
Thank you for your response.
On Thu 20 Feb, 2020, 11:17 PM MTS BOUR, wrote:
> Can you show us your serializer.py file?
>
>
> Le jeu. 20 fé
Hi Folks,
I'm getting this error, I don't know how to solve it:
*File
"C:\Users\TildeHat\AppData\Local\Programs\Python\Python38-32\lib\json\encoder.py",
line 179, in defaultraise TypeError(f'Object of type
{o.__class__.__name__} 'TypeError: Object of type User is not JSON
serializable*
*
Hi Folks,
I want to run a script or url at the time of django server loading.So Does
this possible,If yes could you tell me,How?
Thank you in advance
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this gr
the CSV file is loading inside the AutoComplete(class) constructor
On Mon, Feb 17, 2020 at 10:44 PM Soumen Khatua
wrote:
> The CSV file is in project folder.Could you send me any code
> snippet,Please?
>
> Thanks for your time.
>
>
>
> On Mon, Feb 17, 2020 at 10:39
the problem is due to continued
> resubmission.
>
> Sent from my iPad
>
> > On 17-Feb-2020, at 7:14 PM, Kasper Laudrup
> wrote:
> >
> > Hi Soumen,
> >
> >> On 17/02/2020 14.31, Soumen Khatua wrote:
> >> Hi Folks,
> >> Actually I wa
;>
>>
>>
>>
>> *else:self.keys.append(row[1])
>> print("constructor execution")global tt = Trie()
>> t.formTrie(self.keys) def post(self,request):key = request.data
>> print("
il.com> wrote:
>
>> i faced the same problem while i was dealing with CSV file.
>> i gave a unique file in csv to make a check on the particular entry. by
>> this way, i avoided multiple entries in my database
>>
>>
>> On Mon, Feb 17, 2020 at 7:30 PM Soumen
Yeah, I'm trying to do it in your way but somehow it's not working in my
script.
Thanks for your valuable time.
On Mon, Feb 17, 2020 at 7:27 PM Kasper Laudrup
wrote:
> Hi Soumen,
>
> On 17/02/2020 14.51, Soumen Khatua wrote:
> > Okay.
> > Is it possible to lo
Okay.
Is it possible to load the csv file one time do the POST or any request
multiple times without loading the same file.Of course If it is in same
class??
On Mon, Feb 17, 2020 at 7:14 PM Kasper Laudrup
wrote:
> Hi Soumen,
>
> On 17/02/2020 14.31, Soumen Khatua wrote:
>
Hi Folks,
Actually I want to load the csv file for first time only afterwards I don't
want to load the csv files,but everytime when i'm calling the url the same
csv fie is loading for the same operation.How I can restrict it for
multiple loadings?
*Here is my code:*
*class Autocom
okay,thank you
On Mon, Feb 17, 2020 at 5:46 PM onlinejudge95
wrote:
> On Sun, Feb 16, 2020 at 11:09 AM Soumen Khatua
> wrote:
>
>> Hi Folks,
>>
>> I have a model where user can upload their image.
>>
>
> I am assuming you are not storing the image as a
Okay
On Sun 16 Feb, 2020, 11:37 AM Devender Kumar, wrote:
> Read about cloudfront that will help you for sure.
>
> On Sun, 16 Feb, 2020, 11:03 am Soumen Khatua,
> wrote:
>
>> Actually I'm using s3 bucket but I want to convert it as a CDN. Could you
>> tell me ho
Hi Folks,
I have a model where user can upload their image. But after uploading a new
image the old image is still their but as for my convention if a user
upload his new image the old image should not be their, If anyone know
please tell me How I can do that??
Thank you
Regards,
Soumen
--
You
Feb, 2020, 12:32 pm Soumen Khatua,
> wrote:
>
>> Yes,I want to use CDN for my static files. But I don't know how to
>> implement it.
>>
>> On Wed, Feb 12, 2020 at 9:04 PM Devender Kumar
>> wrote:
>>
>>> Some CDN
>>>
>>> On We
Yes,I want to use CDN for my static files. But I don't know how to
implement it.
On Wed, Feb 12, 2020 at 9:04 PM Devender Kumar wrote:
> Some CDN
>
> On Wed, 12 Feb, 2020, 7:18 pm Soumen Khatua,
> wrote:
>
>> Hi Folks,
>> Where I need to store images and pdfs f
Hi Folks,
Where I need to store images and pdfs for production level.
Thank you in advance
regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to djan
Hi Folks,
Actually I want to implement memcache service into my project but I don't
know How to implement it with proper scalability. If anyone have any idea
or code snippet, please share with me.
Thank you
Regards,
Soumen
--
You received this message because you are subscribed to the Google Gr
Hi Folks,
I wrote one python file which is a Trie algorithm but i don't know how to
implement it in Django and javascript. Please help me regarding this matter.
Thank you in advance
regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" gro
m
> which is language agnostic. Technically, it shouldn't be asked in the
> Python Mailing list too.
>
> Keep a watch on your inbox though. :)
>
> Thanks,
> onlinejudge95
>
> On Sat, Feb 8, 2020, 3:06 PM Soumen Khatua
> wrote:
>
>> from collections impo
from collections import defaultdict
class TrieNode():
def __init__(self):
self.children = defaultdict()
self.terminating = False
class Trie():
def __init__(self):
self.root = self.get_node()
def get_node(self):
return TrieNode()
def get_index(self, ch):
return ord(ch) - ord('a')
def insert
Okay,sorry I thought Wireshark some code snippet. Now i got it.
Thank you
On Tue, Feb 4, 2020 at 5:46 PM Kasper Laudrup wrote:
> Hi Soumen,
>
> On 04/02/2020 13.02, Soumen Khatua wrote:
> > Yeah I did whatever you said but still I'm facing the same issue, But
> > same
>
> On 04/02/2020 12.50, Soumen Khatua wrote:
> > My views.py file
> >
> > *def post(self, request,*args, **kwargs):
> > """
> > Create a Job record
> > :param format: Format of the Job records to return to
> >
:return: returns a successfully
created job record"""seekers_data =
validated_data.pop('seekers_name',None)return
Job.objects.create(**validated_data)return validated_data*
*But it's working in POSTMAN Tool*
*Thank you for your resp
ld you tell me why I'm getting this error?
but in POSTMAN it is woking properly.
On Tue, Feb 4, 2020 at 4:11 PM Kasper Laudrup wrote:
> Hi Soumen,
>
> On 04/02/2020 09.01, Soumen Khatua wrote:
> > Hi Folks,
> >
> > Actually now I'm usng POSTMAN for all ope
Hi Folks,
Actually now I'm usng POSTMAN for all operation like GET,POST,PUT,PATCH and
DELETE. But I want to do the same thing by using Curl Command, Could anyone
tell me what are the commands for CURL.I'm providing my end point below and
most important I'm using Basic Authentication.
1) http://12
Okay
Thanks for the information.
On Wed, 22 Jan 2020, 02:11 Irfan Khan, wrote:
> No I didn’t check that one, it will generate unique id’s for you but how
> many you wanted to generate you must write code explicitly with some logic
>
> On Wed, 22 Jan 2020 at 1:43 AM, Soumen Kha
Irfan- Are you sure it will generate unique id for 10 billion people.
On Wed, 22 Jan 2020, 01:39 Irfan Khan, wrote:
> Here you can check this link for reference
>
> https://pypi.org/project/nanoid/
>
>
> On Tue, 21 Jan 2020 at 9:02 PM, Soumen Khatua
> wrote:
>
Hi Folks,
I want to start my primary key from saome random number like: (onwards)
but not from 1. How I can do that in django?
Thank you in advance
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this g
ok
On Tue, Jan 21, 2020 at 11:19 PM Kasper Laudrup
wrote:
> Hi,
>
> On 21/01/2020 13.34, Roger Gammans wrote:
> > Hi
> >
> > The precise details of this depend on your hosting environment, but the
> > canonical method is request.get_host() ; see
> >
> https://docs.djangoproject.com/en/3.0/ref/r
Could you share any documentation link,please??
On Tue, 21 Jan 2020, 20:45 Irfan Khan, wrote:
> You can use nano library to generate unique numbers or characters
>
> On Tue, 21 Jan 2020 at 8:41 PM, Soumen Khatua
> wrote:
>
>> Hi Folks,
>>
>> Is their any oth
Hi Folks,
Is their any other library or module is available except UUID which can
generate unique number in python?
As I mentioned earlier I want to use random unique number in django for
billion user. Just like account number,please tell me any unique module.
Thank You In advance
Thank You
Re
I want to show the users/clients IP address
On Tue, Jan 21, 2020 at 5:29 PM bharat pamnani
wrote:
> hostname -I will give you the ip of user.
>
> On Tue, Jan 21, 2020 at 5:27 PM Soumen Khatua
> wrote:
>
>> Hi Folks,
>>
>> In my Django application I want to sh
Hi Folks,
In my Django application I want to show IP address of users, Just like
others financial websites. How I can do that using Django(of course it's
should be free cost).
Thank You in advance
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Dj
Thank you for your email
On Mon, Jan 20, 2020 at 3:09 PM Kasper Laudrup
wrote:
> Hi again,
>
> On 20/01/2020 10.22, Kasper Laudrup wrote:
> >
> > You want to generate a number between 0 and 1.000.000 that should be
> > unique for 10.000.000.000 instances?
> >
> > I hope you can understand why th
Hi Folks,
I want to generate unique 6 digit primary key for django models and I want
to generate this for 10 billon users. So guys please could you tell me How
I can do that?
I tried UUID module but it's generating some big numbers.
Thank you
Regards,
Soumen
--
You received this message becau
Hi Folks,
*Actually I'm extending User table in some other table and this current
table I'm extending soe other table. But this time I want to filter by
using first table username How can i Do that?*
*Example:*
*class FirstTable(models.Model):*
*user_by = models.ForeignKey(user,related_na
Hi Folks,
After changing the model name,I'm getting some error, like initially my
model name was some thing like this:
class new_model(models.Model) but now I'm change it to class
NewModel(models.Model) but after migrate I'm getting this error:
*File
"/home/sou/tildehat_platform/env/lib/pytho
Hi Folks,
I'm sending the json data from postman. But Inside my python code when I'm
doing:
Suppose my json data:
*{ "name" : "soumen" }*
*data = request.data*
*print(type(data)) # *
*How it is possible without using serializer, how data converted
automatically?*
Thank You
Regards,
Soumen
-
jFc/Django-DRF-Boilerplate-with-otp-verification
>
> On Fri, 10 Jan 2020, 12:35 pm Soumen Khatua,
> wrote:
>
>> Hi Guys,
>> In Django we have some inbuilt class for password rest and confirmation.
>> But In Django rest framework ,How can I do that?
>>
&
Hi Guys,
In Django we have some inbuilt class for password rest and confirmation.
But In Django rest framework ,How can I do that?
Please share any code snippet or link.
Thank you in advance
Regards,
Soumen
--
You received this message because you are subscribed to the Google Groups
"Django u
tman as well.
>
> Thanks
>
> On Thu, 9 Jan, 2020, 11:49 PM Soumen Khatua,
> wrote:
>
>> post method is working on browser but I'm getting the error in post man?
>>
>> On Thu, Jan 9, 2020 at 10:27 PM Integr@te System <
>> datacentral...@gmail.com> wrot
guide/authentication/#sessionauthentication
>
> Nice.
>
>
>
>
> On Thu, Jan 9, 2020, 22:25 Soumen Khatua
> wrote:
>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
gt;
>> Use try catch and send whatever response you want to send
>>
>> On Wed, 8 Jan 2020, 10:36 pm Soumen Khatua,
>> wrote:
>>
>>>
>>> *seriazlizers.py*
>>>
>>>
>>>
>>>
>>>
>>>
>>&
status.HTTP_200_OK)except User.DoesNotExist:
return Response({"deatils": "user not found"},status =
status.HTTP_404_NOT_FOUND)*
*On Thu, Jan 9, 2020 at 8:42 PM Suraj Thapa FC > wrote:*
> *Code...? *
>
>
> *On Thu, 9 Jan 2020, 8:40 pm Soumen Khatua,
Hi Folks,
In django rest framework,I extend the LoginApiView(APIView) but when I'm
passing username and password in browser it logn successfully but in post
man I'm getting :
*{"detail": "CSRF Failed: CSRF token missing or incorrect."}*
Do I need to use csrf_exempt inside APIView(post) requ
tf-8') if you are using python 3
>
> Thanks
>
> On Thu, Jan 9, 2020 at 1:01 PM Soumen Khatua
> wrote:
>
>> Hi Folks,
>>
>> *If I'm sending data into json format like this:*
>>
>> *{ "name":"soumen","passwor
Hi Folks,
*If I'm sending data into json format like this:*
*{ "name":"soumen","password":"@sou123"}*
*but in my python class,If doing something like this:*
*type(request.data.get("name") #<'class Dict'> *
*How it is possible without using serializer,How I can do access json data
diresctly?*
nt to raise validation error that email should
be unique and password should be alphanumeric character in json format?
On Wed, Jan 8, 2020 at 9:44 PM Suraj Thapa FC
wrote:
> For email you can set email field in model as unique=True and the password
> should be stored in hash..
>
>
Hi Folk,
What is the process to validate fields in django rest framework?
like email and phone number should be unique and password should be
alphanumeric character only.
Where i need to write the logic inside serializers or views part and how i
can do that?
Thank you in advance
Regards,
Soumen
output_string += order[index]
>>
>> print()
>> print(input_string)
>> print(output_string)
>> print()
>>
>>
>>
>>
>> Regards,
>> Chetan Ganji
>> +91-900-483-4183
>> ganji.che...@gmail.com
>> http://ryuco
Hi Folks,
I'm stucking in this problem from 5 hours but still I'm not bale to logic
to solve this problem, Please help me guys to solve this problem:
Example:-
input: h123456ello
output: o123456lleh
input: th34isisast56ring3
output: gn34irtsasi56siht3
Thank you in advance.
regards,
Soumen
--
*class UserViewSet(viewsets.ModelViewSet):queryset =
get_user_model().objectsserializer_class = UserSerializerdef
get_permissions(self):if self.request.method == 'POST':
self.permission_classes = (AllowAny,)return super(UserViewSet,
self).get_permissions()*
I didn't und
lso uppercase email is accepted in the login form. The email is always
> saved as lowercase in the database (when the user registered or adds a new
> email address).
>
> אורי
> u...@speedy.net
>
>
> On Sun, Nov 24, 2019 at 7:55 AM Soumen Khatua
> wrote:
>
>>
Hi Folks,
Any have any idea in real time how programmers manage email id as username
only. Because django provide different fields for username and email id. So
how I can overcome to this problem??
Thank you in advance.
Regards,
Soumen
--
You received this message because you are subscribed to
r
> the parameter name is a bit strange - see here for examples and a
> description:
> https://www.django-rest-framework.org/api-guide/serializers/#validation
>
> https://www.django-rest-framework.org/api-guide/serializers/#object-level-validation
>
> Med vänliga hälsningar,
>
>
1 - 100 of 177 matches
Mail list logo