Re: Multiple inheritance model

2010-11-21 Thread Joseph (Driftwood Cove Designs)
this is django.db.models.base.Model.save_base() a comment in the code for ModelA indicates the call to save_base() is required for Mptt. On Nov 21, 5:43 am, Marc Aymerich wrote: > On Sun, Nov 21, 2010 at 5:31 AM, Joseph (Driftwood Cove Designs) < > > powderfl...@gmail.com> wrot

Re: How can I set a flatpage to be my homepage?

2010-11-21 Thread Joseph (Driftwood Cove Designs)
mongoose - all you need to do is specify the url: / for the flatpage you want to be homepage. a flatpage can only have one URL - if you want it to show up on 2 urls (e.g. / and /home/), you'll need a re-direct, a view, a re-write rule, or some other trick. good luck. On Nov 21, 2:48 am, m

Re: Not main content on site - how to?

2010-11-21 Thread Joseph (Driftwood Cove Designs)
robos85 - there are a couple ways to go - - context processor: this can add a set of context variables so they are available in every template - very easy to write - just a function that takes a request object, returns a context dictionary. Add to your CONTEXT_PROCESSORS setting http

Re: Askani

2010-11-21 Thread Joseph (Driftwood Cove Designs)
there might be one that you can adapt to generate django models instead of SQL models - could save you a ton of design and UI work if you find the right one. ciao. ...Joseph On Nov 21, 5:35 am, Alvaro Mouriño wrote: > 2010/11/21 Joseph (Driftwood Cove Designs) : > > > Alvaro - > &g

Re: Askani

2010-11-20 Thread Joseph (Driftwood Cove Designs)
Alvaro - this is a nifty idea - will save time and improve consistency. Opens up model proto-typing to non-Django, non-Python, maybe even non- programmer? Could be used for collaboration during model design - especially if it presents an ER'ish diagram as you build the data model. look forward t

Re: User model optional

2010-11-20 Thread Joseph (Driftwood Cove Designs)
You can - it's just Python, so you can do virtually anything - auth is a contrib module, so you can just choose not to use it. But the User model does a ton of work and is hooked into many other modules - including all the base auth layer you might want to build your custom authorization on top of.

Re: problems with model inheritance if base class is not abstract

2010-11-20 Thread Joseph (Driftwood Cove Designs)
Ramiro - you made my day. Somehow I missed this little tid bit in the docs - what a super handy feature!! thank you. On Nov 20, 4:36 pm, Ramiro Morales wrote: > On Sat, Nov 20, 2010 at 7:59 AM, marco.ferrag...@gmail.com > > > > wrote: > > Hi all! I'm new to django and I'm experimenting with mod

Re: database relationships, many to one

2010-11-20 Thread Joseph (Driftwood Cove Designs)
unless a dept. can belong to several Universities (?), Carlos has the right model. On Nov 20, 8:23 pm, Carlos Daniel Ruvalcaba Valenzuela wrote: > Depends on you requirements, you could have used a Foreign Key to the > University on the Department model and marking it as required, thus > there ca

Re: Multiple inheritance model

2010-11-20 Thread Joseph (Driftwood Cove Designs)
): do some stuff else: # update do some other stuff On Nov 20, 5:06 am, Marc Aymerich wrote: > On Sat, Nov 20, 2010 at 4:37 AM, Joseph (Driftwood Cove Designs) < > > > > powderfl...@gmail.com> wrote: > > I'm trying to integrate two existing apps, bo

Re: Django Tutorial - http://docs.djangoproject.com/en/dev/intro/tutorial01/

2010-11-19 Thread Joseph (Driftwood Cove Designs)
just off the cuff - what's a "DateFimeField"?should be DateTimeField? On Nov 19, 12:44 pm, hank23 wrote: > I'm trying to work through part 1 of the tutorial at: > > http://docs.djangoproject.com/en/dev/intro/tutorial01/ > > and I seem to be having problems getting my model code to work. I > c

Multiple inheritance model

2010-11-19 Thread Joseph (Driftwood Cove Designs)
I'm trying to integrate two existing apps, both of which provide a django Model - call them ModelA and ModelB - my app's model needs to inherit from both of these. I know django models support multiple inheritance, but both ModelA and ModelB define a Meta class, override the save() method, etc., so

Re: Trouble getting doctests to execute in app with no model...

2009-08-25 Thread Joseph (Driftwood Cove Designs)
On Aug 25, 12:22 pm, Alex Gaynor wrote: > You can put your tests in a tests.py file, however you still need to > have an empty models.py file, so Django picks up the app correctly. Thanks Alex - unfortunately, if I put an empty models.py file in, I get an exception when the test runner creates t

Trouble getting doctests to execute in app with no model...

2009-08-25 Thread Joseph (Driftwood Cove Designs)
We use a custom authentication backend, and I'm trying to develop a test suite for it. The app has no model, since it uses the model from contrib.auth So, I put my tests in tests.py, but the test runner does not load it, even though the custom auth app is in INSTALLED_APPS. I tried adding an em

Re: Auth test with custom auth backend

2009-08-25 Thread Joseph (Driftwood Cove Designs)
On Jul 26, 6:06 pm, Russell Keith-Magee wrote: > One approach that may be worth considering is to look at whether you > actually need to put contrib.authin INSTALLED APPS. If you're just > using some of the backend utilities - such as the authentication > backends - you may not need to sync theau