Re: Psychopg 2 Install

2007-04-17 Thread [EMAIL PROTECTED]
I think I've solved it! Realised you need to install libpq-fe.h before you can install psycopg. Which under Debian is simply installed with: apt-get install libpq-dev Thanks mark "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > > I'm just trying to install Psycopg2 on the client

Re: Psychopg 2 Install

2007-04-17 Thread [EMAIL PROTECTED]
I'm just trying to install Psycopg2 on the client (webserver) which is connected via ethernet to the Database server. But to do so I thought I had to update the pg_config and library_dirs in the psychpg2 file: setup.cfg, otherwise I get the following if I do nothing to it: running buildcd

Re: Psychopg 2 Install

2007-04-17 Thread Malcolm Tredinnick
On Wed, 2007-04-18 at 13:49 +1000, Mark Jarecki wrote: > To further illustrate my question. > > When installing Psychopg2, if the Database server was on the same > machine as the Web server, I would normally update the setup.cfg > prior to running "python setup.py build", with the following:

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
To further illustrate my question. When installing Psychopg2, if the Database server was on the same machine as the Web server, I would normally update the setup.cfg prior to running "python setup.py build", with the following: pg_config=/usr/local/pgsql/bin/pg_config

Re: Django app initialisation

2007-04-17 Thread Malcolm Tredinnick
On Tue, 2007-04-17 at 08:48 -0700, Andrew Durdin wrote: > On Apr 4, 12:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > > I cannot think of any reliable way to solve this. It's a reasonably hard > > problem to solve correctly, apparently. I say this because we currently > > are *not*

Re: django comparison

2007-04-17 Thread M Harris
On Tuesday 17 April 2007 21:12, Jay Parlar wrote: > The Django server can only handle one request at a time, so "load" > would be defined as two people trying to access the site :) Very good. Thanks guys. -- Kind regards, M Harris <><

Re: Encoding in models.py (and maybe other files too)

2007-04-17 Thread Malcolm Tredinnick
On Tue, 2007-04-17 at 16:11 +, [EMAIL PROTECTED] wrote: > Hi, > > As I use characters with accents, I got the following issue yesterday > when validating my models : > > mvmo.cv: Non-ASCII character '\xc3' in file /home/django/mvmo/../mvmo/ > cv/models. > py on line 111, but no encoding

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
Hi Brian I've actually got django up a running nicely on a single web/database server under mod_python and Postgres and have been working with that for about 6 months. All is fine on that front and now I want to test the apps scalabilty amongst other things and therefore want to set-up

Re: Need dedicated hosting for Django

2007-04-17 Thread Brian Luft
I just grabbed a WebFaction account based on previous recommendations and though its only been a few days I've been well pleased with what they offer. The control panel is very slick and they make it ridiculously easy to set up an environment with your web framework of choice (Django of course

Re: Psychopg 2 Install

2007-04-17 Thread Brian Luft
Hi Mark, In direct answer to your question, psycopg provides a database driver for Postgres and is meant to be used by clients of the database - in your case this would be the web server. As far as your question about configuring everything, that leads me to believe that you are fairly new to

Re: Navigating the Documentation

2007-04-17 Thread Jay Parlar
On 4/17/07, Nate Finch <[EMAIL PROTECTED]> wrote: > > Hi, thanks for the very reasoned, and thorough response to a somewhat > bitchy post. My apologies, I was tired and frustrated, so the email > came off a bit more edgy than I really intended. > > Those links do help a lot. I'll try to gather

Re: Passing Django Model objects between machines

2007-04-17 Thread Jay Parlar
On 4/17/07, johnny <[EMAIL PROTECTED]> wrote: > > Anyone know, how I can pass Model object from one machine that runs > Django, to another machine that doesn't have Django, but uses > python? This is a dangerous idea. What happens after you pass the Model object to some machine X, and machine X

Re: django comparison

2007-04-17 Thread Jay Parlar
On 4/17/07, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > Run under Apache. The Django server would be slower and would be more > likely to fail once you got any kind of load on the server. The Django server can only handle one request at a time, so "load" would be defined as two people trying to

Re: django comparison

2007-04-17 Thread Todd O'Bryan
On Tue, 2007-04-17 at 21:03 -0500, M Harris wrote: > On Monday 16 April 2007 11:09, James Bennett wrote: > > A CMS like Joomla is a house, pre-built. A framework like Django is a > > toolbox and some raw materials. > Thank you for your responses folks. This is helpful. Are there >

Re: Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
Realised that Psycopg sits on the database server and you refer to it through the settings.py file. Should get more sleep On 18/04/2007, at 11:23 AM, Mark Jarecki wrote: Hi I'm trying to set-up a django system comprising a separate web server, static server and database server. Where does

Re: django comparison

2007-04-17 Thread M Harris
On Monday 16 April 2007 11:09, James Bennett wrote: > A CMS like Joomla is a house, pre-built. A framework like Django is a > toolbox and some raw materials. Thank you for your responses folks. This is helpful. Are there packages of Django templates available... as in your analogy...

Re: Passing Django Model objects between machines

2007-04-17 Thread johnny
Following dose it. pickle.dumps(someObject) pickle.loads(someObject) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To

Psychopg 2 Install

2007-04-17 Thread Mark Jarecki
Hi I'm trying to set-up a django system comprising a separate web server, static server and database server. Where does Psychopg live: on the web or database server? And how would I go about configuring the two? Cheers Mark --~--~-~--~~~---~--~~ You

Re: Navigating the Documentation

2007-04-17 Thread Nate Finch
Hi, thanks for the very reasoned, and thorough response to a somewhat bitchy post. My apologies, I was tired and frustrated, so the email came off a bit more edgy than I really intended. Those links do help a lot. I'll try to gather my thoughts into a more constructive suggestion. I guess the

Re: Passing Django Model objects between machines

2007-04-17 Thread johnny
To do pickling, do you always have to create a file and send it over the network to the other machine? Rather than creating a pickled file, can you create string? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Need dedicated hosting for Django

2007-04-17 Thread Kenneth Gonsalves
On 17-Apr-07, at 11:20 PM, Nik Kantar wrote: > I'm mainly interested in companies you've personally had experience > with, though any advice is appreciated. hetzner.de - note i am not employed by them nor do i get a commission from them, but they are reliable - only problem is that some

Re: self referential many to many relationships

2007-04-17 Thread C
Thanks for your help, Russ. Your example does exactly what I want I think. C On Apr 17, 8:10 pm, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On 4/18/07, C <[EMAIL PROTECTED]> wrote: > > > > > Hi, > > > I am building a simple parts database as a fun "learn django" project. > > A "part"

Re: self referential many to many relationships

2007-04-17 Thread Russell Keith-Magee
On 4/18/07, C <[EMAIL PROTECTED]> wrote: > > Hi, > > I am building a simple parts database as a fun "learn django" project. > A "part" in my test application has a part number, description, etc > and can optionally be composed of other parts. This sounded to me > like a good candidate for a self

Re: json and django - couple of questions.

2007-04-17 Thread Russell Keith-Magee
On 4/18/07, Merric Mercer <[EMAIL PROTECTED]> wrote: > > Via 'qs I can access the attribute and its value. However, 'data' does > not provide this extra attributes and value. Can anybody explain this - > is there a way I can do this? Not using the serialization framework. The serializer

self referential many to many relationships

2007-04-17 Thread C
Hi, I am building a simple parts database as a fun "learn django" project. A "part" in my test application has a part number, description, etc and can optionally be composed of other parts. This sounded to me like a good candidate for a self referring many to many relationship. I got it coded

RelativeTime newforms field

2007-04-17 Thread Benjamin Slavin
Howdy all, I'm just wondering if anyone has created a "RelativeTime" field for newforms... What I mean is something that will allow a user to pick values such as 'Now', 'In an hour', 'At noon', 'On Monday', 'Tomorrow morning', etc that will provide a "cleaned" value that's a datetime object.

Static content in admin?

2007-04-17 Thread RG
Is there any way to manage static blocks of content from the admin panel? I am converting my companies website into django and many "non- programmers" will be maintaining the content. There are blocks on the home page that will get updated only ever so often, as well as footers, contact pages..

Re: Passing Django Model objects between machines

2007-04-17 Thread anders conbere
On 4/17/07, johnny <[EMAIL PROTECTED]> wrote: > > Anyone know, how I can pass Model object from one machine that runs > Django, to another machine that doesn't have Django, but uses > python? > > Thank you. pickle the object or serialize it to a similarly readable format.

Re: Need dedicated hosting for Django

2007-04-17 Thread Michael Trier
> I like RimuHosting, and would happily recommend it to anyone. > +1 RimuHosting is awesome and you can get managed server plans. Michael --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Passing Django Model objects between machines

2007-04-17 Thread johnny
Anyone know, how I can pass Model object from one machine that runs Django, to another machine that doesn't have Django, but uses python? Thank you. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: How does Django handle Model Inheritance?

2007-04-17 Thread James Bennett
On 4/17/07, Raphael Melo de Oliveira Bastos Sales <[EMAIL PROTECTED]> wrote: > I'm a newcomer to this list, so be patient if this is a dumb > question. I'd like to know how does DJango handle Model Inheritance. Model inheritance is not currently supported in Django. It will be at some

How does Django handle Model Inheritance?

2007-04-17 Thread Raphael Melo de Oliveira Bastos Sales
Hi everyone, I'm a newcomer to this list, so be patient if this is a dumb question. I'd like to know how does DJango handle Model Inheritance. For example, if I do something like this and use PostgreSQL: class BaseModel( models.Model ): base_attribute = models.CharField() class

Re: Need dedicated hosting for Django

2007-04-17 Thread David Zhou
On Apr 17, 2007, at 3:20 PM, Adam Fast wrote: > I'll second SliceHost if 100% dedicated isn't a requirement for you. > > On 4/17/07, Nicola Larosa <[EMAIL PROTECTED] > wrote: > Nik Kantar wrote: > > My company might be in need of a dedicated server, preferably > managed, > > to use as a

Re: Need dedicated hosting for Django

2007-04-17 Thread Adam Fast
I'll second SliceHost if 100% dedicated isn't a requirement for you. On 4/17/07, Nicola Larosa <[EMAIL PROTECTED]> wrote: > > > Nik Kantar wrote: > > My company might be in need of a dedicated server, preferably managed, > > to use as a production server for Django (and non-Django) websites. > >

intimate date

2007-04-17 Thread dev
Search Profiles - FREE! Intimate Dating. Start Chatting within seconds - http://offr.biz/HLMAT286251KJGHEDC --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: json and django - couple of questions.

2007-04-17 Thread Merric Mercer
The above should read data=serializers.serialize('json',qs) If I do qs[0].firstname I get the value of firstname, but this doesn't seem to be bundled in 'data' MerMer Merric Mercer wrote: > First Question:- > > In my view if I do:- > > qs=Model.objects.all() > for i in qs: >

Re: Need dedicated hosting for Django

2007-04-17 Thread Ian Lawrence
Hi, I use webfaction: www.webfaction.com and their level of service and technical ability is the best I have found. Their web panel makes hosting for 'web developers' very simple. Highly recommended. []'s Ian On 4/17/07, Nik Kantar <[EMAIL PROTECTED]> wrote: > > Hey guys, > > My company might be

Re: Need dedicated hosting for Django

2007-04-17 Thread Nicola Larosa
Nik Kantar wrote: > My company might be in need of a dedicated server, preferably managed, > to use as a production server for Django (and non-Django) websites. > > I'm mainly interested in companies you've personally had experience > with, though any advice is appreciated. If a non-managed,

json and django - couple of questions.

2007-04-17 Thread Merric Mercer
First Question:- In my view if I do:- qs=Model.objects.all() for i in qs: setattr( i, "firstname", firstname ) # add a new attribute ("firstname") with correponding value import django.core serializers data=serializers.serialize('json',data)

Need dedicated hosting for Django

2007-04-17 Thread Nik Kantar
Hey guys, My company might be in need of a dedicated server, preferably managed, to use as a production server for Django (and non-Django) websites. I'm mainly interested in companies you've personally had experience with, though any advice is appreciated. Thanks. -- Nik Kantar Web

Q on when Site.objects.get_current() can fail

2007-04-17 Thread Rob J Goedman
Hi, In Django version 0.97-pre, rev 5020, I'm adding additional views for end users, all decorated with @login_required. I noticed if I'm not already logged in (by 1st visiting .../admin/), I get below error (reproduced in a python terminal, same problem as in a browser - [17/Apr/2007

Re: Giving easy access to designers

2007-04-17 Thread [EMAIL PROTECTED]
I decided to go with a quick and dirty solution: I wrote a small Python script that lists all the directories (i.e.: projects) in the designers' working directories and they can select which server to start. This should work well enough. Thanks for the suggestions. In case someone needs it,

Re: Datetime is null... why isn't this working?

2007-04-17 Thread [EMAIL PROTECTED]
Ah... makes perfect sense now. Thanks! On Apr 17, 11:34 am, oggie rob <[EMAIL PROTECTED]> wrote: > > page_data['topic_modification_date'] = datetime.datetime.date() > > page_data['topic_modification_date_time'] = datetime.datetime.time() > > What James is saying is suggesting is that

Re: etag and 404.

2007-04-17 Thread eliott
reply to myself... I just discovered the bug on the tracker for this... http://code.djangoproject.com/ticket/3206 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: etag and 404.

2007-04-17 Thread eliott
After some research, it does appear to be non RFC compliant behavior. I get this behavior when running django via the "python manage.py runserver" command. The client, in this case firefox, upon recieving an etag on a 404 response, will subsequently send an If-None-Match header for the next

ordering and GenericForeignKey

2007-04-17 Thread xav4django
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi I use the ordering in admin interface. My sample class with GenericForeignKey class MyClass(models.Model): content_type = models.ForeignKey(ContentType) object_id = models.PositiveIntegerField() content_object =

Re: Giving easy access to designers

2007-04-17 Thread Bryan L. Fordham
>> 3. Set up an Apache server for development (as indicated in the >> mod_python documentation). This has the disadvantages that I would >> need to manually set up a VirtualHost in apache2.conf for each project >> everytime one is added and also that they would need to maintain a >> hosts file

Re: Datetime is null... why isn't this working?

2007-04-17 Thread oggie rob
> page_data['topic_modification_date'] = datetime.datetime.date() > page_data['topic_modification_date_time'] = datetime.datetime.time() What James is saying is suggesting is that do_html2python only expects strings or lists of strings, but you were trying to pass in a datetime object. Give it

Re: newforms & UnicodeDecodeError ( 0.97-pre)

2007-04-17 Thread mamcxyz
Ok, then I wait for it... Maybe is best try with the branch of permissions for rows? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Django app initialisation

2007-04-17 Thread Andrew Durdin
On Apr 4, 12:26 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > I cannot think of any reliable way to solve this. It's a reasonably hard > problem to solve correctly, apparently. I say this because we currently > are *not* solving it in django/db/models/loading.py when we try to >

Re: Giving easy access to designers

2007-04-17 Thread Julio Nobrega
If you think manage.py is the best solution but people would be unconfortable with the command line, you could make a few Python scripts to stay on their desktops so they would only need to double click them for something to happen. I don't know what requirements you have exactly and what's

Giving easy access to designers

2007-04-17 Thread [EMAIL PROTECTED]
Hello, Our web team recently decided to switch over to Django for new projects since it's cleaner than PHP and easier to go from a small site to a full-featured site. I have a problem however, I'm not sure how to set up an environment for the web designers. When we used PHP, it was pretty easy

Use edit_inline and fields display option

2007-04-17 Thread Florian Apolloner
I would like to use edit_inline=models.STACKED in my model (some user_prefs which should get displayed on the user-admin page) and would like to be able to use something like fields = ( ( 'options', {'fields':('photo','blogger')}) ) to get them displayed the way I like them to look... (As I can

Re: temp tables

2007-04-17 Thread Phil Davis
On 16/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: [...] > After they are displayed...they can be nuked...but the guy working on > this piece told me he couldn't get the temp table to stick around long > enough with the django connection to be able to get the results back > because I

Re: Datetime is null... why isn't this working?

2007-04-17 Thread [EMAIL PROTECTED]
Sorry for being dense, but I'm still not seeing how I get it in there? If I'm reading you right, I need something like: page_data['topic_modification_date'] = datetime.datetime.date() page_data['topic_modification_date_time'] = datetime.datetime.time() On Apr 17, 9:12 am, "James Bennett"

Re: get_application_name() ?

2007-04-17 Thread James Bennett
On 4/17/07, Mark Engelberg <[EMAIL PROTECTED]> wrote: > In other words, is there something called get_application_name() or > something similar? Every model class, and every instance of every model, has an attribute called '_meta' which stores useful information about the model; given a model

Re: Datetime is null... why isn't this working?

2007-04-17 Thread James Bennett
On 4/17/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > I even tried just returning datetime.datetime.now() from within the > view, and that worked. But when I try to save it to the database, it's > null. This is a tricky one to spot, but I think it has to do with the format the manipulator

Datetime is null... why isn't this working?

2007-04-17 Thread [EMAIL PROTECTED]
Currently in my forum app, the topic last modified date is auto set: topic_modification_date = models.DateTimeField(auto_now = True, blank=True) I want to set that to false and explicitly set it when certain views happen (namely, new topic or new posts). I don't want it to set when other things

How do I get to select multiple options in the admin without resorting to another model? (Django 0.96)

2007-04-17 Thread Ryan Alexander
Here's the code: (it's in models.py) from django.db import models from django.newforms import forms, widgets from datetime import datetime # Create your models here. WEEKDAY_CHOICES = ( (0, 'Monday'), (1, 'Tuesday'), (2, 'Wednesday'), (3, 'Thursday'), (4, 'Friday'), (5,

Encoding in models.py (and maybe other files too)

2007-04-17 Thread [EMAIL PROTECTED]
Hi, As I use characters with accents, I got the following issue yesterday when validating my models : mvmo.cv: Non-ASCII character '\xc3' in file /home/django/mvmo/../mvmo/ cv/models. py on line 111, but no encoding declared; see http://www.python.org/peps/pep-026 3.html for details (models.py,

Re: Enforcing model representation invariants

2007-04-17 Thread Vinay Sajip
On Apr 17, 4:06 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > My "big stick" solution is just to override the save() method of the > > model, and to have it swap the start and end fields. > > A conceptual problem with this approach is that it's doing validation in > the wrong place.

foreign key, edit_inline, multiple times

2007-04-17 Thread brian corrigan
Hi all, If I have a model say CarModel which has a foreign key to CarManufacturer and I want to edit the CarModel in the CarManufacturer admin view I set the edit_inline value. I also set number_in_admin to be a certain number. Is there a way that I can do this without setting the

Re: etag and 404.

2007-04-17 Thread Atilla
On 16/04/07, cactus <[EMAIL PROTECTED]> wrote: > > > I think the behaviour is correct though, why do you want to redefine it ? > > If the behavior is indeed correct, then I don't think I need to > redefine it. > It just seemed odd to return a 'not-modified' response to a query for > a page that

Re: temp tables

2007-04-17 Thread Atilla
On 16/04/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > We are trying to use them to generate a report where a bunch of > calculations are being made... via a custom sql query... then hand all > of the results back to my django view to display. > > After they are displayed...they can be

Re: (Py)Textile bug?

2007-04-17 Thread gnijholt
I'm sorry if the formatting in my post is messed up... (safari & google groups) if the example is not clear, I will try to attach it as plain text. On Apr 17, 10:42 am, gnijholt <[EMAIL PROTECTED]> wrote: > Hello Django-users, > > Could there be a bug in PyTextile that's currently 'shipped' with

(Py)Textile bug?

2007-04-17 Thread gnijholt
Hello Django-users, Could there be a bug in PyTextile that's currently 'shipped' with Django? (textile-2.0.11) If I filter the following through textile: "[EMAIL PROTECTED]":mailto:[EMAIL PROTECTED] I get the following output as a result: mailto:[EMAIL PROTECTED]">john.mailto:[EMAIL

Context not available inside a template filter

2007-04-17 Thread Wolfram Kriesing
I have written a simple template filter, which resolves a little bit of special syntax we allow to use inside a text, for example: this is derived from item#123, and user#John has already contributed to it we will convert "item#123" and "user#John" into links that point to the given items

SURFING FOR MONEY!!! ITS FREE AND EASY!!! TRY IT!

2007-04-17 Thread noidea
I discovered a new web site called AGLOCO! www.agloco.com/r/BBDF7566 I discovered a new web site that is about to publicly launch, and I feel I need to tell everyone about it. AGLOCO promises to pay you to do what you normally do - use your browser to surf the web. And, if you tell your friends