Re: Connecting Sql server to Django

2018-10-14 Thread Pradeep Singh
thanks ..@mateusz now its working

On Mon, 15 Oct 2018 at 07:20, sum abiut  wrote:

> You can try sqlalchemy
> https://docs.sqlalchemy.org/en/latest/dialects/mssql.html#module-sqlalchemy.dialects.mssql.pymssql
>
>
> using the pymssql driver, you can do something like this
>
> from sqlalchemy import create_engine
>
> def connect(request):
> engine=create_engine('mssql+pymssql://username:password@hostname /db')
> connection=engine.connect()
>
> hope this helps.
>
>
> On Fri, Oct 12, 2018 at 3:26 PM Rakhee Menon 
> wrote:
>
>>
>>
>> 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''
>>
>> When I goggled the error it says download pywin32 but I didn't get any
>> file or link to download .Please could anyone help me out with this issue.
>>
>> Thanks in Advance
>> 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/b1fe3c06-4e5e-45f7-b675-d4751b94337f%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/CAPCf-y4G8LNZFDWXwTpR%2B0tn7fiHj2029qjNVVXmr5WSxEcnkw%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/CANwgZcbgPgaSA%2BBXK3yWw2Vgo3USCduM8jL_yaF5cXPhG4kqBg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Connecting Sql server to Django

2018-10-14 Thread sum abiut
You can try sqlalchemy
https://docs.sqlalchemy.org/en/latest/dialects/mssql.html#module-sqlalchemy.dialects.mssql.pymssql


using the pymssql driver, you can do something like this

from sqlalchemy import create_engine

def connect(request):
engine=create_engine('mssql+pymssql://username:password@hostname /db')
connection=engine.connect()

hope this helps.


On Fri, Oct 12, 2018 at 3:26 PM Rakhee Menon 
wrote:

>
>
> 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''
>
> When I goggled the error it says download pywin32 but I didn't get any
> file or link to download .Please could anyone help me out with this issue.
>
> Thanks in Advance
> 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/b1fe3c06-4e5e-45f7-b675-d4751b94337f%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/CAPCf-y4G8LNZFDWXwTpR%2B0tn7fiHj2029qjNVVXmr5WSxEcnkw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


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

2018-10-14 Thread muin


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.


How express SQL query using Django ORM?

2018-10-14 Thread Artem Malyshev
Hi,

I have an example application of the shop.

Full application code is available at 
https://github.com/dry-python/tutorials/tree/master/django

In this example, User can buy a subscription for different categories of
the content.

The user can subscribe for one day, one month or one year.

Each period has its own price.

Price can change in time, so Price model stores not the actual prices
but the whole Price history.

The Price with the most recent from_date value is the actual one.

This is the Price model.

class Price(models.Model):

category = models.ForeignKey(Category, related_name="prices", on_delete=
models.CASCADE)

from_date = models.DateField()

cost = models.DecimalField(max_digits=10, decimal_places=2)

period = models.IntegerField()


I want to select the cheapest (from actual) price for each category.

I can express this with following SQL query.

SELECT "category_id",
   MIN("cost")
  FROM "example_price"
 WHERE "id" IN (
   SELECT "id"
 FROM "example_price"
WHERE "category_id" IN (1, 2, 3, 4)
GROUP BY "category_id", "period"
   HAVING "from_date" = MAX("from_date")
 )
 GROUP BY "category_id"

How I can express it with Django ORM?

Regards, Artem.

-- 
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/32f37c0c-2038-4a7f-97c8-b1d4d85dbbbf%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Connecting Sql server to Django

2018-10-14 Thread Gurmeet Kaur
Can you please share your settings.py file and requirements.txt?

On Sun, Oct 14, 2018, 12:51 PM Pradeep Singh  wrote:

> please help me why i am getting no change detected
>
> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur 
> wrote:
>
>> I did it in my project. Use pyodbc to connect to sql server and i am
>> using django 2.0.8
>>
>> On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh 
>> wrote:
>>
>>> bro...will you help me ...
>>> i am getting django 404 error ...please tell how to fix it...
>>> i am using python 3.6 + django 1.11
>>>
>>> On Fri, 12 Oct 2018 at 19:35, vineeth sagar 
>>> wrote:
>>>
 I don't know if it works for 1.8, you would've tested it by now. The
 link I haven given is a current method to connect with sql server with
 newer versions of django, also I think it's about time your company updated
 your django version.  For 2.1 the link I have given works seemlessly.


 On Oct 12, 2018 5:38 PM, "Jason"  wrote:

> well, considering that 1.8 is no longer supported, you're not getting
> any backports and updates.  which if you're doing a production level app,
> is pretty bad.
>
> Unfortunately, seems if you want to use the recent LTS or newer
> versions, SQL server is not an option unless you're willing to update 
> those
> packages yourself for compatibility.
>
> --
> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_FW7nudgDEw6BqkBFJm0Dg%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/CAEbKJVhVHNAe6z-FAc%2BuBUqq%3DKb2A0mFJHh%3D6k0DuZAfuiJG7g%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/CANwgZcZUZyB%3DOOaQf0hdTcUWL

Free Class

2018-10-14 Thread Ing.Daniel Bojorge
#Curso #Django #Clase #Routin #Rutas #Python #PostgreSQL #Course #FREE
#Class #Gratis

En esta clase veremos cómo utilizar la vista login y logout predeterminada
de Django

Todo esto y mucho más en el curso de DJANGO.

Si te ha sido de utilidad esta clase o crees que puede ayudarle a otra
persona, te pido la compartas.

Más información:
http://debsconsultores.blogspot.com/2018/10/curso-django-21-enrutamiento-login-y.html

https://www.youtube.com/watch?v=0mVjHgMK4c8


Dios L@s Bendiga

Saludos,



[image: --]

daniel.bojorge
[image: http://]about.me/daniel.bojorge

 Mi Blog 
*Curso Django 2.1* 
Nicaragua

"Si ustedes permanecen unidos a mí, y si permanecen fieles a mis
enseñanzas, pidan lo que quieran y se les dará.
(Juan 15:7 DHH)
Bendito el varón que se fía en el SEÑOR, y cuya confianza es el SEÑOR.
(Jeremías 17:7 RV2000)

-- 
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/CAMQeQjZQoTp1asSuppXeDFcyokNjbkk7_Vnds%3D65Wp9cyoqjoQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Instagram embedding

2018-10-14 Thread Mateusz
My assumption, according to 
https://stackoverflow.com/questions/33295733/utf8-codec-cant-decode-byte-0xe4-invalid-continuation-byte-in-timezone
 
is, that you use German "ä" letter somewhere. Probably your local timezone 
is "Mitteleuropäische Zeit" which can be displayed by Instagram somewhere 
in the embed code, and on production the timezone is different or language 
is just English.

W dniu sobota, 13 października 2018 16:40:45 UTC+2 użytkownik Mikko napisał:
>
> Hi,
>
> I'm trying to embed Instagram to my development site by using a Instagram 
> embedding code, but when I add it to my html, I get the error below. 
>
> I would appreciate a lot if someone could help me to understand the error 
> and solve the problem.
>
> Best regards,
>
> - Mikko
>
> UnicodeDecodeError at /news/
>
> 'utf-8' codec can't decode byte 0xe4 in position 7333: invalid continuation 
> byte
>
> Request Method: GET
> Request URL: http://127.0.0.1:8000/news/
> Django Version: 2.1
> Exception Type: UnicodeDecodeError
> Exception Value: 
>
> 'utf-8' codec can't decode byte 0xe4 in position 7333: invalid continuation 
> byte
>
> Exception Location: C:\Users\Mikko\django-project\lib\codecs.py in 
> decode, line 321
> Python Executable: C:\Users\Mikko\django-project\Scripts\python.exe
> Python Version: 3.6.4
> Python Path: 
>
> ['C:\\Users\\Mikko\\django-project\\topi',
>  'C:\\Users\\Mikko\\django-project\\Scripts\\python36.zip',
>  'C:\\Users\\Mikko\\django-project\\DLLs',
>  'C:\\Users\\Mikko\\django-project\\lib',
>  'C:\\Users\\Mikko \\django-project\\Scripts',
>  'c:\\python36-32\\Lib',
>  'c:\\python36-32\\DLLs',
>  'C:\\Users\\Mikko\\django-project',
>  'C:\\Users\\Mikko\\django-project\\lib\\site-packages']
>
> Server time: Sat, 13 Oct 2018 14:25:38 +
> Unicode error hint
>
> The string that could not be encoded/decoded was: *;"> N�yt� t*
> Error during template rendering
>
> In template 
> C:\Users\Mikko\django-project\topi\news\templates\news\home.html, error 
> at line *1*
> utf-8
> 1 {% extends 'news/base.html' %}
>

-- 
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/70799ea4-f99a-409b-84bc-baff510046f6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Connecting Sql server to Django

2018-10-14 Thread Mateusz
Do you remember to save your work, as Atom does not auto-save by default? I 
can see the blue dot near the filename on the screenshot, indicating 
changes in the file that were not saved.
Check if testapp/apps.py contains config class with a name variable. 
Something similar to the code below:
from django.apps import AppConfig

class TestappConfig(AppConfig):
   name = 'testapp'




W dniu niedziela, 14 października 2018 19:25:10 UTC+2 użytkownik Pradeep 
Singh napisał:
>
> no effect after capitilazation 
>
> On Sun, 14 Oct 2018 at 22:48, Mateusz > 
> wrote:
>
>> Line 2: models.Model (capitalize class name)
>>
>> W dniu niedziela, 14 października 2018 19:09:47 UTC+2 użytkownik Pradeep 
>> Singh napisał:
>>>
>>>
>>>
>>> On Sun, 14 Oct 2018 at 22:37, Pradeep Singh  wrote:
>>>
 yes ..i have put the app name in setting.py .wait i will share all 
 screen shot

 On Sun, 14 Oct 2018 at 22:34, vineeth sagar  
 wrote:

> Okay Did you put the app in installed_apps in settings.py of your 
> project? Also you are saying you're new to django why would you want to 
> use 
> a ms-sql server as the DB of you're choice? Not something as Postgres or 
> mySQL which have good docs in the Django documentation. I think the above 
> fix should (?) Solve your issue. Maybe all the migrations have been 
> created 
> you have to python manage.py migrate. 
>
> On Oct 14, 2018 10:22 PM, "Pradeep Singh"  wrote:
>
>> i am newbie in the django..
>>
>> On Sun, 14 Oct 2018 at 22:21, Pradeep Singh  
>> wrote:
>>
>>> please help me why i am getting no change detected
>>>
>>> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur  
>>> wrote:
>>>
 I did it in my project. Use pyodbc to connect to sql server and i 
 am using django 2.0.8

 On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh  
 wrote:

> bro...will you help me ...
> i am getting django 404 error ...please tell how to fix it...
> i am using python 3.6 + django 1.11
>
> On Fri, 12 Oct 2018 at 19:35, vineeth sagar  
> wrote:
>
>> I don't know if it works for 1.8, you would've tested it by now. 
>> The link I haven given is a current method to connect with sql 
>> server with 
>> newer versions of django, also I think it's about time your company 
>> updated 
>> your django version.  For 2.1 the link I have given works seemlessly.
>>
>>
>> On Oct 12, 2018 5:38 PM, "Jason"  wrote:
>>
>>> well, considering that 1.8 is no longer supported, you're not 
>>> getting any backports and updates.  which if you're doing a 
>>> production 
>>> level app, is pretty bad.
>>>
>>> Unfortunately, seems if you want to use the recent LTS or newer 
>>> versions, SQL server is not an option unless you're willing to 
>>> update those 
>>> packages yourself for compatibility.
>>>
>>> -- 
>>> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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...@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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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 unsubscri

Re: Connecting Sql server to Django

2018-10-14 Thread Pradeep Singh
no effect after capitilazation

On Sun, 14 Oct 2018 at 22:48, Mateusz  wrote:

> Line 2: models.Model (capitalize class name)
>
> W dniu niedziela, 14 października 2018 19:09:47 UTC+2 użytkownik Pradeep
> Singh napisał:
>>
>>
>>
>> On Sun, 14 Oct 2018 at 22:37, Pradeep Singh  wrote:
>>
>>> yes ..i have put the app name in setting.py .wait i will share all
>>> screen shot
>>>
>>> On Sun, 14 Oct 2018 at 22:34, vineeth sagar 
>>> wrote:
>>>
 Okay Did you put the app in installed_apps in settings.py of your
 project? Also you are saying you're new to django why would you want to use
 a ms-sql server as the DB of you're choice? Not something as Postgres or
 mySQL which have good docs in the Django documentation. I think the above
 fix should (?) Solve your issue. Maybe all the migrations have been created
 you have to python manage.py migrate.

 On Oct 14, 2018 10:22 PM, "Pradeep Singh"  wrote:

> i am newbie in the django..
>
> On Sun, 14 Oct 2018 at 22:21, Pradeep Singh 
> wrote:
>
>> please help me why i am getting no change detected
>>
>> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur 
>> wrote:
>>
>>> I did it in my project. Use pyodbc to connect to sql server and i am
>>> using django 2.0.8
>>>
>>> On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh 
>>> wrote:
>>>
 bro...will you help me ...
 i am getting django 404 error ...please tell how to fix it...
 i am using python 3.6 + django 1.11

 On Fri, 12 Oct 2018 at 19:35, vineeth sagar 
 wrote:

> I don't know if it works for 1.8, you would've tested it by now.
> The link I haven given is a current method to connect with sql server 
> with
> newer versions of django, also I think it's about time your company 
> updated
> your django version.  For 2.1 the link I have given works seemlessly.
>
>
> On Oct 12, 2018 5:38 PM, "Jason"  wrote:
>
>> well, considering that 1.8 is no longer supported, you're not
>> getting any backports and updates.  which if you're doing a 
>> production
>> level app, is pretty bad.
>>
>> Unfortunately, seems if you want to use the recent LTS or newer
>> versions, SQL server is not an option unless you're willing to 
>> update those
>> packages yourself for compatibility.
>>
>> --
>> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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...@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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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...@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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_FW7nudgDEw6BqkBFJm0Dg%40mail.gmail.com
 
 .
 For more options, visit https://groups.google.

Re: Connecting Sql server to Django

2018-10-14 Thread Mateusz
Line 2: models.Model (capitalize class name)

W dniu niedziela, 14 października 2018 19:09:47 UTC+2 użytkownik Pradeep 
Singh napisał:
>
>
>
> On Sun, 14 Oct 2018 at 22:37, Pradeep Singh  > wrote:
>
>> yes ..i have put the app name in setting.py .wait i will share all screen 
>> shot
>>
>> On Sun, 14 Oct 2018 at 22:34, vineeth sagar > > wrote:
>>
>>> Okay Did you put the app in installed_apps in settings.py of your 
>>> project? Also you are saying you're new to django why would you want to use 
>>> a ms-sql server as the DB of you're choice? Not something as Postgres or 
>>> mySQL which have good docs in the Django documentation. I think the above 
>>> fix should (?) Solve your issue. Maybe all the migrations have been created 
>>> you have to python manage.py migrate. 
>>>
>>> On Oct 14, 2018 10:22 PM, "Pradeep Singh" >> > wrote:
>>>
 i am newbie in the django..

 On Sun, 14 Oct 2018 at 22:21, Pradeep Singh >>> > wrote:

> please help me why i am getting no change detected
>
> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur  > wrote:
>
>> I did it in my project. Use pyodbc to connect to sql server and i am 
>> using django 2.0.8
>>
>> On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh > > wrote:
>>
>>> bro...will you help me ...
>>> i am getting django 404 error ...please tell how to fix it...
>>> i am using python 3.6 + django 1.11
>>>
>>> On Fri, 12 Oct 2018 at 19:35, vineeth sagar >> > wrote:
>>>
 I don't know if it works for 1.8, you would've tested it by now. 
 The link I haven given is a current method to connect with sql server 
 with 
 newer versions of django, also I think it's about time your company 
 updated 
 your django version.  For 2.1 the link I have given works seemlessly.


 On Oct 12, 2018 5:38 PM, "Jason" > 
 wrote:

> well, considering that 1.8 is no longer supported, you're not 
> getting any backports and updates.  which if you're doing a 
> production 
> level app, is pretty bad.
>
> Unfortunately, seems if you want to use the recent LTS or newer 
> versions, SQL server is not an option unless you're willing to update 
> those 
> packages yourself for compatibility.
>
> -- 
> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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...@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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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...@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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_FW7nudgDEw6BqkBFJm0Dg%40mail.gmail.com
>>>  
>>> 
>>> .
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>> -- 
>> You received this message because

Re: Connecting Sql server to Django

2018-10-14 Thread Pradeep Singh
yes ..i have put the app name in setting.py .wait i will share all screen
shot

On Sun, 14 Oct 2018 at 22:34, vineeth sagar 
wrote:

> Okay Did you put the app in installed_apps in settings.py of your project?
> Also you are saying you're new to django why would you want to use a ms-sql
> server as the DB of you're choice? Not something as Postgres or mySQL which
> have good docs in the Django documentation. I think the above fix should
> (?) Solve your issue. Maybe all the migrations have been created you have
> to python manage.py migrate.
>
> On Oct 14, 2018 10:22 PM, "Pradeep Singh"  wrote:
>
>> i am newbie in the django..
>>
>> On Sun, 14 Oct 2018 at 22:21, Pradeep Singh 
>> wrote:
>>
>>> please help me why i am getting no change detected
>>>
>>> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur <
>>> gurmeetkaurjunej...@gmail.com> wrote:
>>>
 I did it in my project. Use pyodbc to connect to sql server and i am
 using django 2.0.8

 On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh 
 wrote:

> bro...will you help me ...
> i am getting django 404 error ...please tell how to fix it...
> i am using python 3.6 + django 1.11
>
> On Fri, 12 Oct 2018 at 19:35, vineeth sagar 
> wrote:
>
>> I don't know if it works for 1.8, you would've tested it by now. The
>> link I haven given is a current method to connect with sql server with
>> newer versions of django, also I think it's about time your company 
>> updated
>> your django version.  For 2.1 the link I have given works seemlessly.
>>
>>
>> On Oct 12, 2018 5:38 PM, "Jason"  wrote:
>>
>>> well, considering that 1.8 is no longer supported, you're not
>>> getting any backports and updates.  which if you're doing a production
>>> level app, is pretty bad.
>>>
>>> Unfortunately, seems if you want to use the recent LTS or newer
>>> versions, SQL server is not an option unless you're willing to update 
>>> those
>>> packages yourself for compatibility.
>>>
>>> --
>>> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_FW7nudgDEw6BqkBFJm0Dg%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/CAEbKJVhVHNAe6z-

Re: Connecting Sql server to Django

2018-10-14 Thread vineeth sagar
Okay Did you put the app in installed_apps in settings.py of your project?
Also you are saying you're new to django why would you want to use a ms-sql
server as the DB of you're choice? Not something as Postgres or mySQL which
have good docs in the Django documentation. I think the above fix should
(?) Solve your issue. Maybe all the migrations have been created you have
to python manage.py migrate.

On Oct 14, 2018 10:22 PM, "Pradeep Singh"  wrote:

> i am newbie in the django..
>
> On Sun, 14 Oct 2018 at 22:21, Pradeep Singh  wrote:
>
>> please help me why i am getting no change detected
>>
>> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur 
>> wrote:
>>
>>> I did it in my project. Use pyodbc to connect to sql server and i am
>>> using django 2.0.8
>>>
>>> On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh 
>>> wrote:
>>>
 bro...will you help me ...
 i am getting django 404 error ...please tell how to fix it...
 i am using python 3.6 + django 1.11

 On Fri, 12 Oct 2018 at 19:35, vineeth sagar 
 wrote:

> I don't know if it works for 1.8, you would've tested it by now. The
> link I haven given is a current method to connect with sql server with
> newer versions of django, also I think it's about time your company 
> updated
> your django version.  For 2.1 the link I have given works seemlessly.
>
>
> On Oct 12, 2018 5:38 PM, "Jason"  wrote:
>
>> well, considering that 1.8 is no longer supported, you're not getting
>> any backports and updates.  which if you're doing a production level app,
>> is pretty bad.
>>
>> Unfortunately, seems if you want to use the recent LTS or newer
>> versions, SQL server is not an option unless you're willing to update 
>> those
>> packages yourself for compatibility.
>>
>> --
>> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%
>> 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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQ
> WGB1dDKCd7iJ6bRc%3DcDrw%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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_
 FW7nudgDEw6BqkBFJm0Dg%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/CAEbKJVhVHNAe6z-FAc%2BuBUqq%
>>> 3DKb2A0mFJHh%3D6k0DuZAfuiJG7g%40mail.gmail.com
>>> 
>>> .
>>> For more o

Re: Connecting Sql server to Django

2018-10-14 Thread Pradeep Singh
i am newbie in the django..

On Sun, 14 Oct 2018 at 22:21, Pradeep Singh  wrote:

> please help me why i am getting no change detected
>
> On Sat, 13 Oct 2018 at 01:33, Gurmeet Kaur 
> wrote:
>
>> I did it in my project. Use pyodbc to connect to sql server and i am
>> using django 2.0.8
>>
>> On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh 
>> wrote:
>>
>>> bro...will you help me ...
>>> i am getting django 404 error ...please tell how to fix it...
>>> i am using python 3.6 + django 1.11
>>>
>>> On Fri, 12 Oct 2018 at 19:35, vineeth sagar 
>>> wrote:
>>>
 I don't know if it works for 1.8, you would've tested it by now. The
 link I haven given is a current method to connect with sql server with
 newer versions of django, also I think it's about time your company updated
 your django version.  For 2.1 the link I have given works seemlessly.


 On Oct 12, 2018 5:38 PM, "Jason"  wrote:

> well, considering that 1.8 is no longer supported, you're not getting
> any backports and updates.  which if you're doing a production level app,
> is pretty bad.
>
> Unfortunately, seems if you want to use the recent LTS or newer
> versions, SQL server is not an option unless you're willing to update 
> those
> packages yourself for compatibility.
>
> --
> 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/078b932f-fde5-4eb5-9d59-4d66f43ff6f0%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/CAMMZq8OKW5ODFZpcxHhJKF1RBKrBQWGB1dDKCd7iJ6bRc%3DcDrw%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/CANwgZcaiLs3RqawFDzYX%3Dtz3B3ye_FW7nudgDEw6BqkBFJm0Dg%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/CAEbKJVhVHNAe6z-FAc%2BuBUqq%3DKb2A0mFJHh%3D6k0DuZAfuiJG7g%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/CANwgZcZ%3DoPb5TmSFz-Z3FS0rXn2ckfgskhCvcM1e1jBB7LLBeQ%40mail.gmail.com.
For m