Re: Using other schema in PostgeSQL

2018-04-07 Thread john fabiani`

https://stackoverflow.com/questions/1160598/how-to-use-schemas-in-django?utm_medium=organic_source=google_rich_qa_campaign=google_rich_qa

Johnf


On 04/06/2018 05:28 PM, Michel Vega Fuenzalida wrote:

Hello people,

I'm using PostgeSQL not using the public schema but a different one named: 
'correo', I need to tell Django to use the that schema (I have deleted the 
public schema)

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/c910cb9e-d28b-f418-08d2-6bd4c6ed374f%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using other schema in PostgeSQL

2018-04-07 Thread Jani Tiainen
You can give search path in database options which IMO is cleanest option
you can have now.

See
https://stackoverflow.com/questions/31726064/how-to-connect-to-multiple-postgresql-schemas-from-django

For example how to do that.

la 7. huhtikuuta 2018 klo 4.15 Michel Vega Fuenzalida 
kirjoitti:

> Hello people,
>
> I'm using PostgeSQL not using the public schema but a different one named:
> 'correo', I need to tell Django to use the that schema (I have deleted the
> public schema)
>
> Thanks
> --
> Michel Vega Fuenzalida
> Usuario Linux: 323650
>
> --
> 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/DDE1CD0F-2A03-467A-81EF-6E6AC958017F%40nauta.cu
> .
> 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/CAHn91oeWQwNk41XyDvDm%2BvE8R5cK4tcTVWnJLo%2Bv4CjY1RL0FQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: Using other schema in PostgeSQL

2018-04-06 Thread Fabio C. Barrionuevo da Luz
This is a very old issue:


https://code.djangoproject.com/ticket/6148

https://code.djangoproject.com/ticket/7556

https://code.djangoproject.com/ticket/22673

I do not know if there is someone working on ORM and Migrations to fix this
issue.

I've seen something like this somewhere, but I do not know if it works.

class MyTable(models.Model):
# ...
class Meta:
db_table = '"correo"."mytable"'




That said, I've seen some projects that implement multi-tenancy with
Postgres Database Schemas support, but not their what black magic they use
to make it work.

I personally have never used it.

https://bitbucket.org/schinckel/django-boardinghouse

https://github.com/tomturner/django-tenants

https://github.com/bernardopires/django-tenant-schemas




2018-04-06 21:28 GMT-03:00 Michel Vega Fuenzalida :

> Hello people,
>
> I'm using PostgeSQL not using the public schema but a different one named:
> 'correo', I need to tell Django to use the that schema (I have deleted the
> public schema)
>
> Thanks
> --
> Michel Vega Fuenzalida
> Usuario Linux: 323650
>
> --
> 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/DDE1CD0F-2A03-467A-81EF-6E6AC958017F%40nauta.cu.
> For more options, visit https://groups.google.com/d/optout.
>



-- 
Fábio C. Barrionuevo da Luz
Palmas - Tocantins - Brasil - América do Sul

http://pythonclub.com.br/

Blog colaborativo sobre Python e tecnologias Relacionadas, mantido
totalmente no https://github.com/pythonclub/pythonclub.github.io .

Todos são livres para publicar. É só fazer fork, escrever sua postagem e
mandar o pull-request. Leia mais sobre como publicar em README.md e
contributing.md.
Regra básica de postagem:
"Você" acha interessante? É útil para "você"? Pode ser utilizado com Python
ou é útil para quem usa Python? Está esperando o que? Publica logo, que
estou louco para ler...

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


Using other schema in PostgeSQL

2018-04-06 Thread Michel Vega Fuenzalida
Hello people,

I'm using PostgeSQL not using the public schema but a different one named: 
'correo', I need to tell Django to use the that schema (I have deleted the 
public schema)

Thanks
-- 
Michel Vega Fuenzalida
Usuario Linux: 323650

-- 
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/DDE1CD0F-2A03-467A-81EF-6E6AC958017F%40nauta.cu.
For more options, visit https://groups.google.com/d/optout.