Re: Modeling Question on Many-to-Many(with through) and Proxy models

2012-04-22 Thread Arruda
So using your tip, I've done this: class Foo1Bar(FooBar): > > objects = TypeAwareManager('foo__type',1) > > class Meta: > proxy= True > > def change_fb(cls): > old_foo = cls.foo > > @property > def new_foo(self): > return

Re: Modeling Question on Many-to-Many(with through) and Proxy models

2012-04-22 Thread Arruda
Thanks, I saw that .model thing too, but was also unsure about it... I might just test it. Em sábado, 21 de abril de 2012 19h04min30s UTC-3, akaariai escreveu: > > On Apr 21, 8:35 pm, Arruda wrote: > > Should I create this many-to-many table as a normal model(no

Re: Modeling Question on Many-to-Many(with through) and Proxy models

2012-04-21 Thread akaariai
On Apr 21, 8:35 pm, Arruda wrote: > Should I create this many-to-many table as a normal model(no proxy) and set > the foo foreingkey to Foo1 instead of Foo? > Or should I use only FooBar as many-to-many and create some specific > queries that would convert ALL the

Modeling Question on Many-to-Many(with through) and Proxy models

2012-04-21 Thread Arruda
I know already that are some limitations when using Many-to-Many and proxy models, I just want to know what is the best practices when doing something in this case: obs: the Choices is from model_utils (Django model utils) I have this first class: class Foo(models.Model): > "The single

Authentication and Modeling question.

2012-03-26 Thread Lee Hinde
I'm working on a rewrite of an app that has three categories of users and I'm wondering about the best way to link them to the authentication system: In-House Staff. Contractors Customers who interact via the app. The in-house staff model doesn't store any address info. Contractor and Customer

Re: Probably a very basic data modeling question

2010-03-31 Thread Daniel
Hi everyone, I am still having issues with my data models. I can't tell if the underlying problem is my model definitions or my inability to do the queries to manipulate my models to get the output that I want. Could someone please tell me if this is the right way to do it in my models.py?

Re: Probably a very basic data modeling question

2010-03-28 Thread Daniel Roseman
On Mar 28, 2:28 am, Daniel wrote: > Hi all, > > I'd appreciate it if you could help me out with something. > > I am trying to build a way to use faceted browsing through a database > of biological samples. > > what I want to model is this: > > Sample 1 >      race = white >

Re: Probably a very basic data modeling question

2010-03-28 Thread Thierry Chich
Hi For what i understand of your problem, you are calling tag the fields of a Model called Sample. From, what you say, it is not possible to say a lot of things, but it appear that you will have others models, such as Diseases, Country, You will need to relate the models with

Probably a very basic data modeling question

2010-03-27 Thread Daniel
Hi all, I'd appreciate it if you could help me out with something. I am trying to build a way to use faceted browsing through a database of biological samples. what I want to model is this: Sample 1 race = white age = adult gene = XCFR2 disease = cancer Sample 2 race =

Re: A bit of a modeling question

2010-03-17 Thread ALJ
m, ALJ <astley.lejas...@gmail.com> wrote: > > > > > Hi Preston, > > > > > Sorry, I don't get it. > > > > > The certainly do have the same fields, but sometimes the fields are > > > > derived from a linked table, or are a foreign key o

Re: A bit of a modeling question

2010-03-16 Thread aditya
stand how having the interface adapt to what the > > > current type is would work. > > > > ALJ > > > > On Mar 16, 3:04 pm, Preston Holmes <pres...@ptone.com> wrote: > > > > > On Mar 16, 3:21 am, ALJ <astley.lejas...@gmail.co

Re: A bit of a modeling question

2010-03-16 Thread ALJ
e > > current type is would work. > > > ALJ > > > On Mar 16, 3:04 pm, Preston Holmes <pres...@ptone.com> wrote: > > > > On Mar 16, 3:21 am, ALJ <astley.lejas...@gmail.com> wrote: > > > > > This is a bit of a modeling question that I

Re: A bit of a modeling question

2010-03-16 Thread aditya
> > ALJ > > On Mar 16, 3:04 pm, Preston Holmes <pres...@ptone.com> wrote: > > > On Mar 16, 3:21 am, ALJ <astley.lejas...@gmail.com> wrote: > > > > This is a bit of a modeling question that I am struggling to get my > > > head around. How

Re: A bit of a modeling question

2010-03-16 Thread ALJ
, Preston Holmes <pres...@ptone.com> wrote: > On Mar 16, 3:21 am, ALJ <astley.lejas...@gmail.com> wrote: > > > > > This is a bit of a modeling question that I am struggling to get my > > head around. How would you model this scenario? > > > I have to record ex

Re: A bit of a modeling question

2010-03-16 Thread Preston Holmes
On Mar 16, 3:21 am, ALJ <astley.lejas...@gmail.com> wrote: > This is a bit of a modeling question that I am struggling to get my > head around. How would you model this scenario? > > I have to record expenses that are of 3 different types. > > 1. Fixed - The name of the

Re: A bit of a modeling question

2010-03-16 Thread ALJ
... I suppose this would be the approach for extending a base model. My question is ... does it really matter which approach to take? Does one approach have advanteages or pitfalls? >>. class BaseCost(models.Model): markettingevent = models.ForeignKey(Event)

A bit of a modeling question

2010-03-16 Thread ALJ
This is a bit of a modeling question that I am struggling to get my head around. How would you model this scenario? I have to record expenses that are of 3 different types. 1. Fixed - The name of the expense and unit amount are fixed. For example, "inconvenience allowance" of £30

Re: Modeling question

2010-03-02 Thread Mark (Nosrednakram)
Hello Jeff, Not sure of your implementation but you should be able to adapt: http://projects.django-development.com/trac/dd_devel/wiki/recursive_groups_of_groups to work. You could replace department with navigation-collection and employee with menu item I believe. If nothing else the tests

Re: Modeling question

2010-03-02 Thread Mark (Nosrednakram)
Hello Jeff, Not sure of your implementation but you should be able to adapt: http://projects.django-development.com/trac/dd_devel/wiki/recursive_groups_of_groups to work. You could replace department with navigation-collection and employee with menu item I believe. If nothing else the tests

Modeling question

2010-03-02 Thread Jeffrey Taggarty
Hi Guys, I have a website (go figure!) where there is a main navigation, there is going to need to be sub pages for each main nav item, but this sub page can belong to more than 1 main nav, typically in the past I used a self referencing FK to handle this, but this time it's a m2m, any tips on

Re: Easy database modeling question

2010-01-21 Thread Waqqas Jabbar
If you want to add a profile for each user, check out http://scottbarnham.com/blog/2008/08/21/extending-the-django-user-model-with-inheritance/ the key in django is reusing existing "applications" maybe this might help http://code.google.com/p/django-messages/ On Thu, Jan 21, 2010 at 6:16 AM,

Easy database modeling question

2010-01-20 Thread Chris
This is my first Django experience and I'm having trouble figuring out the right answer to the right relationship to have. (brain fart maybe.. ) I have a site that users have profiles and can message each other. So my model looks like: class User(models.Model): username =

Data Modeling Question

2006-06-20 Thread Sandro
I've got a csv file filled with directory paths, users and their permissions... I have a database for paths and users I need to go to every path and find which user has what permissions for that path. do I need to make a class Web_Permission(models.Model): path = models.ForeignKey(Web_Path)