Re: Database Views

2019-08-27 Thread Doddahulugappa.B
to database views, its also applicable to tables also. Kindly make sure to change above two lines in setting according to ur local time zone to render correct records. Thank you. On Tue, Aug 27, 2019, 10:02 PM Doddahulugappa.B wrote: > Thanks for your response. > > In Django models.. Fo

Re: Database Views

2019-08-27 Thread Doddahulugappa.B
Thanks for your response. In Django models.. For example class TempUser(models.Model): first_name = models.CharField(max_length=100) class Meta: managed = False db_table = "temp_user" temp_user is database view. Now assume select * from temp_user Gives 5 records

Re: Database Views

2019-08-27 Thread Jani Tiainen
Hi. You really need to provide more context. Without knowing your data, tables involved in a view. Your model and query you used and query you used to verify wrong (or correct) results it is virtually impossible to help you further. ti 27. elok. 2019 klo 17.47 HULUGESH B kirjoitti: > Hi All,

Database Views

2019-08-27 Thread HULUGESH B
Hi All, I am facing issues in Django Models: If connect databse views in models. It shows less records than actual number of records. Kindly assist me. How to solve. This is not all the time.. sometimes it is correct sometimes not correct. -- You received this message because you are

Re: How to handle database VIEWS in Django

2018-10-11 Thread Andréas Kühne
It works perfectly by coding them as a model in the same way you always do. The only thing you have to do is make sure that you set the table name and that migrations shouldn't be handled for the view: class Meta: managed = False db_table = 'events_sessionparticipant' Regards, Andréas

Re: How to handle database VIEWS in Django

2018-10-11 Thread Gurmeet Kaur
Just code for them in models.py just as a table. And it will work. I have done that in my project. It is working fine. On Thu, Oct 11, 2018, 1:38 AM django_learner wrote: > Hi everyone, > > I am using SQL SERVER and I have some predefines VIEWS in the database, > what I am looking for is to

How to handle database VIEWS in Django

2018-10-10 Thread django_learner
Hi everyone, I am using SQL SERVER and I have some predefines VIEWS in the database, what I am looking for is to manage that VIEWS Thank you -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving

Re: Django 1.8, migrations and database views

2015-08-04 Thread marcin . j . nowak
Oh my s**t. Django generates operation but does not execute it when migrating. What a mess... Solved by Django itself... On Tuesday, August 4, 2015 at 5:21:07 PM UTC+2, marcin@gmail.com wrote: > > Hi, > > Who knows how to disable auto-making migrations for models mapped to

Django 1.8, migrations and database views

2015-08-04 Thread marcin . j . nowak
Hi, Who knows how to disable auto-making migrations for models mapped to database views? I've set managed=False but it does nothing. Django adds CreateModel operation to migration file, but it shouldn't do that. Can anyone help? Thanks. BR, Marcin -- You received this message because you

How do I use database views in django

2015-04-28 Thread David Levy
How do I use database views in django, many falão that view must be mapped same table, but it should certainly give problems using the migration. What is the best alternative to be used in this situation? heard in django- datatable-view is an alternative? -- You received this message because

How to use Database Views in Django Rest Framework

2014-04-18 Thread Shoaib Ijaz
I am using Django Rest Framework for serialize data. I came across a scenario where I have to use Database Views as Model. *My Model* class A(models.Model): name = models.CharField(max_length=240, blank=True) value = models.CharField(max_length=240, blank=True) class Meta

Re: Creating database views, functions, stored procedures etc

2013-06-20 Thread akaariai
On 20 kesä, 14:32, Mark Robson wrote: > Hi, > > I've got a Django application which uses a mixture of managed and unmanaged > models. > > The managed models get their tables created in the usual way, the unmanaged > ones via a number of .sql files in the application/sql

Creating database views, functions, stored procedures etc

2013-06-20 Thread Mark Robson
Hi, I've got a Django application which uses a mixture of managed and unmanaged models. The managed models get their tables created in the usual way, the unmanaged ones via a number of .sql files in the application/sql directory. This works fine, but I also have some views and user-defined

Model as database views

2009-12-06 Thread goto
Hi, I am trying to make a django model that will show data from different other models as a single model. Kind of like a database view to a database table. My idea is to make a custom field that maps to another field in some other model code for fields.py is as follows

Re: django and database views

2009-02-18 Thread will0
On Jan 6, 12:47 am, drakkan wrote: > On 6 Gen, 00:41, drakkan wrote: > > Suppose I want to delete an user. This user is in table1 and so in > databaseview too. Django default is to do adeletecascade so it tries > to remove the user from table1,

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:41, drakkan wrote: > On 6 Gen, 00:32, Malcolm Tredinnick wrote: > > > > > On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > > > however if i delete an user with records associated in the view I have > > > this error: > > > >

Re: django and database views

2009-01-05 Thread drakkan
On 6 Gen, 00:32, Malcolm Tredinnick wrote: > On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > > however if i delete an user with records associated in the view I have > > this error: > > > NotSupportedError: cannot delete from a view > > HINT:  You need an

Re: django and database views

2009-01-05 Thread Malcolm Tredinnick
On Mon, 2009-01-05 at 06:31 -0800, drakkan wrote: > however if i delete an user with records associated in the view I have > this error: > > NotSupportedError: cannot delete from a view > HINT: You need an unconditional ON DELETE DO INSTEAD rule. > > django try to delete record from the view

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
> Hi all, >> >> > I mapped a database view in django model as a normal database table, >> ... >> > there is a know workaround for this? any way to declare read only the >> > model? >> >> In short, no. Django doesn't currently provide any suppor

Re: django and database views

2009-01-05 Thread drakkan
t; > there is a know workaround for this? any way to declare read only the > > model? > > In short, no. Django doesn't currently provide any support for database views. > > There might be a few tricks you could do (such as redefining delete() thanks but this didn't work I already r

Re: django and database views

2009-01-05 Thread Russell Keith-Magee
't currently provide any support for database views. There might be a few tricks you could do (such as redefining delete() to be a no-op on the view model and on a custom default manager), but these certainly aren't tested or proven suggestions. Yours, Russ Magee %-) --~--~-~--~~-

django and database views

2009-01-05 Thread drakkan
Hi all, I mapped a database view in django model as a normal database table, all seems fine and I'm able to follow foreign key too, here is a sample class databaseview(models.Model): field1= user=models.ForeignKey(User) however if i delete an user with

Django and DataBase Views

2008-04-19 Thread Narso
Hi, I am asking for help. I made a DataBase View and a Model to join some models/tables for use Admin Site filters. In the interactive shell (python manage.py shell) it work ok, but in the browser take a inaceptable long long time to get response. The example models is shown in the message

Re: do Django's models support the aggregated database views?

2008-04-02 Thread Valery
, 4:07 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Mon, 2008-03-24 at 07:02 -0700, Valery wrote: > > Hi all, > > > i got django 0.95.1 (the one currently available under Ubuntu Feisty). > > I fail to convince Django to accept my aggregated "GROUP

Re: do Django's models support the aggregated database views?

2008-03-24 Thread Malcolm Tredinnick
On Mon, 2008-03-24 at 07:02 -0700, Valery wrote: > Hi all, > > i got django 0.95.1 (the one currently available under Ubuntu Feisty). > I fail to convince Django to accept my aggregated "GROUP BY" database > views as they have no primary key and, surely, Django al

do Django's models support the aggregated database views?

2008-03-24 Thread Valery
Hi all, i got django 0.95.1 (the one currently available under Ubuntu Feisty). I fail to convince Django to accept my aggregated "GROUP BY" database views as they have no primary key and, surely, Django also can't create this pk for me in a view :) the situation with aggregated

Re: Database views

2006-04-11 Thread George Sakkis
Thank you both for your answer. What I had in mind was read-only views, so all the update limitations are not a problem at all. Also, I am less interested in wrappers over native DBMS views. What I'd like is a programmer-friendly API for views, transparent to the underlying DBMS, similar to how

Re: Database views

2006-04-10 Thread Andy Dustman
On 4/10/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 4/10/06, George Sakkis <[EMAIL PROTECTED]> wrote: > > I understand Django doesn't support database views > > (http://en.wikipedia.org/wiki/View_%28database%29) right out of the > > box, but I was wo

Re: Database views

2006-04-10 Thread Adrian Holovaty
On 4/10/06, George Sakkis <[EMAIL PROTECTED]> wrote: > I understand Django doesn't support database views > (http://en.wikipedia.org/wiki/View_%28database%29) right out of the > box, but I was wondering if there's a reasonably easy way to implement > (or at least emu