#26893: Database creation failed using PostGis and Django
--------------------------+--------------------------------------
Reporter: csurbier | Owner: nobody
Type: Bug | Status: closed
Component: GIS | Version: 1.8
Severity: Normal | Resolution: worksforme
Keywords: | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
--------------------------+--------------------------------------
Comment (by csurbier):
Replying to [comment:4 claudep]:
> You can run migrations fine, you just have to run the "CREATE
DATABASE"/"CREATE EXTENSION" commands first.
>
> As you didn't provide any traceback, I cannot tell you much about the
reason of the failing connection, but at some point, if Django has to talk
to PostgreSQL without having to specify a database, it defaults to the
`postgres` database (which is generally readable by all users in most
setups), typically in a situation when it has to create a database, hence
my recommendation to create it yourself beforehand.
Thanks for your answer but the database had been already created by the
PAAS Provider and the PostGis extension too. Now i'm just trying to create
my tables but the connexion failed (even if a database name is provided as
you can see in my settings file). In fact on my local machine with a
PostgreSQL everything work fine. But it doesn't work when i try to launch
with my provider settings. Because they don't give access to default
postgres database. And if i edit the psycopg2 file base.py as i said, and
add the DBNAME in the code, then it is working..
--
Ticket URL: <https://code.djangoproject.com/ticket/26893#comment:5>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
--
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To post to this group, send email to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-updates/066.98cac350580911d6e43f749eb338e934%40djangoproject.com.
For more options, visit https://groups.google.com/d/optout.