Re: Accessing Models After get_model()

2014-12-26 Thread llanitedave
go.db.models import get_app, get_models > > def index(request): > app = get_app('sampledb') > modeldict = {model._meta.model_name: model for model in get_models(app > )} > return render(request, 'sampledb/index.html', {'my_models': modeldict) > > Collin > > On Sund

Accessing Models After get_model()

2014-12-21 Thread llanitedave
I'm trying to display a list of the models in my app on a web page, similar to the way the Django Admin does it. I'm not sure where the admin section is coded, which might be part of my problem. I'm using Django 1.7, and have built a very simple view: from django.db.models import get_app,

Re: ANN: Django website redesign launched

2014-12-17 Thread llanitedave
On Tuesday, December 16, 2014 8:12:54 AM UTC-8, Jannis Leidel wrote: > > Hi everyone, > > We're incredibly proud to share with you the new design of the Django > website, the documentation and the issue tracker. > > This is a long time coming and we couldn't be happier to finally ship it >

Re: Getting the "Real" Foreign Key from a ModelForm

2014-07-28 Thread llanitedave
Ahhh... That sounds good. Too easy, in fact. I can't wait to give it a try! Thanks! On Monday, July 28, 2014 11:17:16 AM UTC-7, Daniel Roseman wrote: > > On Monday, 28 July 2014 15:46:11 UTC+1, Tom Evans wrote: >> >> >> >> You can use kwargs, but it is much cleaner and less typing to use

Getting the "Real" Foreign Key from a ModelForm

2014-07-28 Thread llanitedave
This is my first attempt at a work Django Application since the tutorial, so my odds of missing something obvious are pretty high. Still, I've been as far as I can in the documentation, and I can't find anything that addresses this. Using Python 2.7 and Django 1.6.5, in a ModelForm

Re: The installation instructions for Windows is based on Python 3.4 But The MySQL connectors for Python are only for 2.7, 3.2 and 3.3

2014-05-21 Thread llanitedave
On Wednesday, May 21, 2014 11:40:08 AM UTC-7, Tom Evans wrote: > > On Wed, May 21, 2014 at 12:05 AM, Varuna Seneviratna > wrote: > > The installation instructions for Windows is based on Python 3.4 But The > > MySQL connectors for Python are only for 2.7, 3.2 and 3.3

Re: Django for in-house data

2013-12-08 Thread llanitedave
It wasn't in Django, but I previously developed a very large and complex database and gave administrative access to just a few too many people. They had the best of intentions -- no sabotage involved, but they still managed to screw up the records royally. Lesson learned -- NEVER give blanket

Re: Django IDE

2010-08-04 Thread llanitedave
I'm surprised nobody's mentioned SPE yet. I've not gone very far with either Python nor Django yet, but from what I've done so far, particularly with conveniently grouping modules, SPE seems to be a natural tool. -- You received this message because you are subscribed to the Google Groups

Re: Import Confusion? Forms Confusion? Or just Confusion?

2010-07-19 Thread llanitedave
Thanks, Shawn. I believe the PYTHONPATH is fine, because other views and templates that didn't have forms were working correctly. But you're right about "addSample = sampleEntry(request.POST)" causing the error. I commented out those two lines and the error goes away, and the page displays. I

Import Confusion? Forms Confusion? Or just Confusion?

2010-07-19 Thread llanitedave
I'm trying to set up a simple modelform. I have a projects with a models.py, a views.py, a urls.py, and a forms.py. All of these are in a single directory. My urls.py is set up like so: urlpatterns = patterns('myProject.views', (r'^$', 'intro'), ... (r'^samples/query/$',

Re: Database Design Question

2010-06-19 Thread llanitedave
> > > The sample type table is only needed to generate a form for new samples. > >  The attribute table could be broken up by data type if necessary as well. > > > Sent from my Verizon Wireless BlackBerry > > > -Original Message- > > From: llan

Re: Database Design Question

2010-06-19 Thread llanitedave
Thanks for the response, Venkatraman. You're right that I don't anticipate a huge number of records here -- a few hundred thousand at the extreme high end. Sharding isn't something I considered, and I don't think it would be necessary. I guess it's mostly a normalization question. And while I

Database Design Question

2010-06-18 Thread llanitedave
I'm putting together a system to track scientific samples of various types. The "various types" is what's making me scratch my head at the moment. Each sample type has a particular set of attributes, some of which are unique, others are shared with other sample types. For example, a fluid

New User Stuck on Tutorial Part 2

2010-05-10 Thread llanitedave
Using Ubuntu 10.04... I'm just starting out on django and going through the tutorials. Everything installed, got the polls working in parts 1 and 2 of the tutorial, and I think I'm sailing. Then I get to the bottom of Part 2, to the section "Customize the admin look and feel". In settings.py I