Re: Don't see form errors in template

2008-07-15 Thread Brian Luft
> First of all, I want to say that I do not understand the relationship > between forms and models in Django. A form to ask and a model to > store? How to pass the form data to a model? Have I to pass it in > order to validate? There is not necessarily a relationship between the two. You are

Re: Help with templatetags

2008-07-04 Thread Brian Luft
Have you tried restarting the development server? I've noticed that Django seems to cache template tag definitions when it starts up and won't pick up changes. They may have addressed this but I've gotten in the habit of just restarting the development server whenever I'm mucking around with

Re: Trouble activating the admin interface

2008-07-02 Thread Brian Luft
Do you have 'django.contrib.auth' and 'django.contrib.contenttypes' in your INSTALLED_APPS setting? On Jul 2, 10:20 am, Fernando Rodríguez <[EMAIL PROTECTED]> wrote: > Hi, > > I'm learning django with "the definitve guide to django". On chapter 6, > I tried to activate the admin interface fro

Re: Using SQLite in production

2008-07-02 Thread Brian Luft
I don't have any firsthand experience to share with running sqlite in a production setting. I did choose to spend about 30 seconds scanning the sqlite FAQ: http://www.sqlite.org/faq.html#q5 http://www.sqlite.org/faq.html#q6 If what sqlite is saying on their FAQ is true, it sounds you can get

Re: CharField as text?

2008-07-01 Thread Brian Luft
What is your purpose in defining a form field if it won't be used for user input? On Jul 1, 12:46 pm, Stuart Grimshaw <[EMAIL PROTECTED]> wrote: > Is it possible (with newforms) to either display a CharField as just > text, or have it's value used as the label on another field? I'm >

Re: Development File Structure

2008-07-01 Thread Brian Luft
You need to either copy the python executable to a directory on the Windows system path (C:\windows\system32 for example), or add the path to the Python installation (often C:\Python25 or similar) to the PATH environment variable. On Jul 1, 11:25 am, bruno desthuilliers <[EMAIL PROTECTED]>

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
el manager for your events model. That might be the best option for retrieving the joined set of events with current occurrences in one fell swoop in a nice abstracted manner. -Brian On Jul 1, 10:12 am, Brian Luft <[EMAIL PROTECTED]> wrote: > Ok, you are asking for a list of events t

Re: Need help filtering a queryset

2008-07-01 Thread Brian Luft
Ok, you are asking for a list of events that have occurences on or after today's date. Then with each event instance you are asking for ALL occurence instances (event.occurrence_set.all). ALL means EVERY occurence associated with that event object. You haven't done anything to filter out

Re: memcache not used?

2008-07-01 Thread Brian Luft
In your settings file you have indicated that memcached is running on port 112211 but your process listing shows it running on 11211. -Brian On Jul 1, 9:34 am, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > Hi! > > For some reason, django doesn't seem to add anything to my memcache - the >

Re: Development File Structure

2008-07-01 Thread Brian Luft
Any 3rd-party Python package or module that you intend to use needs to be on the Python path. The Django documentation actually provides some instructions on how to accomplish this: http://www.djangoproject.com/documentation/install/#install-the-django-code -Brian On Jul 1, 8:53 am, [EMAIL

Re: Full list of Django features?

2008-06-26 Thread Brian Luft
A lot of that depends on what you would consider a feature vs. what you think a modern web framework should provide by default. Aside from the points listed on the home page, I would suggest going to the documentation page and look down the list of reference topics. Those are all "features" in a

Re: views.py: Always a simple return?

2008-06-25 Thread Brian Luft
Have you thought about using comet? Here is a link to an example implementation using orbited: http://www.rkblog.rk.edu.pl/w/p/django-and-comet/ -Brian On Jun 25, 1:56 pm, "Richard Dahl" <[EMAIL PROTECTED]> wrote: > Generally with HTTP, you would configure your server to continue to respond >

Re: Django inserts an empty string into IntegerField?

2008-06-25 Thread Brian Luft
In response to your side question: http://www.djangoproject.com/documentation/model-api/#null -Brian On Jun 25, 2:12 pm, Huuuze <[EMAIL PROTECTED]> wrote: > Between you and Karen, I've resolved the problem.  I had a bug here: > > >> zip = forms.CharField(max_length=5,

Re: python-admin.py startproject error

2008-06-25 Thread Brian Luft
django-admin.py is a python script that should be run from the command line (not the Python interpreter) -Brian On Jun 25, 12:50 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I'm going through the tutorial and after importing django and running > the django-admin.py startproject command

Re: Common data in templates

2008-06-25 Thread Brian Luft
Try these links: http://www.djangoproject.com/documentation/templates_python/#subclassing-context-requestcontext http://www.djangoproject.com/documentation/templates_python/#writing-your-own-context-processors -Brian On Jun 25, 11:51 am, Juanjo Conti <[EMAIL PROTECTED]> wrote: > I have this

Re: Convert string to html

2008-06-25 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#automatic-html-escaping On Jun 25, 10:36 am, TigerHawk <[EMAIL PROTECTED]> wrote: > Hello, > This is my first post and I'm fairly new to Django/Python. I am having > a little trouble getting a string converted to html. > > Here is my view

Re: Do you code django with Komodo?

2008-06-25 Thread Brian Luft
I am the project owner - and yes nothing has been accomplished other than jotting down a few lofty ideas. I am just transitioning out of some extended traveling, settling in a new city, and starting on some new contracts. Making some progress on the django komodo utils is a high priority for me

Re: Best practice for databases and distributed development with Django

2008-04-02 Thread Brian Luft
Simon's method is a good way to go. In general its a good idea to use some sort of scheme for managing all of the changes that occur to the base schema in revision control. This way you can pull down a tagged copy of your source tree, run the CREATE DATABASE script, and run the alter script(s)

Re: location of CSS

2008-03-05 Thread Brian Luft
5, 4:53 pm, Phillip Watts <[EMAIL PROTECTED]> wrote: > On Wednesday 05 March 2008 13:37:58 Brian Luft wrote: > > > Serving static media really has nothing to do with Django. > > Funny that css and js are considered "static media".  In the spirit > of templating they

Re: location of CSS

2008-03-05 Thread Brian Luft
Serving static media really has nothing to do with Django. Presumably your browser is reading the CSS file and making a request back to your web server for the file. You haven't told us anything about your web server configuration. What path is being requested to the server for the image file?

Re: HttpResponseRedirect not redirecting

2008-03-03 Thread Brian Luft
Take a look at your url patterns. Your first one is: (r'^addorder/', add_order), so 'addorder/results' is going to match to your first url pattern (so would 'addorder/mydogspot' for that matter). The view to be executed will be add_order. Cheers -Brian On Mar 3, 2:27 pm, bobhaugen <[EMAIL

Re: Problem with contrib.syndication

2008-03-02 Thread Brian Luft
In your urlpatterns, you are passing a string for the value of feed_dict ("feeds"). You need to pass the actual dictionary object that you setup for yourself: ...{ 'feed_dict' : feeds } Cheers -Brian On Mar 2, 10:39 am, Florian Lindner <[EMAIL PROTECTED]> wrote: > Hello, > I try to create an

Re: Django minify and combine script?

2008-02-23 Thread Brian Luft
http://code.google.com/p/django-assetpackager/ http://www.djangosnippets.org/snippets/405/ http://www.djangosnippets.org/snippets/524/ Cheers -Brian On Feb 23, 7:02 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Sat, Feb 23, 2008 at 8:26 AM, Thierry <[EMAIL PROTECTED]> wrote: > > I've

Re: Converting relational data to hiechical data

2008-02-21 Thread Brian Luft
http://www.djangoproject.com/documentation/templates/#unordered-list On Feb 21, 4:22 am, shabda <[EMAIL PROTECTED]> wrote: > I have a model like > > class Task(models.Model): > name = Models.CharField(max_length = 100) > parent = models.ForeignKey('Task', null = True) > > Using this model

Re: problem with django tagging application

2008-02-20 Thread Brian Luft
Any chance you were using django-tagging previously and recently updated to trunk? There are backwards incompatible changes - the relation names have changed: http://code.google.com/p/django-tagging/wiki/BackwardsIncompatibleChanges -Brian On Feb 20, 4:25 pm, cesco <[EMAIL PROTECTED]> wrote: >

Re: Deploying Django - can't get past the welcome screen

2008-02-17 Thread Brian Luft
Your code is apparently in a project called "thumbslap": >If you plan to use a database, edit the DATABASE_* settings in >thumbslap/settings.py. >Start your first app by running python thumbslap/manage.py startapp >[appname]. But your settings file is ROOT_URL_CONF set to "mysite.urls". Is

Re: Syndication is generating bad url

2008-02-07 Thread Brian Luft
I ran into the same problem. I also wanted to add for any other users out there that Django caches the value of the current site so if you make a change you'll need to restart your server/python instance. On Jan 7, 10:33 am, RevMatt <[EMAIL PROTECTED]> wrote: > Figured it out myself. In my

Re: templatetags and import path

2008-02-05 Thread Brian Luft
b 4, 6:13 pm, Julien <[EMAIL PROTECTED]> wrote: > Hi Brian, > > I'm facing a similar issue, which is being discussed > here:http://groups.google.com/group/django-users/browse_thread/thread/0ce2... > > I am as surprised as you are by this behaviour... > > On Feb

templatetags and import path

2008-02-04 Thread Brian Luft
Hello, I'm setting up James Bennett's Coltrane app (yes I'm aware that it is released as is, with no guarantees). I wrote a templatetag that intends to pull all the Links instances and make them available to the render context. However, in the tag file, something funny seems to happen with the

Djangonauts in Amsterdam, Prague, or Krakow?

2007-10-19 Thread Brian Luft
My wife and I are travelling through Eastern Europe for the next 2 months. (we're starting in Amsterdam though). I'd love to meet up with any Djangonauts for a little chat. I like beer, wine, Django, and open source software if anyone can spare a few minutes for a chat :) Cheers -Brian

Re: Questions on learning curve

2007-06-19 Thread Brian Luft
In my opinion, claims of learning curve time are somewhere between mildly and wildly exaggerated. In my opinion the actual learning curve will depend on a number of factors including but not limited to: * Knowledge of Python * Familiarity with web application development * General software

Re: Noob here. Accessing data across relationships

2007-06-14 Thread Brian Luft
I recommend writing a custom template tag. (http:// www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags). So you would have for example: { list_member_events object } Then in your template tag code you would be able to handle the logic that is a little too

Re: GenericRelation support in GeoDjango

2007-06-07 Thread Brian Luft
Russ and Justin Thank you for your replies. I had not tried the older syntax but I'm glad to see it works. I am generalizing an app I created that lets one add location information to one's models and provides basic facilities for regional and/or distance based searching. Generic relations is

GenericRelation support in GeoDjango

2007-06-06 Thread Brian Luft
I am wondering if it is known what needs to be done to bring the contrib.contenttypes functionality up to date in the gis branch. Specifically I'm looking for the generic relation support. I tried the naive approach of copying over the directory from the Django trunk but it errors out when

Re: django vps hosting

2007-05-15 Thread Brian Luft
I've been using WebFaction and have been happy with it so far. The plan I'm using is actually a shared hosting plan. While you do share an OS instance with others, you still get shell access. They have a slick control panel that makes it easy to drop in various frameworks and applications (eg.

Re: No POST data

2007-05-03 Thread Brian Luft
>From http://www.w3.org/TR/html4/interact/forms.html#h-17.12: "In this example, the INPUT element is disabled. Therefore, it cannot receive user input nor will its value be submitted with the form." Try removing the disabled attribute from the input. If you still need to submit the value from

Re: connecting to multiple databases

2007-05-02 Thread Brian Luft
orks out. > > > If anyone who is capable puts time into getting the multi-db branch up > > to par and added into trunk, I know many people would be very > > thankful. > > > Thanks, Sean > > > On May 2, 12:22 am, Brian Luft <[EMAIL PROTECTED]> wrote: > >

Re: connecting to multiple databases

2007-05-01 Thread Brian Luft
EMAIL PROTECTED]> wrote: > On 5/2/07, Brian Luft <[EMAIL PROTECTED]> wrote: > > > Although I've successfully used the multi-db branch experimentally, it > > looks to be getting more and more out of date with the django trunk. > ... > > Just for the sake of lively

Re: Setting up psycopg2

2007-04-28 Thread Brian Luft
s saying that > "make sure that postgresql has been compiled with tread-safety"? > > sincerely > /Henrik > > On 28 Apr, 00:39, Brian Luft <[EMAIL PROTECTED]> wrote: > > > Well I'm checking against Debian here at work and can check my Ubuntu > > in

Re: Setting up psycopg2

2007-04-27 Thread Brian Luft
Well I'm checking against Debian here at work and can check my Ubuntu installation at home later, but running pg_config shows that postgres was built with the "enable-thread-safety" option - (not sure if that is a different option or if the psycopg docs are incorrect). I would assume the same

Re: __str__ referencing variables in other classes

2007-04-20 Thread Brian Luft
Yes, due to the many-to-many, the "member" property is going to represented as a set of objects. Your __str__ definition as you have it doesn't really make sense since it is in fact a set of objects. Try something like: def __str__(self): return '%s: ' % self.title + ','.join( [ '%s %s' %

Re: Psychopg 2 Install

2007-04-18 Thread Brian Luft
>I'm asking what do I place into the pg_config and library_dirs in order for >the installation to work on the client web server? Or what do I in general to >make it work? I don't know what you mean by "place into". Make sure you read the INSTALL and README files carefully that came with your

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: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
If I remember correctly, my problem was that the JSON serializer was bombing out when encountering float fields. I didn't report it directly because I thought I had remembered seeing others report similar problems. It was probably a late night and I got around it by opting for XML formatting.

Re: Testing Framework and Fixtures

2007-04-11 Thread Brian Luft
I've run into problems as well with the fixture functionality. The short of it is that this is a new feature to the framework and likely the kinks will be worked out in the coming weeks. In the meantime you might check out one of these as a workable temporary solution: