Re: Use tables from database with creating models

2018-10-16 Thread Rakhee Menon
NoThere is nothing as such that I hate models...InFact models have made our work easy...Its just that I am working on an old project where all the tables were created...which was not in django so I didn't knew how to access them without models... -- You received this message because you

Using Primary key in two fields

2018-10-16 Thread Rakhee Menon
Hi Everyone, I have a scenario where one field needs to be a primary key and another field needs to be an AutoFieldand Autofield requires a condition primary_key = true I get this error django_reports.MstCompositionFm.makeid: (fields.E100) AutoFields must set primary_key=True. django_repo

Re: Use tables from database with creating models

2018-10-16 Thread Rakhee Menon
Yes 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...@googlegroups.com. To post to this group, send email to django-users@go

Re: Use tables from database with creating models

2018-10-15 Thread Rakhee Menon
I am sorry by mistake at the end I asked a wrong question .I meant to ask in the same manner how can I get or access data form database without models in Django ???Is there anyway in Django to access the data from tables without models?? -- You received this message because you are

Use tables from database with creating models

2018-10-15 Thread Rakhee Menon
Hi Everyone, As all my tables have been created in my old project I just want to access those tables using Django so without creating models how to access the table data? For eg: If PartyMaster is a table Using ORM one would have used it as PartyMaster.objects.get() however in the same

Re: Connecting Sql server to Django

2018-10-15 Thread Rakhee Menon
> Hey Vineeth, > > The last link which you gave worked like a pro..Thanks a lot for > it...Could you please help me out with one more issue... > As all my tables have been created in my old project I just want to access those tables using Django so without creating models how to access

Use tables from a database without creating models

2018-10-15 Thread Rakhee Menon
Hi, The tables are already created in a project..I just want to use the tables so please could anyone tell without creating models how to access the table data. Thanks in Advance -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsub

Re: Connecting Sql server to Django

2018-10-15 Thread Rakhee Menon
Hey!VineethThanks a lot...It worked... -- 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...@googlegroups.com. To post to this group, send ema

Re: Connecting Sql server to Django

2018-10-12 Thread Rakhee Menon
Hi Vineeth, Just had to make some changes in an old project which uses Sql Server 2014 and yeah I am using django 1.8. Is it that for the link you have given should I use Django 2.1 version or 1.8would work??? Thanks Rakhee -- You received this message because you are subscribed to the Googl

Connecting Sql server to Django

2018-10-11 Thread Rakhee Menon
Hi Everyone, In my project I want to connect SQL Server 2014 with django, I tried with the given link, https://django-mssql.readthedocs.io/en/latest/quickstart.html but it shows some error like, import pythoncom ImportError: No module named 'pythoncom'' Wh

Re: Configuration settings for Sql Server database in django

2018-10-10 Thread Rakhee Menon
Hi Vinod, Thanks for the quick response ...I also had doubt regarding which version of python and django are supported for SQL Server 2014. Thanks -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop recei

Configuration settings for Sql Server database in django

2018-10-09 Thread Rakhee Menon
Hello Everyone, Please could anyone specify what are the configuration settings to be done in Django for using SQL Server 2014 as database instead of the default sqlite. Thanks in Advance Rakhee -- You received this message because you are subscribed to the Google Groups "Django users" group

Re: Change sqlite database to sql server

2018-10-09 Thread Rakhee Menon
Hey Thanks!!! but now I get this error , Actually I am trying it on my localhost machine not able to figure out what exactly is the issue. TCP Provider: No connection could be made because the target machine actively refused it.\r\n (10061) (SQLDriverConnect); [08001] [Microsoft][ODBC Driver 1

Change sqlite database to sql server

2018-10-07 Thread Rakhee Menon
Hi everyone, I have a developed project in which I am trying to use sqlserver instead of the default sqlite database. While I do the changes I get the following error django.db.utils.InterfaceError: ('IM002', '[IM002] [Microsoft][ODBC Driver Manager] Data source name not found and no default dri

Set blank value for floatField

2018-07-03 Thread Rakhee Menon
ipdb> serializer.errors {'cast_weight': ['A valid number is required.']} In models.py cast_weight = models.FloatField(null=True, blank=True) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emai

Re: Set null value for floatfield

2018-07-02 Thread Rakhee Menon
Yeah! but now I get this error 'required': 'This field is required.', 'null': 'This field may not be null.', 'invalid': 'Invalid data. Expected a dictionary, but got {datatype}.'} ipdb> serializer.errors {'cast_weight': ['A valid number is required.']} In models.py cast_weight = models.FloatFi

Set null value for floatfield

2018-07-01 Thread Rakhee Menon
Hi, Please could anyone tell how to set null value for FloatField and when I try with null=True and blank=true I get this error AssertionError: Expected a `Response`, `HttpResponse` or `HttpStreamingResponse` to be returned from the view, but received a `` Regards, Rakhee -- You received th

hi

2018-02-10 Thread Rakhee Menon
dfgdf -- 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...@googlegroups.com. To post to this group, send email to django-users@googlegroups.c

Re: Customizable Invoice

2018-02-02 Thread Rakhee Menon
t; But it sounds to me that you should do yourself a favour and read this > before actually starting your project: > https://www.twoscoopspress.com/products/two-scoops-of-django-1-11 > > Have fun! > > > > Am Freitag, 2. Februar 2018 10:24:31 UTC+1 schrieb Rakhee Menon:

Re: Customizable Invoice

2018-02-02 Thread Rakhee Menon
No...I wanted to know if i could do it using django and if yes...how to do it?? -- 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...@googl

Re: Customizable Invoice

2018-02-02 Thread Rakhee Menon
Hi, I am going to use django. Regards, Rakhee -- 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...@googlegroups.com. To post to this group,

Customizable Invoice

2018-02-01 Thread Rakhee Menon
Hi All, I want to create a customized invoice format wherein the user can drag and drop the fields ,add columns delete columns save it and print the invoice ie I want to create a backend solution for storing the information about the invoices once any changes are done in the invoice format. For

Re: Customizable Invoice

2018-02-01 Thread Rakhee Menon
Hi Andreas, Yeah you are right I want to create a backend solution for storing the information about the invoices once any changes are done in the invoice format. For instance a customer might change the fontsize of any column, add any column or one might change the position of their company na

Customizable Invoice

2018-01-27 Thread Rakhee Menon
Hi Everyone, I want to create a customizable invoice format wherein i can drag and drop the fields to any position and can save the current format and print the invoice . Please can anyone help me out with it. Thanks in Advance Regards , Rakhee -- You received this message because you are su

varchar and text

2018-01-10 Thread Rakhee Menon
Hello!!! I am using django with postgresql.. I am just not getting the difference between varchar and text.. Can someone clear my doubt?? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails fr

Django rest framework Version

2018-01-08 Thread Rakhee Menon
Hey!!! Please can anyone tell whats the stable version of django rest framework to be used for production. Thanks in Advance. -- 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

Re: return jwt token as json

2017-10-31 Thread Rakhee Menon
class Login(APIView): def post(self, request, *args, **kwargs): import ipdb;ipdb.set_trace() username = request.POST.get('username') password = request.POST.get('password') user = Person.objects.get(username=username, password=password) #user = user[0]

return jwt token as json

2017-10-29 Thread Rakhee Menon
Unable to send jwt token as json response -- 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...@googlegroups.com. To post to this group, send

Re: Html Page rendered when i hit this below url instead of json objects

2017-09-29 Thread Rakhee Menon
Does anyone know about it??/ -- 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...@googlegroups.com. To post to this group, send email to dj

Html Page rendered when i hit this below url instead of json objects

2017-09-28 Thread Rakhee Menon
Hi Everyone, When i hit the url localhost:8000/forms it gives a html page and on the other hand when i do it through the django admin ie localhost:8000/admin/forms it gives me the result...What can be the reason??Can anyone help?? Thank You. Regards, Rakhee Menon -- You received this

Server Side Paging...How to get the totalcount of items?

2017-09-26 Thread Rakhee Menon
Hi , I was trying to do server side paging and wanted to send the totalcount of items along with itemPerPage..I have attached my code.Can anyone suggest how to do it?? Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To uns

Server side paging..How to sent the count of items??

2017-09-26 Thread Rakhee Menon
Hi , I was trying to do server side paging and wanted to send the totalcount of items along with itemPerPage..I have attached my code.Can anyone suggest how to do it?? Thanks in Advance. -- You received this message because you are subscribed to the Google Groups "Django users" group. To uns

Mark as deleted instead of actually deleting in DeleteView

2017-09-21 Thread Rakhee Menon
Hello Everyone , Can anyone tell me how to write views where, when clicked on delete button the data shouldn't get deleted only the flag should turn 0 -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop rece

Re: cors headers in django

2017-09-21 Thread Rakhee Menon
Hey, > Yes i have installed cors headers and added it in installed apps and in >> middleware > > > -- 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-use

Re: cors headers in django

2017-09-20 Thread Rakhee Menon
> > Hey!!Thanks...But I tried adding those in settings.py yet there is no > effect... and i get this error at the front end > Please check the attached images. Thanks. -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from th

Re: how to write APIview to access a specific item by using APIViews only

2017-09-06 Thread Rakhee Menon
Thanks a lot people...I haven't tried writing logics in models.As you have suggested I would like to learn writing business logic in models.So can u provide with any links showing such examples?? > > -- You received this message because you are subscribed to the Google Groups "Django users"

Re: how to write APIview to access a specific item by using APIViews only

2017-09-06 Thread Rakhee Menon
Thanks a lot James :-) > > -- 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...@googlegroups.com. To post to this group, send email to djan

Re: how to write APIview to access a specific item by using APIViews only

2017-09-05 Thread Rakhee Menon
Customization in the sense..I have lot of calculations to do so its not possible using viewset. -- 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+uns

Re: how to write APIview to access a specific item by using APIViews only

2017-09-05 Thread Rakhee Menon
> > But while using APIView there is no retrieve method.We have only >> get,post,delete and put methods. >> > As there is lot of customization in my API i need to use APIViews only... > So please tell me how to access specific items using APIViews > -- You received this message because you are

Re: how to write APIview to access a specific item by using APIViews only

2017-09-05 Thread Rakhee Menon
On Tuesday, September 5, 2017 at 8:06:09 PM UTC+5:30, Vijay Khemlani wrote: > > To retrieve a particular object in your API you should implement it in a > method called "retrieve", not "get", if I remember correctly > > On Tue, Sep 5, 2017 at 10:28 A

how to write APIview to access a specific item by using APIViews only

2017-09-05 Thread Rakhee Menon
CODE: class FormList(APIView): def get(self, request, id): import ipdb;ipdb.set_trace() item_obj = ItemMaster.objects.get(id=id) serializer = ItemMasterSerializer(forms,many=False) return Response(serializer.data, content_type="application/json") def get(self,request): forms = ItemMaster.objects.a

APIView or ListAPIView,RetrieveAPIView while developing a restful application

2017-09-05 Thread Rakhee Menon
I am developing a restful application with angular technology as front end and django at the back end..Please can anyone suggest which type of views should I use,Should I go for APIVIEW or separate views like ListAPIView,RetrieveAPIView or in any case go for viewset -- You received this messa

APIView or ListAPIView,RetrieveAPIView while developing a restful application.

2017-09-05 Thread Rakhee Menon
​I am developing a restful application with angular technology as front end and django at the back end..Please suggest which type of views should I use,Should I go for APIVIEW or separate views like ListAPIView,RetrieveAPIView or in any case go for viewset​?? -- You received this message bec