Problems with template IFs and generic views

2006-11-05 Thread [EMAIL PROTECTED]
I'm using django.views.generic.list_detail.object_detail to show a page. Beside text it has optional "leftmenu" field. What I want to do is to show it in a html block if it exists (there is somethign in "leftmenu"). The problem is that it shows always or never. I have: ### {% if

To set default mutiple inline items

2006-11-05 Thread SNake!
Hi guys, I am trying Django's auto admin and I encounter some problems. The story is that I am working on a Product Category system and in a class Product, one product has many attributes ( for example: size, color, weight and so on) , So there is a one to many relationship. I model it as

Re: Best way to extend admin change_form?

2006-11-05 Thread Mario Graziosi
Patrikk, it worked as you told me. My template_dirs were a mess and that's the reason I didn't get it working on my first try. Thanks. patrickk wrote: > not sure if I understand this right. > > when you use the approach I´ve mentioned, you get exactly this: > 1. specific change_forms for

Re: Issues with FastCGI

2006-11-05 Thread [EMAIL PROTECTED]
Did you read this: http://www.python.rk.edu.pl/w/p/django-pod-serwerem-nginx/ ? :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Best configuration for small VPS

2006-11-05 Thread [EMAIL PROTECTED]
I haven't tested under load at all, the site gets very little traffic, about 4 unique visitors per day. Here's some of the apache processes from ps aux USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND www-data 27197 0.0 3.3 10488 2012 ?S22:24 0:00

Re: Automatically starting the FastCGI server

2006-11-05 Thread Norbert Wojtowicz
I am also interested in how others have solved this. I hope I'm not hijacking the thread, but could we see your Debian approach to this problem? Grigory Fateyev wrote: > Hello orestis! > On Fri, 03 Nov 2006 18:53:26 - you wrote: > > >> Hello, >> >> I'm new to linux administration, but I

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-05 Thread Andy
It doesn't seem to be working, or at least it hasn't yet come out that way. I made another attempt where I essentially left out the {else} and nothing at all rendered, so that filter doesn't seem to be catching it. --~--~-~--~~~---~--~~ You received this message

Issues with FastCGI

2006-11-05 Thread Jaroslaw Zabiello
I am using Django SVN rev.4021, Python 2.4.3, Nginx 0.4.12, I cannot launch Django under FastCGI. My django.fcgi file is: #!/usr/bin/env python import os, sys sys.path += ['/home/app'] from flup.server.fcgi import WSGIServer from django.core.handlers.wsgi import WSGIHandler

Generic Views

2006-11-05 Thread Keith Mallory
I wrote a blog using classic views (writing  functions for reach URLpattern). It works perfectly. However when I tried to convert it using the same database using generic views, it does not work.Then  I tried using the updated code from the following link

Re: Re: Bugtracker sucks?

2006-11-05 Thread James Bennett
On 11/5/06, Todd O'Bryan <[EMAIL PROTECTED]> wrote: > One of the admins can white-list you so that you can post tickets. I'm also working on some friendlier authentication stuff, so people will be able to sign up for accounts and post tickets while logged in (we've got Trac set to filter for

Re: Bugtracker sucks?

2006-11-05 Thread Todd O'Bryan
It's a known issue that's being worked on. Unfortunately, the current inconvenience is less inconvenient than all the tickets having lots of spam attached to them. One of the admins can white-list you so that you can post tickets. Todd On Mon, 2006-11-06 at 03:05 +, Jaroslaw Zabiello

Bugtracker sucks?

2006-11-05 Thread Jaroslaw Zabiello
There are issues with bugtracker (http://code.djangoproject.com/newticket). I and few other people are not able to add new ticket, because it returns Internal Error "Akismet rejected spam" -- Jaroslaw Zabiello http://blog.zabiello.com --~--~-~--~~~---~--~~ You

Re: I am really new, but I found a few problems using it, or am I wrong?

2006-11-05 Thread Peter Ma
you need the python with data module. On 11/6/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Thanks James, > > I figured it out after a while, but it seems not to be a good idea to > install development version. I did that and made a mess of my computer. > I guess there is a version catch

Re: Automatically starting the FastCGI server

2006-11-05 Thread orestis
I'm using CentOS, it's like RedHat AFAIK... --~--~-~--~~~---~--~~ 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 unsubscribe from this group,

Re: I am really new, but I found a few problems using it, or am I wrong?

2006-11-05 Thread [EMAIL PROTECTED]
Thanks James, I figured it out after a while, but it seems not to be a good idea to install development version. I did that and made a mess of my computer. I guess there is a version catch up for Django to do so that it will keep up with Python releases. I look forward to the next release of

Re: A question about for loop in templates

2006-11-05 Thread Ivan Sagalaev
Vizcayno wrote: > but the only idea > that this recommended solution represents a double processing > (accommodate the list) and double use of memory with 'table' restrained > me to continue and send this message 'Premature optimization is the root of all evil' :-). In this case, if only your

Re: Django or TurboGears for a new survery application?

2006-11-05 Thread Matt Culbreth
Adrian Holovaty wrote: > > My suggestion would be to build a quick application with both > frameworks and use the one that feels more natural to you. Both > frameworks will let you get the job done, but they have different > philosophies. TurboGears' philosophy is closer to that of Linux, >

Re: A question about for loop in templates

2006-11-05 Thread Vizcayno
Ivan: Many thanks for your attention and help. My intention in this occasion was to gain speed at the moment to show data at the web page. I thought to do something similar to what you kindly proposed, but the only idea that this recommended solution represents a double processing (accommodate

Re: Django or TurboGears for a new survery application?

2006-11-05 Thread iain duncan
On Sun, 2006-05-11 at 14:27 -0600, Adrian Holovaty wrote: > On 11/5/06, Matt Culbreth <[EMAIL PROTECTED]> wrote: > > So, based on this, my initial leaning had been to go to TurboGears. My > > thoughts were that the application is not interested in content > > management or display, and that I'd

Django Theme for Apple Keynote

2006-11-05 Thread Mike Cantelon
For anyone giving presentations about Django who wants their presentation "Django-branded", feel free to use an Apple Keynote template I created for the purpose: http://mikecantelon.com/?q=node/12 Cheers, Mike Cantelon Vancouver Open Business http://vanopen.biz

Re: Installation failed on Ubuntu 5.10

2006-11-05 Thread [EMAIL PROTECTED]
On Debian Sarge and I'm assuming Ubuntu as well, u need to install python2.4-dev before setup.py will work try: sudo apt-get install python-dev and then try the install again. Follow Jeremy Dunck's advice on putting Django in a temp dir, not in python2.4 before running setup.py

Re: Django or TurboGears for a new survery application?

2006-11-05 Thread Gábor Farkas
Matt Culbreth wrote: > Hello Friends, > > I'm beginning a new project for a client and I'm going to use either > Django or TurboGears. I'd like to get some feedback from this group on > the direction I should take. > > > > > So, based on this, my initial leaning had been to go to

Re: Django or TurboGears for a new survery application?

2006-11-05 Thread Adrian Holovaty
On 11/5/06, Matt Culbreth <[EMAIL PROTECTED]> wrote: > So, based on this, my initial leaning had been to go to TurboGears. My > thoughts were that the application is not interested in content > management or display, and that I'd like to use a bit of AJAX goodies > here and there. > > Any

Django or TurboGears for a new survery application?

2006-11-05 Thread Matt Culbreth
Hello Friends, I'm beginning a new project for a client and I'm going to use either Django or TurboGears. I'd like to get some feedback from this group on the direction I should take. The facts: 1. The application is basically for a user to respond to surveys. 2. The survey questions are

Re: Template inclusion tags, include once

2006-11-05 Thread SmileyChris
It's possible: Set a variable in the context. Only do whatever the template tag does if the variable has not been set. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Problems installing

2006-11-05 Thread skipmartin
Tearing my hair out here... Getting a "400 - Bad Request" I've done everything I can find in any tutorial... please help! Trying to run on Apache 1.3 with FastCGI In my httpd.conf FastCGIExternalServer

Template inclusion tags, include once

2006-11-05 Thread Ed
Is it possible to create a constraint that only allows a template tag to be used only once? This would be useful for a template inclusion tag that includes inline javascript. Thanks, Ed. --~--~-~--~~~---~--~~ You received this message because you are

Re: Best way to extend admin change_form?

2006-11-05 Thread patrickk
not sure if I understand this right. when you use the approach I´ve mentioned, you get exactly this: 1. specific change_forms for whatever model you like 2. standard change_form for all the other models back to the template_loaders: first, django searches the "filesystem" for the change_form.

Re: Best way to extend admin change_form?

2006-11-05 Thread Mario Graziosi
Thanks patrickk, but the point is that I wish to use the standard change_form most of the time but, for some models I wish to use a tailored change_form. I can't see how, even using the template_loaders you're telling about, I could accomplish that. patrickk wrote: > you don´t have to tell

Re: Installation failed on Ubuntu 5.10

2006-11-05 Thread Jeremy Dunck
On 11/1/06, fabio-ts <[EMAIL PROTECTED]> wrote: > > Hi, I tried to install Django-0.95 in /usr/lib/python2.4, then entered > the dir Django-0.95 and started setup.py file. An error occurred giving > this response: > > "error: invalid Python installation: unable to open >

edit_inline=models.TABULAR and easy delete?

2006-11-05 Thread Franklin Kingma
Hello list, I'm looking for an easy way to delete related objects shown in the 'edit_inline=models.TABULAR' - view. At the moment I use an hacked edit_inline_tabular.html template, I append each row with an delete button and with some javascript I change the location to delete the object,

Re: Automatically starting the FastCGI server

2006-11-05 Thread Grigory Fateyev
Hello orestis! On Fri, 03 Nov 2006 18:53:26 - you wrote: > > Hello, > > I'm new to linux administration, but I try to learn :) > > I have managed to make lighttpd and postgresql start automatically > upon reboot, now I need a way to make manage.py runfcgi to start > automatically. [...]

Re: Random ProgrammingErrors when using PostgreSQL

2006-11-05 Thread orestis
And for anyone searching this: http://www.djangoproject.com/documentation/django_admin/#sqlsequencereset-appname-appname --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Random ProgrammingErrors when using PostgreSQL

2006-11-05 Thread orestis
HURRAY I fixed it. For the record, this was my problem - no bug in Django. I have imported semi-automatically some values from a previous version of my app. I had to use the same Primary keys in order to keep all the relations. However, I didn't adjusted the postgres sequences, so they

(Admin) user logged in in model field

2006-11-05 Thread Picio
Hello, can someone help? I have a web app, that works pretty well just with the admin interface ! (very nice BTW) This is a model I have: class operation(models.Model): descr= models.TextField() data = models.DateField('giorno') time_spent =

Re: Random ProgrammingErrors when using PostgreSQL

2006-11-05 Thread orestis
I get this back: [{'sql': 'SELECT "django_session"."session_key","django_session"."session_data","django_session"."expire_date" FROM "django_session" WHERE ("django_session"."session_key" = d3b9c68e8d397b3fc0809ce5102e0299 AND "django_session"."expire_date" > 2006-11-05 13:39:36.338000)',

Re: Creating one call for most recent entry, and another call for the restI have just set up a blog using the helpful tutorial over at

2006-11-05 Thread Ivan Sagalaev
Andy wrote: > http://paste.e-scribe.com/2598/ > > Check it out! Wouldn't {% ifequal forloop.counter 1 %} ) (without quotes around 1) do the trick? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Brasilian fellow with charcode problem...

2006-11-05 Thread Guillermo Fernandez Castellanos
Hi, I had the same problem in Spanish. You must save your templates as UTF-8. For example, in Windows Notepad you can do a save-as and choose UTF- as encoding, instead of ASCII. Hope it helps, G On 11/1/06, Italo Maia <[EMAIL PROTECTED]> wrote: > > Well, here's the problem, in portuguese(my

Re: inclusion tag for login screen.

2006-11-05 Thread Guillermo Fernandez Castellanos
Check this: http://brehaut.net/blog/2006/08/21/django-user-logins/ If you want a complete and working example, tell me and I'll send you one. Hope it helps, G On 11/1/06, MerMer <[EMAIL PROTECTED]> wrote: > > I am thinking about creating a small login form as an inclusion tag, to > display

Re: A question about for loop in templates

2006-11-05 Thread Ivan Sagalaev
Vizcayno wrote: > info_dict = { 'data': lst, >'poscol': ( 2,0,11,29,18,..) > return render_to_response('pres_marcaciones.html', info_dict) Instead of passing this two pieces into template and handle them there you should do this right in the view and pass already constructed

Re: I am really new, but I found a few problems using it, or am I wrong?

2006-11-05 Thread James Bennett
On 11/5/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > In file "ez_setup.py", a configuration line should be > DEFAULT_VERSION = "0.6c3" > in stead of > DEFAULT_VERSION = "0.6c1" The ez_setup.py and the corresponding things it used have actually been removed since the 0.95 release; having to

Re: Re: Django Admin - "Site administration"

2006-11-05 Thread James Bennett
> Carl Holm wrote: > It's probably obvious, but after searching the docs and beyond, I have > not been able to locate the origin of "Site administration", > which appears in the title and as an h1 heading on the initial admin page. It's in this template:

Re: Django Admin - "Site administration"

2006-11-05 Thread frank h.
hej carl, check here http://www.djangoproject.com/documentation/tutorial2/#customize-the-admin-look-and-feel good luck -frank Carl Holm wrote: > Hello, > > It's probably obvious, but after searching the docs and beyond, I have > not been able to locate the origin of "Site administration", >

Re: I am really new, but I found a few problems using it, or am I wrong?

2006-11-05 Thread [EMAIL PROTECTED]
Ok, I got it, I just need to download a pysqlite2 module and see how it goes. I found this answer in Alex's Python in a Nutshell book page 300. Realize that I need to go to http://www.sqlite.org and get this module. The user manual could give a little bit more details so that people with not

Django Admin - "Site administration"

2006-11-05 Thread Carl Holm
Hello, It's probably obvious, but after searching the docs and beyond, I have not been able to locate the origin of "Site administration", which appears in the title and as an h1 heading on the initial admin page. Thanks, CL --~--~-~--~~~---~--~~ You