My friend, why don't you use settings.py for Db connection?
Regards,
Amitesh Sahay91-750 797 8619
On Thursday, 29 August, 2019, 11:04:57 am IST, leb dev
wrote:
i have a django project that need to be connected to MS SQL Server i am using
pyodbc package.
once i run the program the s
i tried in the settings.py
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'testDB',
'HOST': 'VSQLSERV',
'OPTIONS': {
'driver':' SQL Server',
}
# 'ENGINE': 'django.db.backends.sqlite3',
# 'NAME': os.pat
DATABASES = {
'default': {
'ENGINE': 'django.db.backends.postgresql',
'NAME': 'Authenticate', # database name
'USER': 'postgres',
'PASSWORD': 'pwd',
'HOST': 'localhost'
}
}I don't think you need anything other than this. For MySql you can use mysql
d
Pip install pyodbc
And add below code snipped in settings.py. it should work. I am using in this
way. It works perfectly
DATABASES = {
'default': {
'ENGINE': 'sql_server.pyodbc',
'NAME': 'DB',
'USER': 'user',
'PASSWORD': 'pwd’,
'HOST': 'host',
i already installed pyodbc package.
And add below code in settings.py.
DATABASES = {
*'default'*: {
*'ENGINE'*: *'sql_server.pyodbc'*,
*'NAME'*: *'DB'*,
*'USER'*: *'user'*,
*'PASSWORD'*: *'pwd’*,
*'HOST'*: *'host'*,
*'OPTIONS'*: {
i tried your answer also and did not work i do not know what is the
problem and how to fix 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+uns
Make sure that port is opened and it is reachable from machine u r trying to
access
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of leb dev
Sent: Thursday, August 29, 2019 12:33 PM
To: Django users
Subject: Re: help me to fix this issue with database co
yes i can get a remote connection with the server and i can do ping so
its reachable.
and about the port its the default port used to connect ms sql server 1433.
isn't this right ?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsub
Thank you so much!
2019年8月27日火曜日 22時16分39秒 UTC+9 Mario R. Osorio:
>
> I think this is what you're looking for:
>
> https://docs.djangoproject.com/en/2.2/topics/db/multi-db/
>
>
> HTH!
>
>
>
> On Monday, August 26, 2019 at 10:12:06 AM UTC-4, Sim wrote:
>>
>> https://docs.djangoproject.com/en/2.2/re
Yes it is right . r u on same LAN?
From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On
Behalf Of leb dev
Sent: Thursday, August 29, 2019 1:47 PM
To: Django users
Subject: Re: help me to fix this issue with database connection
yes i can get a remote connection wit
yes i am on the same LAN and i am able to get remote connection and ping
--
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.c
Hi Nikolas,,
Thank you for the inquiry.
I am interested in discussing the role with you. I am, however, currently
in India and plan to be back in the bay area in around 2 weeks. At that
time, l'll touch base with you and with your self willingly, move forward.
Else, we can always do a skype/webex
My "home" variable is defined with a view :
def home(request):
""" Acceuil du site qui recense toutes nos requêtes pour le moment """
return render(request, 'insertion/accueil.html', locals())
Which redirect to my homepage.
The line with a problem is that one
return render(request,
That code is meant for you to type it in the python console however, you
could also include it pretty much anywhere in your code.
On Wednesday, August 28, 2019 at 9:15:20 AM UTC-4, Vahid Asadi wrote:
>
> Hi .
> when i read the django docs,it suggested that running some code but it
> does not n
When you do a CRUD operation , you can use Django ORMs in view.py.
Regards,
Amitesh Sahay
On Thursday, 29 August, 2019, 06:54:35 pm IST, Mario R. Osorio
wrote:
That code is meant for you to type it in the python console however, you could
also include it pretty much anywhere in your
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 view this discussion on the web visit
https://groups.google
But when I put this code in model.py, when I run the server it returns an
error about constraints failed but the user was added in Django admin
users. Why this happen??
On Aug 29, 2019 5:54 PM, "Mario R. Osorio" wrote:
> That code is meant for you to type it in the python console however, you
> c
As I am not an expert, I would appreciate of someone can advise me how to
proceed with the following issue I am currently running into:
I am looking to build a web framework with Django to perform CISCO
networking device testing automaton ( most likely using PyATS).
So, I should be able to star
Firstly I Have More than 1 Million Data In my database , while i want to
perform aggregation or annotation or filter it took huge time , i have to
show all data at a time,,, i use select_related() for foreign key but i
want to optimize database hitting , like i want to fetch all data from
database
Dear members,
Can anyone help me send emails from django backend with angular 7 frontend
, it's very urgent please let me if any one has done it before
Regards
P. Sai Aravind
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from
Firstly I Have More than 1 Million Data In my database , while i want to
perform aggregation or annotation or filter it took huge time , i have to
show all data at a time,,, i use select_related() for foreign key but i
want to optimize database hitting , like i want to fetch all data from
database
Hi Sai
On 29/08/2019 12.26, Sai Aravind wrote:
Dear members,
Can anyone help me send emails from django backend with angular 7
frontend , it's very urgent please let me if any one has done it before
It doesn't matter which frontend you use, Django is perfectly able to
send emails:
htt
22 matches
Mail list logo