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

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

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

Re: django admin widget

2018-10-15 Thread Bob Bobsled
Hi, The idea for a separate model for author with a foreign key back to book is interesting. I hadn't thought of that. Thanks for the ideas about how to approach this problem. On Sat, Oct 13, 2018 at 12:10 PM Ryan Nowakowski wrote: > I've done something similar in the past but I use a

Re: Create data from django models from .csv file using pandas library

2018-10-15 Thread Gaurav Toshniwal
import pandas as pd df = pd.read_csv(RESOURCE_ROOT + '/data_files/102018_core_business.csv') for index, row in df.iterrows(): business_instance, created = Business.objects.get_or_create(business_id=row['id'], business_name=row['name']) On Monday, October 15, 2018 at 3:12:45 PM UTC+4,

Re: NoReverseMatch at /blog/

2018-10-15 Thread Gaurav Toshniwal
I think it's because the 4th parameter to the URL config is \w+, which means match one or more words, which is not the case while trying to construct the reverse URL, since the 4th parameter passed is an empty string. On Monday, October 15, 2018 at 9:57:44 PM UTC+4, Mohamed Awad wrote: > > hi

Re: Django Admin Filtering Drop Down Menu by Date

2018-10-15 Thread mab . mobile . 01
Hello Nelson, I may need you to walk me through this more. I am relatively new to Django. I modified my admin.py and added from django import forms and added the following code in the admin.py file. It's still giving me an error ... "type object 'EmployeeSchedule' has no attribute 'events'"

React Front-End for handling images and pdf files in a django model

2018-10-15 Thread 'Josie Pee' via Django users
I'm planning on using React for the front end of my web app of my django questionnaire application. I'm going to use django restframework to build the api to connect the react frontend and django backend. as the front end will be taking images in the browser and also it's a questionnaire I

Re: Django Admin Filtering Drop Down Menu by Date

2018-10-15 Thread mab . mobile . 01
Thank you Nelson. I will try this option. On Friday, October 12, 2018 at 9:57:31 AM UTC-5, Nelson Varela wrote: > > You could make a custom form for your admin which is a model form which >> points to EmployeeSchedule. And in the form its init you can change the >> queryset of the events

Re: mysql client error

2018-10-15 Thread msembijoseph4
Try this ; pip install --only-binary :all: mysqlclient On Saturday, October 13, 2018 at 4:27:08 PM UTC+3, highnes joseph wrote: > > how to fix pip install mysqlclient error? > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from

Re: Create data from django models from .csv file using pandas library

2018-10-15 Thread Mohammad Aqib
Myslq database On Mon, 15 Oct 2018, 5:05 pm ansh srivastav, wrote: > Which database are you referring to? > > > [image: Mailtrack] > > Sender > notified by > Mailtrack >

Re: Create data from django models from .csv file using pandas library

2018-10-15 Thread ansh srivastav
Which database are you referring to? [image: Mailtrack] Sender notified by Mailtrack 10/15/18, 5:03:59 PM On Mon, Oct 15,

Create data from django models from .csv file using pandas library

2018-10-15 Thread Mohammad Aqib
I have multiple .csv files to create data from django models into a database using python pandas library. Can anyone suggest me how to do perform this task. import pandas as pd df = pd.read_csv(RESOURCE_ROOT + '/data_files/102018_core_business.csv') business_instance, created =

Re: column "" must appear in the GROUP BY clause or be used in an aggregate function

2018-10-15 Thread muin
Thank you for your reply,"prome" is my app name. It runs well on django1.11 and python2.7.6. This error happens when upgrade to django2.1.2 and python3.6.6 I had changed to MySQL,it runs well from the same code. And sqlite is also OK. On Monday, October 15, 2018 at 3:19:11 PM UTC+8, ludovic

Re: column "" must appear in the GROUP BY clause or be used in an aggregate function

2018-10-15 Thread muin
Thank you for your reply,"prome" is my app name. I had changed to MySQL,it runs well on from the same code. And sqlite is also OK. On Monday, October 15, 2018 at 3:19:11 PM UTC+8, ludovic coues wrote: > > I cannot find in the code you shared "prome_product" so I assume there is > missing code

Re: column "" must appear in the GROUP BY clause or be used in an aggregate function

2018-10-15 Thread ludovic coues
I cannot find in the code you shared "prome_product" so I assume there is missing code or a typo. The ProgrammingError should come with a line number or a stack trace where the line causing issue is roughly in the middle. If it's the serializer line, I suggest you split it, doing the annotate