django.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)
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, get_
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
> :)
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
>>
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
containing
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
> > What is the solutio
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
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
"Djan
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 s
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/$', 'sample_quer
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: llanitedave
> > Da
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 w
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 sample
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 f
14 matches
Mail list logo