Re: ?? question ,its urgent

2022-06-23 Thread Soumen Khatua
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 +

Remove username field

2019-04-02 Thread Soumen Khatua
> > Hi folks, I want to remove username field from django.contrib.auth.User please tell me, how I can do that and also set email address as a username in inbuilt login form??? Thank you. > -- You received this message because you are subscribed to the Google Groups "Django users" group. To u

Re: Remove username field

2019-04-03 Thread Soumen Khatua
Can you send me the code link, please I'm struggling to find it or solve it. Please help. Thank you for your time. On Wed, 3 Apr 2019, 09:28 Guru Murthy, wrote: > Hi Suman khatua, >You can remove the username from admin authentication system > > -- > You received this message because you are

Regarding password and email field

2019-04-06 Thread Soumen Khatua
How I can display please enter the same password. if both password is different in django inbuilt auth forms. -- 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 dja

'WSGIRequest' object has no attribute 'Files'

2019-04-16 Thread Soumen Khatua
Hi Folks, I'm getting this error 'WSGIRequest' object has no attribute 'Files' and i didn't get proper solution in google also. I alredaty took *enctype="multipart/form-data"* in my forms tag. Here is my code snippet please provide me the solution it's urgent. Thank you in advance. *.html*

Re: 'WSGIRequest' object has no attribute 'Files'

2019-04-16 Thread Soumen Khatua
Thanks. It's working. On Tue, 16 Apr 2019, 13:22 Jani Tiainen, wrote: > Hi. > > It is .FILES all in capital. Not just first letter. > > > ti 16. huhtik. 2019 klo 10.05 Soumen Khatua > kirjoitti: > >> Hi Folks, >> I'm getting this error 'WS

Database setup

2019-04-19 Thread Soumen Khatua
Hi Folks, How can I configure xampp server provided mysql database in django. Thank you. -- 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 django-users+unsubscr..

Re: Database setup

2019-04-19 Thread Soumen Khatua
ing phpmyadmin, > attach a user to that database. > then ensure you have a driver package installed and setup for django. eg. > pymsql has worked well for. > then make the necessary changes in django settings file. > > > On Fri, Apr 19, 2019 at 9:21 PM Soumen Khatua > wrote:

Blog sharing

2019-04-24 Thread Soumen Khatua
Hi folks, I want to make on blogger website and I want to share them with social media's timeline like Facebook, instragam, twitter etc. But for each post generate the embed code is little bit time consuming. So how I can write a script where for each post can be redirect to Facebook or twitter We

Re: Blog sharing

2019-04-24 Thread Soumen Khatua
Can you share any link related to these concept??? On Thu, 25 Apr 2019, 01:42 Makori Breens, wrote: > Easy, there are several automatic sharing services out there...some free > > On Wed, Apr 24, 2019, 10:41 PM Soumen Khatua > wrote: > >> Hi folks, >> >> I want

Re: Blog sharing

2019-04-24 Thread Soumen Khatua
25 Apr 2019, 1:42 am Makori Breens >> Easy, there are several automatic sharing services out there...some free >> >> On Wed, Apr 24, 2019, 10:41 PM Soumen Khatua >> wrote: >> >>> Hi folks, >>> >>> I want to make on blogger website an

Comment Form Related issue

2019-04-26 Thread Soumen Khatua
Hi Folks, I want to show one textarea where only logged in users can comment otherwise if they are click the textareabox redirect them to login page just like youutbe comnet box. If anyone have any source code related to this please share. Thank You. Regards, Soumen -- You received this messag

Comment Form

2019-04-26 Thread Soumen Khatua
Hi Folks, I want to allow for those who are logged in if they are not logged then it will redirect to login page. if any one have any code related to this concept please share with me. For better clarity please go through this link- https://www.amazon.in/Megaliving-Monk-Who-Sold-Ferrari/dp/81722461

Re: Comment Form Related issue

2019-04-26 Thread Soumen Khatua
mmit=False) > > comment.video = video > > comment.created_by = request.user > > comment.save() > > return reverse_lazy('my_cool_place') > > else: > > form = CommentForm() > > return render(request, 'path/to/html/file.html', {'video&#x

Re: Comment Form Related issue

2019-04-26 Thread Soumen Khatua
> def CommentVideo(request, pk): <--- in views.py > > and the video is another model i used since you said like youtube. :) > > Den fre 26 apr. 2019 kl 13:33 skrev Soumen Khatua < > soumenkhatua...@gmail.com>: > >> yes,I'm new to django so let me check once.

Razorpay imtegration

2019-04-26 Thread Soumen Khatua
Hi folks, Anyone have the source code to integrate Razorpay along with full security,actually I saw their documentation but I'm still confused. If anyone have please share with me?? Thank You. Regards, Soumen -- You received this message because you are subscribed to the Google Groups "Django

Phonenumber Field

2019-05-02 Thread Soumen Khatua
Hi Folks, Actullay I didn't understand the how this code is working,Please if you guys know about the convention,can you please give me some eaxmple with explanation. *models.py* *from phonenumber_field.modelfields import PhoneNumber, PhoneNumberField* *class PossiblePhoneNumberField(PhoneNumbe

Error

2019-05-05 Thread Soumen Khatua
Hi Folks, I'm getting one error from models.py,here is my models.py. Error: from django.db.models import SubfieldBase ImportError: cannot import name 'SubfieldBase' models.py import uuid from django.conf import settings from django.db import models from django.db.models import Q, Value fro

django models

2019-05-06 Thread Soumen Khatua
Hi Folks, How this underline code works? models.py class Address(models.Model): first_name = models.CharField(max_length=256, blank=True) last_name = models.CharField(max_length=256, blank=True) company_name = models.CharField(max_length=256, blank=True) street_address_1 = model

Info

2019-05-06 Thread Soumen Khatua
Hi Folks, Should I need to pay for asking questions or problem in this group? Thank You -- 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 django-users+unsubscr.

Re: Info

2019-05-06 Thread Soumen Khatua
Sent from Mail <https://go.microsoft.com/fwlink/?LinkId=550986> for > Windows 10 > > > > *From: *Soumen Khatua > *Sent: *06 May 2019 16:52 > *To: *django-users@googlegroups.com > *Subject: *Info > > > > Hi Folks, > > > > Should I need to pay for asking ques

Re: Info

2019-05-06 Thread Soumen Khatua
Thanks guys for your help. On Tue, 7 May 2019, 00:24 Ahmed Ishtiaque, wrote: > Ignore that. I think it's someone who's set up a ploy for that e-mail to > be replied back to get some free money. > > On Mon, May 6, 2019 at 2:50 PM Soumen Khatua > wrote: > >> T

Re: Info

2019-05-06 Thread Soumen Khatua
for sure if it's a malicious attempt > to passively get some money or if it's someone not realizing his personal > spam filter is spamming a bunch of people in the group. Either way, just > block the sender and ignore it. > > On Mon, May 6, 2019 at 1:49 PM Soumen Khatua

Re: django models

2019-05-06 Thread Soumen Khatua
sblue wrote: > Soumen, > > The function looks to compare two Address objects. The as_data() call is > custom made. I saw it documented in your other post. It removes the Primary > Key and User from the Address object. I presume this is so they can compare > the hash of one addres

django models

2019-05-06 Thread Soumen Khatua
Hi Folks, I didn't understand this code please help me to understand this code. class AddressQueryset(models.QuerySet): def annotate_default(self, user): # Set default shipping/billing address pk to None # if default shipping/billing address doesn't exist default_ship

Database setup

2019-05-10 Thread Soumen Khatua
Hi Folks, I have one existing table in my database then how I can use the same table in my models.py. Thank You. -- 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 t

Redirect

2019-05-14 Thread Soumen Khatua
Hi Folks, Actually after login I want to redirect them by their name to a custome page. Assume my name is soumen so my url will be after login: *127.0.0.1:8000/accounts/soumen * But not every time only they will click on particular login button. Please

Re: Redirect

2019-05-14 Thread Soumen Khatua
Thanks for your help. But it should be redirect to these custom page if and only if I'll click login button and at the same time it should not redirect to custom page if it is coming by loginrequired functionality. Can you share me the code, please if it is possible. Thank you once again. On

TypeError

2019-05-22 Thread Soumen Khatua
Hi Folks, I'm getting this error "TypeError:" everytime, Can You guys tell me where is the problem in this code. *Cart* views.py @require_POST def cart_add(request,product_id): cart = Cart(request) product = get_object_or_404(Product,id = product_id) form = forms.CartAddProductForm(request.POST

some random problem

2019-05-22 Thread Soumen Khatua
Hi Folks, I'm getting len(cart) is 0 and after iterate *item is not coming from cart* in this project,plese tell me where is my problem. I'm sharing my git repo please go through it and please tell me the what i missed.It's urgent. Here is the link: https://github.com/Herosoumen/clothproject Th

data not coming into html

2019-05-22 Thread Soumen Khatua
Hi Folks, Guys I'm not getting my data into html after rendered that still I'm not getting my data,i'm sharing my github link: https://github.com/Herosoumen/clothproject.Please go through this link.Please guys help me it's urgent. Thank You -- You received this message because you are subscribe

Re: data not coming into html

2019-05-22 Thread Soumen Khatua
uctForm( initial = {'quantity':item['quantity'], 'update' : True} ) return render (request,'cart/cartdetail.html',{'

Re: data not coming into html

2019-05-22 Thread Soumen Khatua
hop templates folder outside the shop app folder? You dont > even have any static files folder, niether in shop app nor in cart app. May > be you could manage it first. BTW are you new to django? (just asking) > > On Wed, 22 May 2019, 19:03 Soumen Khatua, > wrote: > >> *cart

context must be a dict rather than RequestContext.

2019-05-30 Thread Soumen Khatua
Hi Folks, I'm using django 1.11 for this project I'm implementing payment gateway of PayuMoney but I'm getting thios error: context must be a dict rather than RequestContext. I alreday attach the source code,please let me know what i missed in this code. -- You received this message because y

Deployments

2019-06-06 Thread Soumen Khatua
Hi Folks, I develope one project using django in my localhost. Now how I can deploy that project into digital ocean and what are changes I need to do in my project for moving to production server. Please help I have no idea regarding this matter. Thank You. Regards, Soumen -- You received this

Re: Deployments

2019-06-06 Thread Soumen Khatua
https://www.digitalocean.com/community/tutorials/how-to-set-up-django-with-postgres-nginx-and-gunicorn-on-ubuntu-16-04 > > > > Regards, > Chetan Ganji > +91-900-483-4183 > ganji.che...@gmail.com > http://ryucoder.in > > > On Thu, Jun 6, 2019 at 10:33 PM Soumen Khatua > wrote: &

Server Setup Error

2019-06-12 Thread Soumen Khatua
Hi Folks, After run this command: sudo systemctl status gunicorn *● gunicorn.service - gunicorn daemon Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Wed 2019-06-12 14:01:44 UTC; 10min ago Proces

Digital Ocean server Error

2019-06-17 Thread Soumen Khatua
Hi Folks, I uploaded my project into digital ocean but at the time of run this*(sai@sai-foundation:~/saiproject$ sudo systemctl status gunicorn) *command,I'm getting this error: *● gunicorn.service - gunicorn daemon Loaded: loaded (/etc/systemd/system/gunicorn.service; enabled; vendor p

Re: Digital Ocean server Error

2019-06-17 Thread Soumen Khatua
n wrote: > could you run `journalctl -xe` tell us more about the log result > > On Mon, 17 Jun 2019, 17:08 Soumen Khatua, > wrote: > >> Hi Folks, >> >> I uploaded my project into digital ocean but at the time of run >> this*(sai@sai-foundation:~/s

Typical Django Error

2019-06-18 Thread Soumen Khatua
Hi Folks, After I turnded debug into False and Alowed host=['providedip','*']. It's showing like this: mod = import_module(mod_name) File "C:\Users\sou\AppData\Local\Programs\Python\Python36\lib\importlib\__ __.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], p

Serving staticfiles

2019-06-18 Thread Soumen Khatua
Hi Folks, After run python manage.py collrctststic all the static files copied into project_root specified folder. But after doing debug = false,the images and Css files link is not working and showing 404 error message in console. But when I did debug = True it's url and everything working proper

Re: Javascript File is not responding

2019-06-25 Thread Soumen Khatua
Thank you for your email. Now it's woring after added it under Bootstrap link. Thank You Regards, Soumen On Tue, 25 Jun 2019, 20:34 ravikumar dingari, wrote: > Can U send , How to set Forget PasswordIn django...With user models > > On 25-Jun-2019 1:25 PM, "So

Internal Server Error

2019-06-28 Thread Soumen Khatua
Hi Folks, I'm using digital ocean provided Ubuntu 16.04 version yesterday I was trying to configure PostgreSQL remotely.So I did some changes in this path: /etc/postgresql/9.5/main/pg-hba.conf and postgresql.conf. After that I cahnge it as it wasbut still I'm getting Internal server error at the pr

Database Configuration Error

2019-06-29 Thread Soumen Khatua
Hi Folks, I'm uisng Digital Ocean provided VPS and I'm using PostgreSQL and I'm gettings this error, *File "/home/sai/saiproject/env/lib/python3.5/site-packages/psycopg2/__init__.py", line 126, in connectconn = _connect(dsn, connection_factory=connection_factory, **kwasync)django.db.utils

404 not found

2019-07-01 Thread Soumen Khatua
Hi Folks, i'm using Django 1.11 and is et up everything properly but at the wrong url django redirecting to 500 page instead of 404 page.Please help me,How i can solve this problem? Here is my code: *views.py* *def error_404(request):return render(request,'shop/product/404.html',status =

django context data into javascript

2020-02-25 Thread Soumen Khatua
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

Re: django context data into javascript

2020-02-25 Thread Soumen Khatua
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: >>

Admin login problem

2020-02-26 Thread Soumen Khatua
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 .

Django Image and File

2020-02-26 Thread Soumen Khatua
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

production setup

2020-02-27 Thread Soumen Khatua
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

Re: Django Image and File

2020-02-27 Thread Soumen Khatua
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

Image Upload

2020-02-28 Thread Soumen Khatua
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']

Re: production setup

2020-02-28 Thread Soumen Khatua
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

Re: production setup

2020-02-29 Thread Soumen Khatua
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

Re: production setup

2020-03-01 Thread Soumen Khatua
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

NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
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

Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
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

Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
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

Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
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,

Re: NotImplementedError: This backend doesn't support absolute paths.

2020-03-03 Thread Soumen Khatua
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

Unique constrains failed

2020-03-06 Thread Soumen Khatua
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

ACESS FOREIGN KEY TABLE

2020-03-12 Thread Soumen Khatua
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??

Restriction to create multiple instance

2020-03-16 Thread Soumen Khatua
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

Many to many relationship

2020-03-17 Thread Soumen Khatua
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

font awesome loading problem

2020-04-08 Thread Soumen Khatua
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.

Django Pipeline

2020-05-07 Thread Soumen Khatua
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

Custom Group

2020-05-26 Thread Soumen Khatua
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

Optmized Query

2020-05-27 Thread Soumen Khatua
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

Re: Optmized Query

2020-05-27 Thread Soumen Khatua
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

Re: Optmized Query

2020-05-27 Thread Soumen Khatua
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

Re: Optimized Query

2020-05-27 Thread Soumen Khatua
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

filter on multiple tables

2020-05-28 Thread Soumen Khatua
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

Re: filter on multiple tables

2020-05-29 Thread Soumen Khatua
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

Re: Optimized Query

2020-05-29 Thread Soumen Khatua
> >> 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

Re: filter on multiple tables

2020-05-29 Thread Soumen Khatua
_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

User table inside custom table

2020-06-06 Thread Soumen Khatua
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

Bridge between two users

2020-06-09 Thread Soumen Khatua
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

Capture Content Id

2020-06-15 Thread Soumen Khatua
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

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
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

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
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

Re: Capture Content Id

2020-06-15 Thread Soumen Khatua
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

Custom Primary Key

2020-06-23 Thread Soumen Khatua
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

Re: Custom Primary Key

2020-06-23 Thread Soumen Khatua
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:

Re: Custom Primary Key

2020-06-23 Thread Soumen Khatua
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

Multiple DB

2020-07-12 Thread Soumen Khatua
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

Dynamic Set

2020-08-16 Thread Soumen Khatua
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

wrong time in query

2020-08-30 Thread 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

Re: wrong time in query

2020-08-30 Thread Soumen Khatua
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 >

muliple queryset result

2021-01-09 Thread Soumen Khatua
* * >, >, >]>* *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

Sign Up by using E-mail id

2019-07-24 Thread Soumen Khatua
Hi Folks, I want to create one signup page where end-user can SignUp and LogIn by using their e-mail id nit by Username. Please tell me how i can do that,please provide me source code for that. Thank You Regards, Soumen -- You received this message because you are subscribed to the Google Group

Re:

2019-07-24 Thread Soumen Khatua
Thanks for your response. Thank You Regards, Soumen On Wed, Jul 24, 2019 at 7:13 PM Devender Kumar wrote: > Read django allauth lib. > > On Wed 24 Jul, 2019, 4:01 PM avi gehlot, wrote: > >> You can contact me .. >> >> On Wed, 24 Jul 2019 at 3:57 PM, Soumen Kha

Model Related Issue

2019-07-27 Thread Soumen Khatua
Hi Folks, I created one Address model and I extended Profile model by using OnetoOneField of User and this Address model. But in get method I want to provide User model email,username and Address model state and Profile model all details,How I can do that ny using Django Rest Framework. Please hel

Djago Rest framework Error

2019-07-28 Thread Soumen Khatua
Hi Folks, I'm getting this error when I declared like this: def post(self, request): serializer = ProfileSerializer(data=request.data) username = request.user.username user_details = User.objects.get(username = username) if serializer.is_valid(): seria

Re: Djago Rest framework Error

2019-07-28 Thread Soumen Khatua
work.org/api-guide/serializers/#saving-instances> > . > > > On Sunday, July 28, 2019 at 2:14:31 PM UTC+5:30, Soumen Khatua wrote: >> >> Hi Folks, >> >> I'm getting this error when I declared like this: >> >> >> def post(self, request): >

Re: Djago Rest framework Error

2019-07-28 Thread Soumen Khatua
data > request_data.update({user: request.user.username}) > serializer = ProfileSerializer(data=request_data) > if serializer.is_valid(): > return Response(serializer.validated_data) > > > > > On Sunday, July 28, 2019 at 2:38:47 PM UTC+5:30, Soumen Kh

is_friend relation

2019-07-28 Thread Soumen Khatua
Hi Folks, I want to do something like if I'm creating a resource it should show is_friend equaks to True for me but for others it should be False using Django Rest Framework.Please help me,guys. Thank You Regards, Soumen -- You received this message because you are subscribed to the Google G

Re: is_friend relation

2019-07-28 Thread Soumen Khatua
Hi Pradeep, Im trying to complete this task , can You help me do that. Actually I'm new django Rest Framework 1. Model Specifications: - a custom user model called 'Profile' which has following fields (other than name, email, etc.) - phone number (must be unique)

Django inbuilt Model

2019-07-28 Thread Soumen Khatua
Hi Folks, I Extended Profile Model from dajngo inbuilt User model but Now I want call all the details those are associated with Username in Profile model. I got the username but how i cann call it in Profile model. Ex: class Profile(models.Model): user = models.ForeignKey(User,related_name = 'user

Re: Django inbuilt Model

2019-07-29 Thread Soumen Khatua
e of reverse relation. So in your case it > would mean you can access the profile from a user object with > > user.user_model > > Which is probably not what you want.. > > -Juhana > > On Sun, Jul 28, 2019 at 7:49 PM Soumen Khatua > wrote: > >> Hi Folks, >

Django Rest Framework

2019-07-29 Thread Soumen Khatua
Hi Folks, I extended User model by Profile Model but mu requirement is like If I'm creating any resource it should is_your_friend equals True or yes but for others it should show is_your_friend equals to False or No. Also one column is there called mutual friend if this friend common for me and ot

  1   2   >