Re: DB: working with databases

2011-09-25 Thread Xavier Ordoquy
Le 26 sept. 2011 à 01:48, Russell Keith-Magee a écrit : > On Mon, Sep 26, 2011 at 12:13 AM, Xavier Ordoquy wrote: >> Hi, >> Database will be better designed if you let django orm create them first and >> you add your tuning after. >> However, you can still work with non

Platform system with Django?

2011-09-25 Thread Ian
I'm new to django, and at this point all I've done is the tutorial. But my end goal is to create a website that serves as a platform system. I want users to go to my site, create an account, edit some settings/ preferences, and a subdomain (can you do this with django?). Then within each

Re: Error in Tutorial?

2011-09-25 Thread Karen Tracey
On Sun, Sep 25, 2011 at 10:42 PM, Grant Humphries wrote: > I am referring to Tutorial number 3. When editing the 'polls/ > index.html' file, the tutorial says to input: > > {% if latest_poll_list %} > >{% for poll in latest_poll_list %} >{{

Error in Tutorial?

2011-09-25 Thread Grant Humphries
I am referring to Tutorial number 3. When editing the 'polls/ index.html' file, the tutorial says to input: {% if latest_poll_list %} {% for poll in latest_poll_list %} {{ poll.question }} {% endfor %} {% else %} No polls are available. {% endif %} I input exactly

Web Designer

2011-09-25 Thread christian.posta
I do most of the html code for my django templates in PyCharm and just write the code by hand. I've been evaluating WYSIWYG html/web designers recently (Dreamweaver). But, I find myself using the 'split' mode of Dreamweaver where I write the code and watch the auto-updating visual editor. But i

Re: DB: working with databases

2011-09-25 Thread Russell Keith-Magee
On Mon, Sep 26, 2011 at 12:13 AM, Xavier Ordoquy wrote: > Hi, > Database will be better designed if you let django orm create them first and > you add your tuning after. > However, you can still work with non Django generated database. > django-extensions application even

Re: How to make a query form depend on a field?

2011-09-25 Thread Russell Keith-Magee
On Sun, Sep 25, 2011 at 9:00 PM, David wrote: > I'm new to Django, gone through the django book and some > documentation, but I can't find how to do this or if it's possible. > > I have a model that lists documents with title and edition.  It also > has a foreign key to

Re: can't get STATICFILES to work (Django dev version)

2011-09-25 Thread Xavier Ordoquy
Hi, > I have read and followed the docs on static files. > django.contrib.staticfiles is in INSTALLED_APPS > (by default), and I have set STATICFILES_DIRS to where my static files > are (/home/nara/media). (I have > tried with and without a slash at the end of this absolute file path). Static

can't get STATICFILES to work (Django dev version)

2011-09-25 Thread nara
I am having trouble getting static files to work, and have to resort to putting all my css inline (ugly!). I have read and followed the docs on static files. django.contrib.staticfiles is in INSTALLED_APPS (by default), and I have set STATICFILES_DIRS to where my static files are

Re: retrieving data from list of dictionaries

2011-09-25 Thread Shawn Milochik
This is a Python question. Please subscribe to this list: http://mail.python.org/mailman/listinfo/python-list Look up the built-in command "zip" and the keys method of dict to solve your issue. Shawn -- You received this message because you are subscribed to the Google Groups "Django users"

retrieving data from list of dictionaries

2011-09-25 Thread sakthi
Hi all. i have a list of dictionaries d=[{'name':'ram','age':'23','place':'chennai'},{'name':'sakthi','age': 20','palce':pune'}] i want to display the name and palce of the two dict in a table. i tried for long but couldn't get. please suggest me how to use the for loop in the html file and

Re: DB: working with databases

2011-09-25 Thread Xavier Ordoquy
Hi, Database will be better designed if you let django orm create them first and you add your tuning after. However, you can still work with non Django generated database. django-extensions application even provides an inspectdb that will guess most of your models from the database schema.

Re: Accessing attributes on ManyToManyField table

2011-09-25 Thread Xavier Ordoquy
Hi, You'll need to acces it through the membership_set: person_instance.membership_set.date_joined Regards, Xavier, Linovia. Le 25 sept. 2011 à 17:22, mcjffld a écrit : > > In the documentation (which really is great) there is this example > > class Membership(models.Model): >person =

DB: working with databases

2011-09-25 Thread Tanuja
Is it possible to work with databases in the "traditional" way? I mean: - Design, create, manage the database natively - Have batch processes to insert and mange data - Connect this data to a django-based website What tools are there to do this? Is this an inefficient approach in the

Accessing attributes on ManyToManyField table

2011-09-25 Thread mcjffld
In the documentation (which really is great) there is this example class Membership(models.Model): person = models.ForeignKey(Person) group = models.ForeignKey(Group) date_joined = models.DateField() invite_reason = models.CharField(max_length=64) My question is, is there a way

Re: Parellel request from the same user in very short time

2011-09-25 Thread Leo
Did you declare the appropriate unique_together metadata on your construction_queue model? It says it's enforced at the database level so it seems like that would cause a failure on the second INSERT (and that's consistent with my experience). I'm not positive about your model but something like

How to make a query form depend on a field?

2011-09-25 Thread David
I'm new to Django, gone through the django book and some documentation, but I can't find how to do this or if it's possible. I have a model that lists documents with title and edition. It also has a foreign key to an organization table. I'm trying to create a query form that first takes the

Re: Parellel request from the same user in very short time

2011-09-25 Thread Torsten Bronger
Hallöchen! Russell Keith-Magee writes: > [...] > > I might be missing something obvious here, but isn't this > *exactly* what database transactions are designed to fix? > Admittedly, you've got an unusual presentation born out of weird > browser behavior, but making sure that two overlapping

Re: Parellel request from the same user in very short time

2011-09-25 Thread Martin Tiršel
On Sun, 25 Sep 2011 02:09:46 +0200, Russell Keith-Magee wrote: On Sat, Sep 24, 2011 at 10:08 PM, Martin Tiršel wrote: Hello, I am using Apache with mod_wsgi and following setting: WSGIDaemonProcess dev.xyz.com processes=1 threads=5 user=xyz

Re: Model Validation

2011-09-25 Thread Kurtis Mullins
Looks like you want to use this field: https://docs.djangoproject.com/en/dev/ref/models/fields/#positiveintegerfield On Sat, Sep 24, 2011 at 11:54 PM, jenia ivlev wrote: > I have a model M that has a field num=models.IntegerField() > I have a modelform called 'F' for