Re: User login form

2008-02-06 Thread eraoul
P.S. A current bug I have in my login system is maddening: if I try to login (using the real basic username/password form I copied out of the django book, and using the built-in django.auth.views.login function), my login will work great the first time. I have a redirect to a "start" page using th

Re: Read-only connection to database. How to?

2008-02-06 Thread James Bennett
On Feb 6, 2008 1:43 AM, koenb <[EMAIL PROTECTED]> wrote: > You could take a look at the multidb branch (specifically check out > ticket #4747). It is a bit behind on trunk, but the basics should > work. It allows you to define multiple connections, so you should be > able to connect to the same db

Re: django version for production?

2008-02-06 Thread Jarek Zgoda
Christian W. Koch napisał(a): > i'm no django expert, yet, but i use trunk. now, for production > purposes i still use trunk because before i "svn up" on production i > make sure that the site runs on my development box on the latest > trunk. > > you do have a development environment, right? ;)

Re: django version for production?

2008-02-06 Thread Kenneth Gonsalves
On 06-Feb-08, at 2:08 PM, Jarek Zgoda wrote: >> you do have a development environment, right? ;) > > I remember one issue just after autoescaping went into trunk, that was > visible only on sites runnung on FastCGI, so development server/env > sometimes clearly is not enough to catch everything.

Re: Extending Django's admin application

2008-02-06 Thread David Reynolds
On 6 Feb 2008, at 2:09 am, Brandon Taylor wrote: > > Excellent, I already have that library installed from working through > the book samples. > > Rails has several plugin websites, like www.agilewebdevelopment.com. > Is there something similar for Django? My Google searches haven't come > up wi

Re: Model Blues - A Newbie's question

2008-02-06 Thread nikosk
Awesome. Thanks ... On Feb 5, 1:00 am, r_f_d <[EMAIL PROTECTED]> wrote: > Sure, you can do it, with two (at least) ways, one is to put this into > your model so it automatically happens, search the documentation or > users group for threadlocals middleware. The other way is to simply > put it in

how to get raw_id_admin value from foreign key field?

2008-02-06 Thread sector119
Hi ALL! How can I check that model M has some primary key field with raw_id_admin value set to True? How can I access this option? I'm tired of looking for this option using dir() :) P.S. I do not know name of the PK field. I try to substitute ChoiceField with TextField usinc formfield_callback

Re: how to get raw_id_admin value from foreign key field?

2008-02-06 Thread sector119
def my_callback(field, **kwargs): if field.rel.raw_id_admin: return TextField() else: return field.formfield(**kwargs) On 6 Лют, 11:36, sector119 <[EMAIL PROTECTED]> wrote: > Oh, sorry! I mean foreign key, not primary key :( > > On 6 Лют, 11:32, sector119 <[EMAIL PROTECTED]> wrote: >

Re: Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Safariman
After asking around in #django it dawned to me that model inheritance is something which isn't really supported in Django, so I'll just have to think of a different solution. In any case, thanks for reading this post... :) --~--~-~--~~~---~--~~ You received this me

Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Safariman
Hello all, I'd like some opinions about something. I'd like to know if this is correct behavior or if it could be considered a bug in django. This issue is related to 2 models where one model is the superclass of the other. Let me illustrate with an small abstract example. class Parent(models.M

Re: how to get raw_id_admin value from foreign key field?

2008-02-06 Thread sector119
Oh, sorry! I mean foreign key, not primary key :( On 6 Лют, 11:32, sector119 <[EMAIL PROTECTED]> wrote: > Hi ALL! > > How can I check that model M has some primary key field with > raw_id_admin value set to True? How can I access this option? I'm > tired of looking for this option using dir() :)

Re: Opinion requested on issue related to model inheritance and exceptions

2008-02-06 Thread Kenneth Gonsalves
On 06-Feb-08, at 3:07 PM, Safariman wrote: > I'd like some opinions about something. I'd like to know if this is > correct behavior or if it could be considered a bug in django. > > This issue is related to 2 models where one model is the superclass of > the other. Let me illustrate with an smal

AssertionError on a model

2008-02-06 Thread Nader
Hallo, I have a model as following: class Distributequeue(models.Model): datasetID = models.ForeignKey(Dataset, db_column="datasetID", primary_key=True) filename = models.CharField(primary_key=True, maxlength=240) fileVersion = models.CharField(primary_key=True, maxlength=48) dis

Re: AssertionError on a model

2008-02-06 Thread Pete Crosier
A model can only use one field as its primary key and Distributequeue.objects.get() should only return one object. http://www.djangoproject.com/documentation/model-api/#primary-key http://www.djangoproject.com/documentation/db-api/#get-kwargs Cheers, Pete. On Feb 6, 12:11 pm, Nader <[EMAIL PROT

How to organize a django website

2008-02-06 Thread Brandon Taylor
Hello everyone, I'm just getting started, so please bear with me. How should I organize my website? I haven't seen a definitive example of where to put settings files, templates, applications, images, stylesheets, etc. My best guess would be something like: /website_root /source settings.

Re: AssertionError on a model

2008-02-06 Thread Nader
Thank you for this conceptual remark. Could the "ForeignKey" filed be a "primary_key at the same time? datasetID = models.ForeignKey(Dataset, db_column="datasetID", primary_key=True) I suppose I can define a group of fields as "primary_key" by using of the next statement : Class Model(..)

need some help

2008-02-06 Thread bunicutadincarrefour
i am participating to a little contest and i need some votes...if you woud like to help me, you could just click the following link...you'll just vote for a picture with me and my girlfriend. Thanks a lot! this is the link : http://www.jurnale.ro/concurs/index.php?pag=61&poza_id=1973&action=vote -

Re: new to django

2008-02-06 Thread Ronaldo Z. Afonso
Hi, I'm new to djando too, but try issue this command in your project direcotry: python manage.py syncdb. Don't forget to check your database configuration. Good luck. Ronaldo On Wed, 2008-02-06 at 18:38 +0530, Beema shafreen wrote: > Hi everybody i am new to django, > > I am trying to create

Re: How to organize a django website

2008-02-06 Thread Daniel Roseman
On Feb 6, 1:17 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > Hello everyone, > > I'm just getting started, so please bear with me. How should I > organize my website? I haven't seen a definitive example of where to > put settings files, templates, applications, images, stylesheets, etc. > > My

Re: new to django

2008-02-06 Thread Brandon Taylor
Hello Beema, Do you have the Python MySQL adapter installed? If not you, can find the downloads at http://sourceforge.net/projects/mysql-python. I'm not sure regarding the location of your template HTML file, I've asked the group for an example of how to organize a Django project in this post:

Re: django version for production?

2008-02-06 Thread Christian W. Koch
exactly, that's what i meant. i usually skip a staging server, for cost reasons, and configure my dev box to run the same configuration as my production server. either way, keneth and jarek are right. the point is that trunk is as safe as you want it to be, or at least as pain-free as you want. O

Re: How to organize a django website

2008-02-06 Thread Brandon Taylor
Thanks for the advice Daniel. So something like this would be better... /my_shared_web_host_folder# not accessible /my_django_project # not accessible /source settings.py, etc /templates base_template.html, etc /app1 /app2, etc /public_html - website(s) root

new to django

2008-02-06 Thread Beema shafreen
Hi everybody i am new to django, I am trying to create my own project using django, I have a got an error when in logged in with the password and user name the error is Request Method: GET Request URL: http://192.168.5.26:8000/admin/ Exception Type: ProgrammingError Exception Value: (1146, "T

[newbie]Apache Deployment Problem

2008-02-06 Thread Tony Winslow
Hi, all! I installed mod_python and do the configurations as the tutorial on the official site. But mod_python still can not find the mysite.settings module. What might be the problem? --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: How to organize a django website

2008-02-06 Thread prz
Daniel Roseman wrote: > > On Feb 6, 1:17 pm, Brandon Taylor <[EMAIL PROTECTED]> wrote: > >> Hello everyone, >> >> I'm just getting started, so please bear with me. How should I >> organize my website? I haven't seen a definitive example of where to >> put settings files, templates, applications

Re: How to organize a django website

2008-02-06 Thread Rajesh Dhawan
Hi Brandon, For additional insight on this topic, you might want to check out this entry from James Bennett's fantastic blog, The B-List: http://www.b-list.org/weblog/2006/sep/10/django-tips-laying-out-application/ -Rajesh D --~--~-~--~~~---~--~~ You received th

filtering foreign key

2008-02-06 Thread [EMAIL PROTECTED]
I'm sure this is a common case and the answer is readily available somewhere, but I can't seem to find it. In a model, I've got: author = models.ForeignKey(User, related_name="article_author") But I don't want to get all Users, I want to filter for Is_staff and only show staff users. Like I

Re: AssertionError on a model

2008-02-06 Thread Rajesh Dhawan
On Feb 6, 8:27 am, Nader <[EMAIL PROTECTED]> wrote: > Thank you for this conceptual remark. > Could the "ForeignKey" filed be a "primary_key at the same time? No. And that's the source of the problem you are seeing. If you just want the ForeignKey to be unique, you can add a unique=True attribu

Re: How to organize a django website

2008-02-06 Thread Brandon Taylor
Thanks guys! I'm about halfway through the Definitive Guide book, and I like what I've seen so far. I'll just have to dig in, and start coding. I've seen quite a few posts about how to organize a "typical" website, so after I get one working I'll post an overview of what I did and where I put thin

Re: filtering foreign key

2008-02-06 Thread Rajesh Dhawan
On Feb 6, 9:40 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm sure this is a common case and the answer is readily available > somewhere, but I can't seem to find it. > > In a model, I've got: > author = models.ForeignKey(User, related_name="article_author") > > But I don't want to g

Re: Improperly configured exception

2008-02-06 Thread Schmoopie
I looked into this. mysite.urls exists, no syntax errors, but it seems that when it tries to import from a models.py file, it goes looking for that file in a completely different directory, which in fact no longer exists. Weird. Is this an environment variable problem? Why would it go looking for

Re: filtering foreign key

2008-02-06 Thread [EMAIL PROTECTED]
Thanks Rajesh. I actually found it about 2 minutes after I posted. That's it. On Feb 6, 8:50 am, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Feb 6, 9:40 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> > wrote: > > > I'm sure this is a common case and the answer is readily available > > somewhere, b

overriding (or validating) model field attribute setting?

2008-02-06 Thread mtrumpler
I'm relatively new to Django, so please be gentle. :) I'm trying to implement an http credential management module. Something along the lines of Firefox's password management, that stores (host,realm,user,password) in one model for use in http requests. The passwords are encrypted using an encry

template & forloop help

2008-02-06 Thread leahy_rich
Hi guys, Trying to figure out how to use the forloop.counter in a template but to add it to a field to increment the name of the field each time. for example.. in my template i will have this {% for div in divs %} {{ form.name }} {% endfor %} so this will result in ... name name name etc.. I

Setting up Apache & mod_python on my development computer

2008-02-06 Thread Brandon Taylor
Hi everyone, I have Apache 2 and mod_python installed on Windows. The mod_python module is loaded and active. Here's a breakdown of where things are... Python is installed at: C:\Python25 Django is installed at: C:\Python25\Lib\site-packages \django My 'testproject' in i

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Aaron Fay
Hey Brandon, I have mine working on the same rig as you (looks like). Here's a shot in the dark: # << add forward slash SetHandler python-program PythonPath "['C:/django_projects/'] + sys.path" # << remove 'testproject' PythonHandler django.core.handlers.modpython SetEnv DJANG

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Jonathan Ballet
Hi, Brandon Taylor wrote: > > SetHandler python-program > PythonPath "['C:/django_projects/testproject'] + sys.path" > [...] Try : PythonPath "['C:/django_projects/'] + sys.path" instead, since "testproject" is the subdirectory where you project lives in. Maybe changing the

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Brandon Taylor
Hi Aaron, I'm still getting the same error after I restart Apache. Is there a better setup to use for the install location for Django and where I place my projects that plays nice with Apache? Thanks, Brandon On Feb 6, 11:05 am, Aaron Fay <[EMAIL PROTECTED]> wrote: > Hey Brandon, > > I have min

Re: [newbie]Apache Deployment Problem

2008-02-06 Thread Karen Tracey
On Feb 6, 2008 9:11 AM, Tony Winslow <[EMAIL PROTECTED]> wrote: > Hi, all! > I installed mod_python and do the configurations as the tutorial on the > official site. But mod_python still can not find the mysite.settings > module. What might be the problem? Could be apache doesn't have permission

Re: User permissions

2008-02-06 Thread Erwin
> In the admin it's basically not possible right now, but will become > very easy in the not-too-distant future. That sounds quite interesting, but I'm not totally sure what you are referring to. Do you mean the hooks the newforms admin branch provides or maybe the possibilities of the row-level

Re: User permissions

2008-02-06 Thread James Bennett
On Feb 6, 2008 11:57 AM, Erwin <[EMAIL PROTECTED]> wrote: > That sounds quite interesting, but I'm not totally sure what you are > referring to. Do you mean the hooks the newforms admin branch provides > or maybe the possibilities of the row-level permissions branch? newforms-admin. row-level-pe

Re: Template tag parameter

2008-02-06 Thread Rajesh Dhawan
On Feb 5, 7:51 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello, > > I've made a tag with I want to call with a function name and parameter > like this: > > {% tag "delete_wiki_entry" "Delete" "Are you sure you want to delete > this wikiboard entry?" "delete_wikientry({{entry.name}})"

{% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
Running Django v0.96. Want to check to see if this behavior is normal. I have a base template that uses {% load %}. I have another template that extends the base template. The {% load %} tag doesn't seem to carry into the extended template. In other words, it looks like I have to use {% load

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Brandon Taylor
Well, still no working solution, but here is my httpd.config now: SetHandler python-program PythonPath "['C:/django_projects/', 'C:/Python25/lib/site-packages/ django'] + sys.path" PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE testproject.settings

Specifying custom upload to with FileField

2008-02-06 Thread shabda
I have a model like class ProjectFile(models.Model): project = models.ForeignKey(Project) file = models.FileField(upload_to = '/files/') class Project(models.Model): name = models.CharField(max_length = 100) With this the uploaded files will go to <>/files/, howeverI want to upload a

Re: [newbie]Apache Deployment Problem

2008-02-06 Thread Tony Winslow
Karen Tracey wrote: > On Feb 6, 2008 9:11 AM, Tony Winslow <[EMAIL PROTECTED] > > wrote: > > Hi, all! > I installed mod_python and do the configurations as the tutorial > on the > official site. But mod_python still can not find the mysite.settings >

RE: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Matt Vickers
Try changing to Django's probably looking for testproject.testproject.settings M. -Original Message- From: django-users@googlegroups.com on behalf of Brandon Taylor Sent: Thu 2/7/2008 8:16 a.m. To: Django users Subject: Re: Setting up Apache & mod_python on my development computer

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Michael Hipp
Is there a reason this line looks like this: > Instead of like this: > Michael Brandon Taylor wrote: > Well, still no working solution, but here is my httpd.config now: > > > SetHandler python-program > PythonPath "['C:/django_projects/', 'C:/Python25/lib/site-packages/ > dj

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Brandon Taylor
Hi Guys, Yes, I've tried that as well. No dice. Ugh! b On Feb 6, 1:22 pm, Michael Hipp <[EMAIL PROTECTED]> wrote: > Is there a reason this line looks like this: > > > > Instead of like this: > > > > Michael > > Brandon Taylor wrote: > > Well, still no working solution, but here is my

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Daniel Roseman
On 6 Feb, 19:03, Adam Stein <[EMAIL PROTECTED]> wrote: > Running Django v0.96. > > Want to check to see if this behavior is normal. I have a base template > that uses {% load %}. I have another template that extends the base > template. The {% load %} tag doesn't seem to carry into the extended

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
On Wed, 2008-02-06 at 11:31 -0800, Daniel Roseman wrote: > >From the same documentation page you quote above (http:// > www.djangoproject.com/documentation/templates/): > > When you load a custom tag or filter library, the tags/filters are > only made available to the current template -- not any

Re: OneToOne Relationships

2008-02-06 Thread Vance Dubberly
Thanks that makes more sense than the current implementation. I hope that using ForeignKey for the current relationships now will allow me to update the with unique=True later ( of course realizing that I'll have to play with how I access the ForeignKey). Vance On Feb 5, 2008 6:10 PM, Malcolm T

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Aaron Fay
Hey Brandon, Here's my exact setup:               SetHandler python-program         PythonPath "['C:\django'] + sys.path"         PythonHandler django.core.handlers.modpython         SetEnv DJANGO_SETTINGS_MODULE testproject.settings         PythonDebug On                   SetHand

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Aaron Fay
Brandon, I just realized also, from your original error: EnvironmentError: Could not import settings 'testproject.settings' (Is it on sys.path? Does it have syntax errors?): No module named testproject.settings. Does it have syntax errors? Aaron Aaron Fay wrote: Hey Brandon, Here's m

Re: User login form

2008-02-06 Thread eraoul
Sorry if I'm a pest... but does anybody out there have any idea how to do logins? I can write my own newforms login form... no problem. But how do I hook it up to django's own authentication view in django.contrib.auth.views? That code seems to use an oldforms UserAuthentication form, which isn't

Re: [newbie]Apache Deployment Problem

2008-02-06 Thread Karen Tracey
On Feb 6, 2008 2:16 PM, Tony Winslow <[EMAIL PROTECTED]> wrote: > > Karen Tracey wrote: > > On Feb 6, 2008 9:11 AM, Tony Winslow <[EMAIL PROTECTED] > > > wrote: > > > > Hi, all! > > I installed mod_python and do the configurations as the tutorial > > on the >

sorting by another table

2008-02-06 Thread charles.wesley
I have a Sale model that foreign keys into an APN model, which foreign keys into a Zip model. I'd like to sort my Sale objects by the 'zip' field on the Zip model, but Sale.objects.select_related().order_by('sales_zip.zip') doesn't work (1054, "Unknown column 'sales_zip.zip' in 'order

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread koenb
BTW, you can add tags to builtins if you need them all the time. eg. if you need i18n all over: from django.template import add_to_builtins add_to_builtins('django.templatetags.i18n') Koen On 6 feb, 20:59, Adam Stein <[EMAIL PROTECTED]> wrote: > On Wed, 2008-02-06 at 11:31 -0800, Daniel Rosema

Re: How to organize a django website

2008-02-06 Thread Anton Kovalyov
Hi Brandon, Brandon Taylor wrote: > Hello everyone, > > I'm just getting started, so please bear with me. How should I > organize my website? In our project, we use a little bit different source code organization: / |-- apps/ | |-- app1/ | |-- app2/ | |-- ... | |-- special_app

Re: new to django

2008-02-06 Thread [EMAIL PROTECTED]
Don't forget to add 'django.contrib.admin' to INSTALLED_APPS in your settings.py after that, run python manage.py syncdb from your root project folder. that creates necessary table 'django_admin_log' on your database. On Feb 6, 4:08 pm, "Beema shafreen" <[EMAIL PROTECTED]> wrote: > Hi everybody

Re: Setting up Apache & mod_python on my development computer

2008-02-06 Thread Brandon Taylor
Hi Aaron, I'm assuming that it doesn't have errors, as I can run the website using the built-in server. It's just an new, empty project, so all I get is the django welcome page. I'm hoping I'll have better luck configuring my Mac at home, which is where I'll be doing 99% of my development anyway.

Re: Code upgrade

2008-02-06 Thread Chris
James, Does magic removal help to upgrade code from 91 to present or is it a set of code used to assist with writing a potential application that could do this? Thanks for all your help. You are very helpful on this forum. Chris On Feb 5, 3:17 pm, Chris <[EMAIL PROTECTED]> wrote: > so does any

Re: {% load %} tag in a base template can't be inherited?

2008-02-06 Thread Adam Stein
On Wed, 2008-02-06 at 13:02 -0800, koenb wrote: > BTW, you can add tags to builtins if you need them all the time. > > eg. if you need i18n all over: > > from django.template import add_to_builtins > add_to_builtins('django.templatetags.i18n') Thanks for the info. Where would I put this? --

Which markup language to choose?

2008-02-06 Thread Florian Lindner
Hello, I'm writing my own blogging application for Django (yes, I want to reinvent the wheel, for learning and fun) ;-) According to documentation django.contrib.markup provides an interface to markdown, textile and restructered text. Now I wonder which one to choose for a) blog entries b) c

Re: sorting by another table

2008-02-06 Thread Rajesh Dhawan
On Feb 6, 3:50 pm, <[EMAIL PROTECTED]> wrote: > I have a Sale model that foreign keys into an APN model, which foreign keys > into a Zip model. I'd like to sort my Sale objects by the 'zip' field on the > Zip model, but > > Sale.objects.select_related().order_by('sales_zip.zip') > > does

Re: Which markup language to choose?

2008-02-06 Thread Rajesh Dhawan
On Feb 6, 4:55 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > I'm writing my own blogging application for Django (yes, I want to > reinvent the wheel, for learning and fun) ;-) > According to documentation django.contrib.markup provides an interface > to markdown, textile and restructer

Re: ImportError: No module named base

2008-02-06 Thread [EMAIL PROTECTED]
Hello! On 15 Jan., 15:38, Chris Pratt <[EMAIL PROTECTED]> wrote: > I'm getting the following error message when running "python manage.py > runserver" It's the same here - Mac OS 10.5.1 (Leopard), Python 2.5.1 from Macports. Did you find a solution or workaround to fix it? Thanks in advance,

Re: Which markup language to choose?

2008-02-06 Thread Petite Abeille
On Feb 6, 2008, at 10:55 PM, Florian Lindner wrote: > I'm writing my own blogging application for Django (yes, I want to > reinvent the wheel, for learning and fun) ;-) More power to you! :P > According to documentation django.contrib.markup provides an interface > to markdown, textile and res

Re: User permissions

2008-02-06 Thread Jacob Kaplan-Moss
On 2/6/08, James Bennett <[EMAIL PROTECTED]> wrote: > Some amount of time between "now" and "the heat death of the > universe". There is no estimate, no timeline, no schedule, no ETA, no > guess, nor any other synonym of any of those words. ... though given the choices, I'd be inclined to wager t

Strange issue with too many Foriegn Keys

2008-02-06 Thread Michael Newman
I am trying this new way of inheriting a lot of information for a project I am working on. This site I need to extend the user profile, then certain people can have their own sites and then those sites can have 10 photographs to add to a slide show. so I have: exampleapp.py -- models.py class P

Re: User permissions

2008-02-06 Thread James Bennett
On Feb 6, 2008 4:38 PM, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > ... though given the choices, I'd be inclined to wager that it's > closer to "now" than to "the heat death of the universe"... Probably, but I always include that in the time scale just in case. You know how tricky it is to es

Re: Code upgrade

2008-02-06 Thread James Bennett
On Feb 6, 2008 3:30 PM, Chris <[EMAIL PROTECTED]> wrote: > Does magic removal help to upgrade code from 91 to present or is it a > set of code used to assist with writing a potential application that > could do this? "Magic-removal" is not a script or a piece of code. It was the name given to the

Re: Which markup language to choose?

2008-02-06 Thread Nathaniel Whiteinge
On Feb 6, 2:55 pm, Florian Lindner <[EMAIL PROTECTED]> wrote: > For a) it's important for me to have the possibility to embed raw > HTML. AFAIK markdown provides hat possiblity, is it also possible with > textile and reST? For a) you'll never be left wanting with RestructuredText. It is *by far*

Re: django version for production?

2008-02-06 Thread Pigletto
On 6 Lut, 04:50, "Christian W. Koch" <[EMAIL PROTECTED]> wrote: > i'm no django expert, yet, but i use trunk. now, for production > purposes i still use trunk because before i "svn up" on production i > make sure that the site runs on my development box on the latest > trunk. > > you do have a de

Re: [newbie]Apache Deployment Problem

2008-02-06 Thread Kenneth Gonsalves
On 06-Feb-08, at 7:41 PM, Tony Winslow wrote: > I installed mod_python and do the configurations as the tutorial on > the > official site. But mod_python still can not find the mysite.settings > module. What might be the problem? paste the relevant part of your apache config -- regards kg

Performance problem. Server overloading with a lot of apache processes

2008-02-06 Thread Eren Türkay
Hello all, I have a project that has a lot of models and database relationship is little complex. I run my code with apache2 and mod_python. My problem is that there is a lot of apache processes and these eat too much memory. Yesterday, 10 minutes after I announced the site's new design, the s

Re: sorting by another table

2008-02-06 Thread Andriy Khavryuchenko
[EMAIL PROTECTED] написав(ла): > I have a Sale model that foreign keys into an APN model, which > foreign keys into a Zip model. I'd like to sort my Sale objects by > the 'zip' field on the Zip model, but > > Sale.objects.select_related().order_by('sales_zip.zip') > > doesn't work (1054, "Unknow

Re: Improperly configured exception

2008-02-06 Thread Schmoopie
Update on this: the problem was in sys.path: this must contain the directory where the models.py file is located. So, progress. BUT, now I get the error 'Import Error, could not import settings', and for some reason it claims it can't find the mysite.settings module. Again, I am stumped -- why wo

Re: Improperly configured exception

2008-02-06 Thread Schmoopie
Update on this: the problem was in sys.path: this must contain the directory where the models.py file is located. So, progress. BUT, now I get the error 'Import Error, could not import settings', and for some reason it claims it can't find the mysite.settings module. Again, I am stumped -- why wo

Re: Unicode error

2008-02-06 Thread Corey Oordt
Kristian, I had a similar problem when I needed to send some ASCII emails. I have a snippet at does a translation of unicode characters to close ASCII approximations if it is helpful: http://www.djangosnippets.org/snippets/588/ Corey On Feb 5, 2008, at 3:48 PM, Kristian Øllegaard wrote:

Re: Performance problem. Server overloading with a lot of apache processes

2008-02-06 Thread Michael Newman
Reality is 19 apache processes isn't that much. That means there are only about 19 requests on your server at one time. So what that means is that either your server is whoafully unprepared for the real world, or what is being done with your processes is really heavy, like file uploading or proces

godaddy django support

2008-02-06 Thread sserrano
Hi everybody I have write this to the godaddy support team: > Customer Inquiry > Hi > I have been a godaddy customer for a long time and the hosting has been > very useful. But i have been improving my webdevelopment skills and now I'm > willing to migrate from php to a python webframework calle

Re: Strange issue with too many Foriegn Keys

2008-02-06 Thread Aaron Fay
Hey Michael, I ran across this article a couple days ago that seems to have a workaround to your problem: http://scottbarnham.com/blog/2007/08/22/edit-inline-with-imagefield-or-filefield-in-django-admin/ Hope that helps, Aaron Michael Newman wrote: > I am trying this new way of inheriting a l

New Django Site - tsacomplaints.com

2008-02-06 Thread slartiblartfast
hey guys - im about to formally launch a new site done with django called TSA Complaints (http://www.tsacomplaints.com) the site is a response to the hundreds of comments taking the TSA to task for their well-deserved reputation of being ineffective, lax, and generally obnoxious. i hope for it to

Re: Which markup language to choose?

2008-02-06 Thread Eric Abrahamsen
> For a) it's important for me to have the possibility to embed raw   > HTML. AFAIK markdown provides hat possiblity, is it also possible with   > textile and reST? I'm definitely a fan of markdown (I do most of my writing in it), and it's more than sufficient for any online needs. I tend to impo

Re: Strange issue with too many Foriegn Keys

2008-02-06 Thread Michael Newman
THANK YOU so much. That was exactly what I was looking for. A bit of a hack fix. Maybe I can look into writing a patch for it since I am going to need to work on a fix that I feel comfortable with anyways. I started looking at new forms the last couple of hours thinking that would be a fix. It lo

Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
I am looping through a list of people, and want to output their hyperlinked names separated by commas and then the word "and". It should look like this: Bob, Fred, Deidre and Kelly What is the best way of implementing this in a django template? Right now I'm using a {% for %} loop, where each it

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread Kenneth Gonsalves
On 07-Feb-08, at 10:45 AM, toomim wrote: > What is the best way of implementing this in a django template? Right > now I'm using a {% for %} loop, where each iteration prints a "," or > "and" or nothing depending on the iteration of the loop, using a bunch > of {% if %} statements to branch on t

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread Swaroop C H
On Feb 7, 2008 10:45 AM, toomim <[EMAIL PROTECTED]> wrote: > > I am looping through a list of people, and want to output their > hyperlinked names separated by commas and then the word "and". If I've understood your question correctly, you can use 'forloop.last' to determine if you're in the las

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 9:29 pm, "Swaroop C H" <[EMAIL PROTECTED]> wrote: > If I've understood your question correctly, you can use 'forloop.last' > to determine if you're in the last iteration... > seehttp://www.djangobook.com/en/1.0/chapter04/for details. Yes, that's what I use for the last iteration. Then

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 9:25 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 07-Feb-08, at 10:45 AM, toomim wrote: > > compute and add these in your view - you need an extra field, say,   > 'sep' which would be ',', '' or 'and' and in your template: > whatever {{sep}} I don't understand, how do I get {{s

Re: Best way to template "," and "and" separated lists?

2008-02-06 Thread toomim
On Feb 6, 11:05 pm, toomim <[EMAIL PROTECTED]> wrote: > I don't understand, how do I get {{sep}} to change from ',' to 'and' > and then to the empty string in the last 2 iterations of the loop, > without using a bunch of if statements? (And since we're using > variables, a {% where %} clause?) He