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 before calling serializer.

Query set are "lazy loading", they don't fetch from the database untill
they have to. While it's great most of the time, that cause issue while
debugging. Try to call list(qs.annotate(...)[offset:offset+limit]) to force
the query set to execute.

This won't give you an answer but that might help you to find the issue.

Good luck!

On Mon, Oct 15, 2018, 03:38 muin  wrote:

> Django 2.1.2, Postgres 10
>
> Model:
> class Product(models.Model):
> product_id = models.AutoField("产品ID", primary_key=True)
> ...
>
> class SpecItem(models.Model):
> spec_id = models.AutoField(primary_key=True)
> product = models.ForeignKey(Product, on_delete=models.CASCADE,
> related_name="product_specs", null=True)
> price = models.FloatField("价格", default=0)
> ...
>
> When exwcute
> qs = Product.objects.filter(valid=1)
> serializer = ProductSerializer(
> qs.annotate(cnt=Count("product_specs"),
> min_price=Min("product_specs__price")).filter(cnt__gt=0)
> .order_by("min_price")[offset:offset + limit],
> context={"request": request},
> many=True)
>
> It says django.db.utils.ProgrammingError: column
> "prome_product.product_name" must appear in the GROUP BY clause or be used
> in an aggregate function
>
>
> Can anyone help me?
>
> --
> 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.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/64c1b2f0-6125-45e0-a08b-7d5d3426f16d%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEuG%2BTZ%2BuYodWPdrvZTUDGokVpcpOjYHDgAcyxe4WTZaDuWDtA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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 before calling serializer.
>
> Query set are "lazy loading", they don't fetch from the database untill 
> they have to. While it's great most of the time, that cause issue while 
> debugging. Try to call list(qs.annotate(...)[offset:offset+limit]) to force 
> the query set to execute.
>
> This won't give you an answer but that might help you to find the issue.
>
> Good luck!
>
> On Mon, Oct 15, 2018, 03:38 muin > wrote:
>
>> Django 2.1.2, Postgres 10
>>
>> Model:
>> class Product(models.Model):
>> product_id = models.AutoField("产品ID", primary_key=True)
>> ...
>>
>> class SpecItem(models.Model):
>> spec_id = models.AutoField(primary_key=True)
>> product = models.ForeignKey(Product, on_delete=models.CASCADE, 
>> related_name="product_specs", null=True)
>> price = models.FloatField("价格", default=0)
>> ...
>>
>> When exwcute
>> qs = Product.objects.filter(valid=1)
>> serializer = ProductSerializer(
>> qs.annotate(cnt=Count("product_specs"), 
>> min_price=Min("product_specs__price")).filter(cnt__gt=0)
>> .order_by("min_price")[offset:offset + limit],
>> context={"request": request},
>> many=True)
>>
>> It says django.db.utils.ProgrammingError: column 
>> "prome_product.product_name" must appear in the GROUP BY clause or be used 
>> in an aggregate function
>>
>>
>> Can anyone help me?
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/64c1b2f0-6125-45e0-a08b-7d5d3426f16d%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/59bc8447-1349-46d2-b430-84dae1cc3e4b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 coues wrote:
>
> 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 before calling serializer.
>
> Query set are "lazy loading", they don't fetch from the database untill 
> they have to. While it's great most of the time, that cause issue while 
> debugging. Try to call list(qs.annotate(...)[offset:offset+limit]) to force 
> the query set to execute.
>
> This won't give you an answer but that might help you to find the issue.
>
> Good luck!
>
> On Mon, Oct 15, 2018, 03:38 muin > wrote:
>
>> Django 2.1.2, Postgres 10
>>
>> Model:
>> class Product(models.Model):
>> product_id = models.AutoField("产品ID", primary_key=True)
>> ...
>>
>> class SpecItem(models.Model):
>> spec_id = models.AutoField(primary_key=True)
>> product = models.ForeignKey(Product, on_delete=models.CASCADE, 
>> related_name="product_specs", null=True)
>> price = models.FloatField("价格", default=0)
>> ...
>>
>> When exwcute
>> qs = Product.objects.filter(valid=1)
>> serializer = ProductSerializer(
>> qs.annotate(cnt=Count("product_specs"), 
>> min_price=Min("product_specs__price")).filter(cnt__gt=0)
>> .order_by("min_price")[offset:offset + limit],
>> context={"request": request},
>> many=True)
>>
>> It says django.db.utils.ProgrammingError: column 
>> "prome_product.product_name" must appear in the GROUP BY clause or be used 
>> in an aggregate function
>>
>>
>> Can anyone help me?
>>
>> -- 
>> 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...@googlegroups.com .
>> To post to this group, send email to django...@googlegroups.com 
>> .
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit 
>> https://groups.google.com/d/msgid/django-users/64c1b2f0-6125-45e0-a08b-7d5d3426f16d%40googlegroups.com
>>  
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/67c5e1a4-a456-4f8f-afa5-c0a97d0d9dbe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 =
Business.objects.get_or_create(business_id=df['id'],
business_name=df['name'])


-- 
Mohd Aqib
Software Engineer
9873141865

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOh93neQTfW0CoepiyhQ57ziGDuw4fN0OTV6w-rJ%2BaXo0aUL%2Bg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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, 2018 at 4:42 PM Mohammad Aqib 
wrote:

> 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 = 
> Business.objects.get_or_create(business_id=df['id'], business_name=df['name'])
>
>
> --
> Mohd Aqib
> Software Engineer
> 9873141865
>
> --
> 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.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAOh93neQTfW0CoepiyhQ57ziGDuw4fN0OTV6w-rJ%2BaXo0aUL%2Bg%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHMQ5333D_uPvsK-WqJgZ83_aKBUAkxt-DWDEJqT7Z0BOszTzw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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
> 
>  10/15/18,
> 5:03:59 PM
>
> On Mon, Oct 15, 2018 at 4:42 PM Mohammad Aqib 
> wrote:
>
>> 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 = 
>> Business.objects.get_or_create(business_id=df['id'], 
>> business_name=df['name'])
>>
>>
>> --
>> Mohd Aqib
>> Software Engineer
>> 9873141865
>>
>> --
>> 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.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/django-users/CAOh93neQTfW0CoepiyhQ57ziGDuw4fN0OTV6w-rJ%2BaXo0aUL%2Bg%40mail.gmail.com
>> 
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
> --
> 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.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/CAHMQ5333D_uPvsK-WqJgZ83_aKBUAkxt-DWDEJqT7Z0BOszTzw%40mail.gmail.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAOh93ncQi3r5gA7FcOMvHkJvMzFpis7kyyhmWrab44wnn2t%3DLg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/fc541420-85f3-4514-91d7-e8dc826ce5ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 field:
>>
>
> self.fields['events'].queryset = WineryEvents.objects.filter(publish='Y').
> filter(event_date__gte=datetime.now()).order_by('event_date')
>
>  
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/6efea4b1-83e5-4ff1-a2ff-ed74df8557bf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 was wondering if it would be better to handle
the question logic as json data as the question track is dependent on your 
initial "yes/no" responses and send the responses through the api or save 
them in the form 
and send it as a completed form in a pdf file.

I hope this is not too brief of an explanation and any input is appreciated!

Thanks!

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e64d297c-f7e1-4a02-bfd6-f3b4647cca0d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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'"

I'm sure that's not the only issue and I'm doing something else wrong. 

Just to make sure I'm clear on what I need this to do, I would like the 
drop down list to appear as below when adding a new employee shift/schedule 
date or editing an existing one... What should be submitted to the database 
table/model is the event id but I would like human readable text to choose 
from with only future or current events. 

(EVENT DATE MM/DD/YY EVENT TITLE)  

## Employee Schedule

class EmployeeScheduleForm(forms.Form):
#pass
#   self.fields['events'].queryset = 
WineryEvents.objects.filter(publish='Y').filter(event_date__gte=datetime.now()).order_by('event_date')
events  = 
WineryEvents.objects.filter(publish='Y').filter(event_date__gte=datetime.now()).order_by('event_date')

class EmployeeScheduleAdmin(admin.ModelAdmin):

   def user_info(self, obj):
 return obj.user.get_full_name()

   list_display = ['events','user_info','role', 'start_time']
#   list_filter = ['event','user']
   ordering = ['-event']

admin.site.register(models.EmployeeSchedule, EmployeeScheduleAdmin)

---

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 field:
>>
>
> self.fields['events'].queryset = WineryEvents.objects.filter(publish='Y').
> filter(event_date__gte=datetime.now()).order_by('event_date')
>
>  
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/8adeff56-7786-4263-9d41-4c50d69393f5%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 I have work on blog project but when I try to go to post_list url 
> django go to the post_detail ulr and give me this error and I don`t know 
> why 
> there are 3 image for app url , config url and error 
> and this is link on github
> [image: Screenshot from 2018-10-15 17-20-02.png]
> [image: Screenshot from 2018-10-15 17-19-46.png]
> [image: Screenshot from 2018-10-15 17-06-22.png]
> https://github.com/Mohamed-awad/blog
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/147fd033-9f41-479a-83d8-caf36a96b18d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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, Mohammad Aqib wrote:
>
> 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 = 
> Business.objects.get_or_create(business_id=df['id'], business_name=df['name'])
>
>
> -- 
> Mohd Aqib
> Software Engineer
> 9873141865
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2a230c66-5723-4c9d-a1c7-63f86711f8ac%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 separate model for
> author that has a foreign key back to book. You can limit the number of
> authors to 3 in the author save method.
>
> Then you can use an inline form for author in the admin. That will give
> you the + functionality you're looking for.
>
> If you want to keep you current book model the same with authors as
> fields, take a look at admin fieldsets.
>
> On October 12, 2018 8:43:26 PM CDT, thebobbobs...@gmail.com wrote:
>>
>> Hi,
>> I'm still a bit new to django, but making slow progress.
>>
>> I'm wondering how to move forward with a book class as model which has an
>> author field which
>> allows adding additional authors.
>>
>> I have three fields allocated in the SQLite db for up to three different
>> authors.
>>
>> What I'm trying to do is only expose the additional author text entry box
>> for the book class in admin
>> when say for example a plus or other widget is clicked.
>>
>> ex.  Author [  ]  +
>> ...then
>>   Additional Author1 [ ]  +
>> ...and finally
>>   Additional Author2 [ ]
>>
>> So if you click the plus the additional author1 text entry shows up, then
>> click again the last or third
>> author entry shows up, but no more plus we're out of db fields at that
>> point.
>>
>> Not trying to dynamically add fields to the db.  Just expose when needed
>> for up to three authors.
>>
>> Prefer to not use jquery and/or javascript, but stick to pure python
>> django if possible.
>>
>> I've been reading alot about admin but still confused as to best way to
>> proceed.
>>
>> Thank You,
>>
>> --
> You received this message because you are subscribed to a topic in the
> Google Groups "Django users" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/django-users/96rMeBTLgOY/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> django-users+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/38283332-0AB7-4F6B-93E2-F4BD347CAFD6%40fattuba.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CALWZDaM7V4EXSHTJUtnemJr0LQxeHykyhR4nxmnCVx0N1KUh%2BA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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 email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/7e0b624e-1ed4-4199-87b7-3b3175285e27%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/077c2dc1-2792-43f0-90ed-788b678e9bca%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 
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 manner how can I get or 
access data from database with models in Django??

  Thank You
  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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/2cd0eb21-74ec-425a-a8f0-f47765ded96a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 manner how can I get or 
access data from database with models in Django??

  Thank You
  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, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/13676f59-bb9b-44cf-b442-a46be9f77b73%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


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 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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/e4189bf0-f3ab-4bee-b2e0-6a293a306b68%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Use tables from database with creating models

2018-10-15 Thread Ігор Магур
You can read how to generate models here:
https://docs.djangoproject.com/en/2.1/howto/legacy-databases/ without
models you'll need to write musch more code for managing and handling, and
point of using django will be lost)

вт, 16 жовт. 2018, 08:52 користувач 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 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.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/e4189bf0-f3ab-4bee-b2e0-6a293a306b68%40googlegroups.com
> 
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAEDge_yUcCrsPVifd8xFNMHNqVOga11ivF%3DKT2FaF%2Bsnz-iwVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.