Re: Debugging Django: print statements?

2007-01-22 Thread Bryan Murdock
On 1/21/07, rzimerman <[EMAIL PROTECTED]> wrote: > > What's the best way to do debugging in Django? Usually when I program, > I use "print" statements to identify problems. But Django seems to > surpress all output to stdout. > > I read at djangobook.com that I could put "assert False" statements

admin returning 404 when user is clicked

2006-10-29 Thread Bryan Murdock
I have a blog application, and when I click on a user in the admin, so it tries to go to: http://myblog.example.com/admin/auth/user/1/ I get a 404. I have no idea what's going on. I have another checkout of this project using a different, development database, running with the development serv

Re: Can't get Apache + mod_python + sqlite3 to work

2006-10-28 Thread Bryan Murdock
One thing I noticed when I set up sqlite was that the apache user had to have full permissions on both the database file and the directory where the file was contained. I don't remember the exact errors I got back when I had that problem, but figured I'd throw out my experience. Bryan On 10/26/

Re: a conflict between django and php4

2006-09-18 Thread Bryan Murdock
On 9/18/06, zhongke chen <[EMAIL PROTECTED]> wrote: > > i'm using django with apache2. if i disable php4 module of > apache2(using a2dismod php4), my django application runs well. if i > enable php4 module and log a user in, my django application gives the > following error message: > > Mod_python

Re: Lost in the Admin section...

2006-08-22 Thread Bryan Murdock
On 8/22/06, Sean Schertell <[EMAIL PROTECTED]> wrote: > (4) I don't want to use Users/Groups/Sites at all. What's the best > way to make it completely go away? I think if you remove them from your INSTALLED_APPS setting they will probably go away. I haven't tried it yet, you might need to ./mana

Re: display related objects in admin

2006-08-20 Thread Bryan Murdock
On 8/20/06, SmileyChris <[EMAIL PROTECTED]> wrote: > > >From documentation: > > If the string given is a method of the model, Django will HTML-escape > the output by default. If you'd rather not escape the output of the > method, give the method an allow_tags attribute whose value is True. Sweet!

Re: display related objects in admin

2006-08-20 Thread Bryan Murdock
On 8/20/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/20/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > I'd like the admin display of Committees to display the committee > > members. I tried adding 'members.all()' to the Admin list_display

display related objects in admin

2006-08-20 Thread Bryan Murdock
I have some simple models: class Committee( models.Model ): name = models.CharField( maxlength=200 ) leader = models.ForeignKey( "Person", null=True, related_name="leader_of", blank=True) notes = models.TextField( blank=True ) def __str__( self ):

Re: models that reference each other through foreign key

2006-08-13 Thread Bryan Murdock
On 8/12/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > > On 12-Aug-06, at 3:45 PM, Maciej Bliziñski wrote: > > >> committee = models.ForeignKey( 'Committee' ) > > > > You shouldn't use the string argument (I mean, I never do that). And > > what if one person is in two committees? > > sinc

Re: models that reference each other through foreign key

2006-08-12 Thread Bryan Murdock
On 8/12/06, Maciej Bliziñski <[EMAIL PROTECTED]> wrote: > > On Fri, 2006-08-11 at 22:02 -0700, Bryan Murdock wrote: > > First I must admit that I'm a databse dummy. I'm using fairly recent > > django code from svn. I have a simple desire. I want people who ca

models that reference each other through foreign key

2006-08-11 Thread Bryan Murdock
First I must admit that I'm a databse dummy. I'm using fairly recent django code from svn. I have a simple desire. I want people who can be organized into committees, with each committee having a committee leader, also a person. I wrote up my models like so: class Person( models.Model ):

Re: rss feeds from django handled differently by firefox

2006-06-13 Thread Bryan Murdock
On 6/13/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > On 6/13/06, James Bennett <[EMAIL PROTECTED]> wrote: > > > > On 6/12/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > > I suspect the difference is > > > due to different MIME type of the

Re: rss feeds from django handled differently by firefox

2006-06-13 Thread Bryan Murdock
On 6/13/06, James Bennett <[EMAIL PROTECTED]> wrote: > > On 6/12/06, Eugene Lazutkin <[EMAIL PROTECTED]> wrote: > > I suspect the difference is > > due to different MIME type of these feeds --- I use 'application/xml', > > which I believe is the correct one. > > application/rss+xml for RSS > appli

rss feeds from django handled differently by firefox

2006-06-12 Thread Bryan Murdock
Djangonauts, I'm not too well versed in this whole web application development world yet, so maybe this is a dumb question... When I click on a link to an RSS feed on a Wordpress powered blog, for example, Firefox quickly displays the xml with fancy highlighting and indentation and stuff. When

Re: rss feeds from django handled differently by firefox

2006-06-12 Thread Bryan Murdock
OK, it's the same with Internet Exploder. Here's two links to click on and see if it's the same for you: Displays nicely: http://www.blueskyonmars.com/?feed=rss&cat=19 Doesn't: http://www.djangoproject.com/rss/weblog/ Bryan On 6/12/06, Bryan Murdock <[EMAIL PROTE

django_content_type

2006-06-04 Thread Bryan Murdock
I posted yesterday about my magic-removal update woes. Basically, my django_content_type table seems to be all messed up. Thankfully I copied my original database and am trying out this magic-removal upgrade on the copy, so I can probably delete the currently messed up table and start over. Wha

Re: freecomments not displaying after magic-removal

2006-06-03 Thread Bryan Murdock
On 6/3/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 6/3/06, Derek Hoy <[EMAIL PROTECTED]> wrote: > > Here's an example of what works for me: > > > > {% get_free_comment_list for workgroups.workgroup group.id as > > comment_list reversed %} > > > > workgroups is the appname > > workgroup i

Re: freecomments not displaying after magic-removal

2006-06-03 Thread Bryan Murdock
On 6/3/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > I have a little blog based closely on the djangoproject.com blog. I'm > updating it to magic-removal and everything seems to be going well, > except comments aren't displaying. No template errors or anything, > j

freecomments not displaying after magic-removal

2006-06-03 Thread Bryan Murdock
I have a little blog based closely on the djangoproject.com blog. I'm updating it to magic-removal and everything seems to be going well, except comments aren't displaying. No template errors or anything, just a silent failure to load any comments. How does one begin to debug this kind of thing

Re: Good VPS and/or django hosting?

2006-06-03 Thread Bryan Murdock
On 6/2/06, mamcxyz <[EMAIL PROTECTED]> wrote: > > Ok... > > I chek your suggestion and look good... > > Somebody use a Windows based hosting VPS? > > I'm a little nervous about jump with a full linux stack... Don't fear the penguin! You know you want to leave the darkside :-) There seriously is

Re: Wiki or Blogs done with django

2006-05-31 Thread Bryan Murdock
On 5/30/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 5/29/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > The code for the djangoproject.com blog is open source: > > > > http://code.djangoproject.com/browser/djangoproject.com > > > > L

Re: Wiki or Blogs done with django

2006-05-29 Thread Bryan Murdock
On 5/29/06, Konstantin Shaposhnikov <[EMAIL PROTECTED]> wrote: > Hello, > > Do not count this post as self promotion but you can also check my > personal site :) Here is how it looks like: >http://step-inside.org > And here you can browse sources: >http://step-inside.org/projects/stepinsid

can't edit magic removal wiki page

2006-05-27 Thread Bryan Murdock
I just tried to add this to the magic removal wiki page: And you still might still get errors like this when running `manage.py runserver`: {{{ Validating models... admin.logentry: 'user' has relation with uninstalled model User admin.logentry: 'content_type' has relation with uninstalled model

Re: RSS Feeds - what am I doing wrong?

2006-03-24 Thread Bryan Murdock
I'm looking but I don't see anything you are doing wrong. It's been a while since I implemented my feeds and I vaguely remember maybe getting an error like that at one point. What you have looks a lot like what I have that works though. Sorry, I'm not helping much here, but I guess I didn't wan

Re: Comments module

2006-03-11 Thread Bryan Murdock
On 3/11/06, PythonistL <[EMAIL PROTECTED]> wrote: > > Does anyone use successfully Comments module(django.contrib.comments). > I followed tutorial about blog at > http://www.rossp.org/blog/2006/jan/23/building-blog-django-1/ > but the blog that uses comments module does not work properly for me. >

Re: mod_python installation problems

2006-02-01 Thread Bryan Murdock
On 2/1/06, treelife <[EMAIL PROTECTED]> wrote: > > Thank for this Adrian. This was in fact the case and I now have > mod_python2.3/ apache2 running. > > I imagine that there is some way to resolve this, I had to also > disable Squirrelmail. (it's not critical but I was testing it out to > offer

Re: You want some of that 'adminy' goodness in your own apps?

2006-02-01 Thread Bryan Murdock
That's cool. Did you put this on the wiki? http://code.djangoproject.com/ Bryan On 1/31/06, tonemcd <[EMAIL PROTECTED]> wrote: > > Here's what I've found... > > Start with the very useful tutorial at > http://www.djangoproject.com/documentation/forms/ - in general it's > very helpful, but ther

Re: assign or rename a variable in templates

2006-01-30 Thread Bryan Murdock
On 1/18/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > On 1/18/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > On 1/17/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > > Is it possible to somehow rename or assign one variable to another in > &

Re: admin interface

2006-01-22 Thread Bryan Murdock
On 1/22/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > how i could change in the amin interface the example.com to be my > site.com > > Thanks for all people that are helping me http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-look-and-feel Bryan

Re: blog archive links

2006-01-18 Thread Bryan Murdock
On 1/18/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi all, > > Sorry for the off-topic but can you please tell me how do you get the > code for this applications??? > Via svn, wget??? svn co http://code.djangoproject.com/svn/djangoproject.com/ downloads all of djangoproject.com to a di

Re: assign or rename a variable in templates

2006-01-18 Thread Bryan Murdock
On 1/18/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 1/17/06, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > Is it possible to somehow rename or assign one variable to another in > > a template? All the generic views provide an object_list, except > >

Re: making slug field unique

2006-01-18 Thread Bryan Murdock
On 1/17/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Tuesday 17 Jan 2006 9:04 pm, Bryan Murdock wrote: > > OK, so as a database dummy, how exactly is this done? Do I pipe > > the output of 'manage.py sqlreset myapp' to psql, or is there a > >

assign or rename a variable in templates

2006-01-17 Thread Bryan Murdock
Is it possible to somehow rename or assign one variable to another in a template? All the generic views provide an object_list, except archive_index which provides latest. I'm trying to write a generic template that loops through the object_list (or latest) for all the date-based generic views,

Re: making slug field unique

2006-01-17 Thread Bryan Murdock
On 1/17/06, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > > On Tuesday 17 Jan 2006 4:45 pm, Julio Nobrega wrote: > > Restriction *is* on the database too, when you run "manage.py > > startsql" (the command that outputs the CREATE TABLEs) you can > > see the UNIQUE being added. But Bryan is updati

blog archive links

2006-01-16 Thread Bryan Murdock
I'm building myself a little blog with the django blog app that is found in the djangoproject.com code. I like the archive links (seen on the right-hand side of http://www.djangoproject.com/weblog/). However, I'd like those links auto-generated according to whether there are blog entries for tho

Re: Apache2 mod_python VirtualHost configuration

2006-01-16 Thread Bryan Murdock
On 1/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > My VirtualHost config look now like this: > > > ServerName GoodCompany I don't think you want this: > DocumentRoot "/work/django/GoodCompany" > > allow from all > Options All > I'm pretty sure you don't want your we

Re: Apache2 mod_python VirtualHost configuration

2006-01-16 Thread Bryan Murdock
On 1/16/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Hi, there! > > I found Django this afternoon and was impressed by what I found. After > getting the framework from SVN trunk and installing it on my Fedora > server, I followed the first 2 parts of the tutorial. Worked great and > i got

making slug field unique

2006-01-16 Thread Bryan Murdock
I think I want my model's SlugField to be unique (let me know if this is a Bad Idea for any reason). So I edit my model and change slug=meta.SlugField() to slug=meta.SlugField(unique=True). Do I need to do anything to update the database now? Thanks, Bryan

Re: user information on website

2005-12-19 Thread Bryan Murdock
On 12/19/05, patrick kranzlmüller <[EMAIL PROTECTED]> wrote: > > i´m sorry if this is a trivial question, but i´m struggling with > getting the username displayed on my app. > user is already logged in, using django authentication (for my app is > part of the admin-interface) - i just need to outp

Re: php, mod_python postgresql conflict?

2005-12-19 Thread Bryan Murdock
For the record, there seems to be no issue with postgreSQL (thankfully!). On 12/18/05, Burhan <[EMAIL PROTECTED]> wrote: > > What environment have you seen this problem? I am running mod_php, > mod_python and MySQL (and PostgreSQL) all on one server with Apache2 -- > haven't run into your issue.

php, mod_python postgresql conflict?

2005-12-15 Thread Bryan Murdock
So if you have mod_php and mod_python installed, and mod_php was compiled with MySQL support, apache crashes when mod_python tries to use MySQL. Does anyone know if this same thing happens with postgresql? Thanks, Bryan

Re: Serving both Django content and plain files with mod_python

2005-12-12 Thread Bryan Murdock
On 12/12/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 12/12/05, Richie Hindle <[EMAIL PROTECTED]> wrote: > > I'd like the root page of my site - http://example.com/ - to be served by > > Django. But there also static files that need to live in the root > > directory, eg. robots.txt and f

Re: missing default values in formfields.FormWrapper(...)

2005-12-06 Thread Bryan Murdock
On 12/4/05, Pedro Furtado <[EMAIL PROTECTED]> wrote: > > > else: > > # No POST, so we want a brand new form without any data or > > errors. > > errors = new_data = {} > > > > Copy from the admin view: > > else: > # Add default data. > new_data = manipulator.

Re: Web.py

2005-12-06 Thread Bryan Murdock
On 12/6/05, Daniel Ericsson <[EMAIL PROTECTED]> wrote: > > On 6 dec 2005, at 23.35, Jeremy Dunck wrote: > > > http://webpy.org/tutorial > ... > > Looks kinda like django. :) > > Actually the requirement specification for web.py is in the django > trac :P > > http://code.djangoproject.com/search?

Re: Help running Django with mod_python

2005-12-01 Thread Bryan Murdock
On 12/1/05, Paolo <[EMAIL PROTECTED]> wrote: > > I'm trying to setup Django with Apache and mod_python. > > I have followed the procedure described in the document "how to use > Django with mod_python", but I can't obtain a working basic (single > Django installation on the same Apache) environmen

generic update_object view help

2005-11-30 Thread Bryan Murdock
I'm using the update_object generic view. My template just loops through the fields like so: {% for field in form.fields %} {{ field.field_name }} {{ field }} {% if field.errors %}*** {{ field.errors|join:", "}}{% endif %} {% endfor %} I have a couple ForeignKeys in my model and those show

Re: DRY templates

2005-11-22 Thread Bryan Murdock
On 11/15/05, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On Nov 15, 2005, at 5:09 PM, oggie rob wrote: > > But when I get to the > > template, no scalable option is obvious. I would expect something > > like: > > (% for field in form.fields %) > [snip] > > As of revision [1253] this is now po

Re: urlpattern help

2005-11-19 Thread Bryan Murdock
On 11/19/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 11/19/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > And so it becomes very obvious that I'm new to this whole web > > programming thing. Thank you for your patient explanations! > >

Re: urlpattern help

2005-11-19 Thread Bryan Murdock
On 11/19/05, Jeffrey E. Forcier <[EMAIL PROTECTED]> wrote: > > Sune is correct--your problem stems from a misunderstanding of what a > URL really is :) Anything after a '?' character is not truly part of > the URL, but instead defines GET parameters which are sent to the > resulting view. > > In o

urlpattern help

2005-11-18 Thread Bryan Murdock
How do you write a urlpattern to match something like this: /accounts/login/?next=/add_object/ ? I have this: r'^accounts/login/\?next=(?P.*)$' and it seems to match because my view function is called, but no next parameter is passed in. Oh wait, it's actually matching the previous urlpatter

Re: 20 minute wiki, sortof.

2005-11-18 Thread Bryan Murdock
On 11/18/05, David Ascher <[EMAIL PROTECTED]> wrote: > After watching the TurboGears 20 minute wiki screencast today, I figured I'd > try to build the equivalent code in Django to see what it's like. > > It took me more than 20 minutes, but since this is my first non-tutorial > Django app, I'm ok

Re: svn up, admin has stopped working

2005-11-16 Thread Bryan Murdock
On 11/16/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > On 11/16/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > > > On 11/16/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > > I did an svn up last night and now the admin interface doesn't work. &

Re: svn up, admin has stopped working

2005-11-16 Thread Bryan Murdock
On 11/16/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 11/16/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > I did an svn up last night and now the admin interface doesn't work. > > Here is the error I'm getting: > > Hey Bryan, > >

svn up, admin has stopped working

2005-11-16 Thread Bryan Murdock
Hi, I did an svn up last night and now the admin interface doesn't work. Here is the error I'm getting: TemplateSyntaxError at /ctm/admin/ 'block' tag with name 'userlinks' appears more than once Request Method: GET Request URL: Exception Type: TemplateSyntaxError Exception

Re: 'block' tag with name 'userlinks' appears more than once

2005-11-15 Thread Bryan Murdock
On 11/15/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > I just did an svn up and now I get this: > > 'block' tag with name 'userlinks' appears more than once. Um, that's when I go to admin. Shoulda said that the first time, sorry. > > I've tri

'block' tag with name 'userlinks' appears more than once

2005-11-15 Thread Bryan Murdock
I just did an svn up and now I get this: 'block' tag with name 'userlinks' appears more than once. I've tried to follow all the backwards incompatible changes. Any ideas? Bryan

Re: enforce login on generic views

2005-11-12 Thread Bryan Murdock
On 11/12/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 11/12/05, Bryan Murdock <[EMAIL PROTECTED]> wrote: > > How do I limit access to a generic view to logged in users? > > Hey Bryan, > > I've added a section to the docs for you: All for me? I&

Re: problem with sessions docs?

2005-11-12 Thread Bryan Murdock
On 11/12/05, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > Hey Bryan, > > This technically isn't an error in the docs; it's just a bit > misleading. The "user" in that example wasn't intended to be the user > from the authentication framework -- it's just some generic concept of > "user." > > I've

enforce login on generic views

2005-11-12 Thread Bryan Murdock
How do I limit access to a generic view to logged in users? Bryan

problem with sessions docs?

2005-11-12 Thread Bryan Murdock
The example code for logging a user in here: http://www.djangoproject.com/documentation/sessions/ is this: def login(request): u = users.get_object(username__exact=request.POST['username']) if u.check_password(request.POST['password']): request.session['user_id'] = u.id

Re: broken admin links to logout and change password

2005-11-12 Thread Bryan Murdock
On 11/12/05, Grigory Fateyev <[EMAIL PROTECTED]> wrote: > > Hello Bryan Murdock! > On Sat, 12 Nov 2005 07:34:42 -0800 you wrote: > > > > > My site is set up with mod_python so that to get to the admin page you > > go to: > > > > example.com/appna

broken admin links to logout and change password

2005-11-12 Thread Bryan Murdock
My site is set up with mod_python so that to get to the admin page you go to: example.com/appname/admin In the admin view the links for logging out and changing password are broken. They use example.com/admin/..., leaving out the appname. How can I fix this? Thanks, Bryan