Hi,

I am receiving an error:
        AttributeError: 'Manager' object has no attribute 'using'
when i run:
       result = Tusers.objects.using('lysgbl').filter.all()
where Tusers is the table and lysglb is the schema

Is there something wrong in the code i am using or what is the problem?
Any help would be appriciated.

Thanks,

J

On Mon, Sep 27, 2010 at 4:24 PM, shmengie <1st...@gmail.com> wrote:

> Using the later django versions, supports mutiple database/schemas
> with a DATABASES dict in settings.py
>
> your modles can select different db's on the fly:
>
> result = MyModel.objects.using('anotherdb').filter...
>
> Should get you there.
>
> On Sep 27, 4:37 am, Jean-Pierre De Villiers <jpdv1...@gmail.com>
> wrote:
> > On Sep 27, 9:30 am, Nabil Servais <nabil.serv...@gmail.com> wrote:
> >
> > >   Hello,
> >
> > > Le 27/09/2010 08:53, Jean-Pierre De Villiers a crit :
> >
> > > > Hi,
> > > > Is there a way to access an existing database schema in Django?
> > > > Any help would be appreciated!
> >
> > > > J
> >
> > > You can use the inspectdb option of the project manager, you will find
> > > more information in the official documentation :
> >
> > >http://docs.djangoproject.com/en/dev/ref/django-admin/?from=olddocs
> >
> > Hi,
> > Thanks for the help Nabil Servais, is there a way to use the same
> > model for different schemas, like a variable used for the schemas or
> > something.
> > We have for example, hundreds of schemas and using a different model
> > for every one of them would be a tiresome process.
> >
> > thanks again!
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to