Re: whith errors my form loose his url parameters

2006-08-07 Thread Alan Green
On 8/8/06, william <[EMAIL PROTECTED]> wrote: > > I have a form (for edit) where some extra required info are coming from > the URL as parameters. Something like: > "/photo/mylitlehouse1543/edit/?category_id=1" > > Whole process works fine; but when users make wrong input, the new URL > showing

Related Models

2006-08-07 Thread Dave
This group has been so helpful, and I'm so close to finishing my first Django app for my client. I've run into one unusual sticking point... I'm trying to create a model in which a customer can enter information as an Order model via a form. Also, sometimes, the Admin interface will be used to

Re: Render HTML in choices

2006-08-07 Thread Malcolm Tredinnick
On Mon, 2006-08-07 at 11:38 -0700, skullvulture wrote: > In my model I have a field that has choices and in the display of those > choices I need the degrees symbol, so I put in '' however the > admin page does not render the html in my choice set in the drop down > menu. Is there a way to get

Re: Render HTML in choices

2006-08-07 Thread skullvulture
Yeah, I figured out I could do that, but I had to define the encoding: #!/usr/bin/python # -*- coding: utf-8 -* If anyone can answer how to get django to render the html within the choice set however, I'd really appreciate it. --~--~-~--~~~---~--~~ You received

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Kenneth Gonsalves
On 08-Aug-06, at 4:22 AM, hotani wrote: > yeah, python can do it, but where do I put this? Forgive my n00b > question but would this go in the view? in the view - just do int() when retrieving the value from post -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/

Re: MySQL UnicodeEncodeError

2006-08-07 Thread Malcolm Tredinnick
On Tue, 2006-08-08 at 00:14 +, Niran Babalola wrote: > I've been developing a Django application using SQLite, and now I'm > trying to move over to MySQL and actually launch the site. The > application is storing data from RSS/Atom feeds using Universal Feed > Parser, which uses unicode

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Kenneth Gonsalves
On 07-Aug-06, at 11:37 PM, hotani wrote: > I'm doing a comparison of a session variable and an id for a > 'selected' > tag in a drop-down in a template. If I output both vars, they will > both > be "1" yet 'ifequal' is still returning false. Has water stopped being > wet? your '1' may be

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Don Arbow
On Aug 7, 2006, at 3:52 PM, hotani wrote: > Maybe there is a built-in way of doing > this that I'm missing? All I want to do is have a drop-down be > 'selected' when the option value matches the session value. You know that you can use a FormWrapper to set default values for your form fields?

MySQL UnicodeEncodeError

2006-08-07 Thread Niran Babalola
I've been developing a Django application using SQLite, and now I'm trying to move over to MySQL and actually launch the site. The application is storing data from RSS/Atom feeds using Universal Feed Parser, which uses unicode strings for all its data. When I try to store information from a feed

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
problem on the view side is that the function setting the cookies doesn't just deal with strings or ints. If I get into customizing for each item I sent in, it defeats the purpose. I wrote a custom filter that would change the values to ints, and it works - but it will not work inside the {%

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Alan Green
On 8/8/06, hotani <[EMAIL PROTECTED]> wrote: > > Thanks for the replies. > > However, after digging through the documentation I'm not seeing > anything that will convert my strings to ints or vice versa. Where is > this filter I am overlooking? You might just need to ensure that type of data in

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
yeah, python can do it, but where do I put this? Forgive my n00b question but would this go in the view? The session var is set by looking at post data, I'm guessing this is the one that is a string now rather than 'project.id' - Seriously, am I doing something strange here? Maybe there is a

Re: usage of GenericForeignKey ?

2006-08-07 Thread Ian Holsman
hi Dirk.you still need to put in the content-type & object-idregardsIan.On 08/08/2006, at 6:40 AM, [EMAIL PROTECTED] wrote:Hi,I have the following model defined:from django.db import modelsclass MyTest(models.Model):        obj = models.GenericForeignKey()if I let print the SQL-Create-Statements

Re: Which caching method to use in shared hosting?

2006-08-07 Thread Jay Parlar
On 8/7/06, Sime Ramov <[EMAIL PROTECTED]> wrote: > > Hello, > > Which caching method you consider the best for use in shared hosting > environments where memcached isn't available? > > I'm on Dreamhost and currently using filesystem cache, but I was > wondering is database caching maybe better

Re: Why 404?

2006-08-07 Thread Jay Parlar
On 8/7/06, Marius Ursache <[EMAIL PROTECTED]> wrote: > I had a similar problem (not seeing the records I just inserted into > database - actually they were the only one) because I left the > timezone variable set to "America/Chicago" and i live in Europe (and > my timezone is Chicago + 8). So the

Re: Why 404?

2006-08-07 Thread Marius Ursache
On 8/7/06, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > I am getting 404 with archive_day date-based generic view. I know that > some objects exist for specified day (they are present in archive_month > view), but I consequently get 404 if I specify a day. > > My urlconf has an entry: > ( >

Re: Why 404?

2006-08-07 Thread Steven Armstrong
On 08/07/06 22:29, Jarek Zgoda wrote: > I am getting 404 with archive_day date-based generic view. I know that > some objects exist for specified day (they are present in archive_month > view), but I consequently get 404 if I specify a day. > > My urlconf has an entry: > ( >

Re: cherokee server and django - fast-cgi/scgi rumble

2006-08-07 Thread [EMAIL PROTECTED]
they say that SCGI is FCGI done right :) --~--~-~--~~~---~--~~ 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, send

Re: show many2many data as comma-separated-text. fast/optimal solution?

2006-08-07 Thread Corey Oordt
I may be showing my ignorance of Django and python here but: in MySQL there is an aggregate function GROUP_CONCAT that will do precisely what you want. There is a PostgreSQL library that adds the functionality as well. I'm still getting used to the ORM is Django, so I'm not sure how you

Re: Django Can't Find 'Tag' Class

2006-08-07 Thread Tyson Tate
On Aug 6, 2006, at 8:12 PM, Malcolm Tredinnick wrote: > ... > > Have you changed the source code and not restarted something, or is it > ponting to an older directory of source? > > Regards, > Malcolm Ah - it turned out that Apache wasn't reloading whatever it needs to reload when I do 'touch

Re: Work with FileField directly

2006-08-07 Thread Alan Green
On 8/7/06, Adam Seering <[EMAIL PROTECTED]> wrote: > It seems like manipulators are usually the way to handle file-upload, > but how can I use manipulators to do something this complex? That's what I found in my application. I side-stepped manipulators altogether for file upload. > If I can't

Why 404?

2006-08-07 Thread Jarek Zgoda
I am getting 404 with archive_day date-based generic view. I know that some objects exist for specified day (they are present in archive_month view), but I consequently get 404 if I specify a day. My urlconf has an entry: ( r'^(?P\d{4})/(?P\d{2})/(?P\d{2})/$',

usage of GenericForeignKey ?

2006-08-07 Thread dummy
Hi, I have the following model defined: from django.db import models class MyTest(models.Model): obj = models.GenericForeignKey() if I let print the SQL-Create-Statements for mysql-DB I get this: BEGIN; CREATE TABLE `test_mytest` ( `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY

Re: cherokee server and django - fast-cgi/scgi rumble

2006-08-07 Thread Gacha
With SCGI worked for me too, but what is better and faster FCGI or SCGI? [EMAIL PROTECTED] wrote: > I've only done SCGI in cherokee, I'll try to get FastCGI running and > when I do I'll write about it on the wiki :) --~--~-~--~~~---~--~~ You received this

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Silas Snider
Try just the int() constructor from Python (i.e. int('1') returns 1 as a integer) Sincerely, Silas Snider On 8/7/06, hotani <[EMAIL PROTECTED]> wrote: > > Thanks for the replies. > > However, after digging through the documentation I'm not seeing > anything that will convert my strings to ints

adding multiple, fkey-chained models

2006-08-07 Thread Aurynn
Hiya; I'm writing something akin to a very specific part of the Admin contrib app, yet sufficiently different as to make the admin unsuitable for what I'm doing. What I have are two models, model1 and model2. Model2 has a fkey relationship to model one. I do not want to save model1 to the DB

Re: Render HTML in choices

2006-08-07 Thread Ivan Sagalaev
skullvulture wrote: > In my model I have a field that has choices and in the display of those > choices I need the degrees symbol, so I put in '' however the > admin page does not render the html in my choice set in the drop down > menu. Is there a way to get it to render the html? Thanks. I

RE: Invalid character error using Oracle backed

2006-08-07 Thread Hancock, David \(DHANCOCK\)
OK, much progress made (see transcript below). My current question is: "How can I get a log written of all queries made via the command-line interface?" Then I can start figuring out what's wrong with other queries that get automatically generated. I tried in the transcript to start from a nice,

Admin Manipulators

2006-08-07 Thread Seth Buntin
Can I extend the admin manipulator? I want to change one ManyToMany select box to a text field. Seth --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
Thanks for the replies. However, after digging through the documentation I'm not seeing anything that will convert my strings to ints or vice versa. Where is this filter I am overlooking? --~--~-~--~~~---~--~~ You received this message because you are subscribed

JOB: Full-time Django/Python/etc position in NYC

2006-08-07 Thread Jeff Forcier
Hey folks, I've been tasked by my boss to find another coder to help me out with a (by now) fairly gargantuan Django-related project, as well as to curate/create other miscellaneous small projects in various languages (Python, PHP, shell scripts, etc). There's simply too much work for me to

Re: Django covered in podcast with Guido

2006-08-07 Thread Adrian Holovaty
On 8/5/06, Simon Willison <[EMAIL PROTECTED]> wrote: > http://www.twit.tv/floss11 > > Django gets some good discussion about 50 minutes in. I've posted a note to the Django weblog about this. Great interview! Adrian -- Adrian Holovaty holovaty.com | djangoproject.com

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Adrian Holovaty
On 8/7/06, hotani <[EMAIL PROTECTED]> wrote: > I'm doing a comparison of a session variable and an id for a 'selected' > tag in a drop-down in a template. If I output both vars, they will both > be "1" yet 'ifequal' is still returning false. Has water stopped being > wet? Perhaps one of them is

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Steven Armstrong
On 08/07/06 20:15, hotani wrote: > Code: > > {% if request.session.pfilter %} > {% ifequal request.session.pfilter project.id %} > {{ project }} > > both {{ project.id }} and {{ request.session.pfilter }} return "1" > Maybe one value is an int and the other is a string?

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread Elver Loho
On 8/7/06, hotani <[EMAIL PROTECTED]> wrote: > > I'm doing a comparison of a session variable and an id for a 'selected' > tag in a drop-down in a template. If I output both vars, they will both > be "1" yet 'ifequal' is still returning false. Has water stopped being > wet? While water might be

Re: Django covered in podcast with Guido

2006-08-07 Thread nate-django
On Mon, Aug 07, 2006 at 12:46:57AM -0700, Dan Shafer wrote: > On 8/6/06, Alan Green <[EMAIL PROTECTED]> wrote: > > On 8/5/06, Simon Willison <[EMAIL PROTECTED]> wrote: > > > http://www.twit.tv/floss11 > > > > > > Django gets some good discussion about 50 minutes in. > > > > Guido sure says nice

Render HTML in choices

2006-08-07 Thread skullvulture
In my model I have a field that has choices and in the display of those choices I need the degrees symbol, so I put in '' however the admin page does not render the html in my choice set in the drop down menu. Is there a way to get it to render the html? Thanks.

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread nate-django
On Mon, Aug 07, 2006 at 06:07:24PM -, hotani wrote: > I'm doing a comparison of a session variable and an id for a 'selected' > tag in a drop-down in a template. If I output both vars, they will both > be "1" yet 'ifequal' is still returning false. Has water stopped being > wet? Is one a

Re: Tagging.

2006-08-07 Thread Seth Buntin
Can I extend the form Manipulator or something that will allow me to change the ManyToMany select field with a text field? I think I have seen some examples but I don't quite know how to extend it. --~--~-~--~~~---~--~~ You received this message because you are

Re: when is 1 != 1? (according to 'ifequal' in template)

2006-08-07 Thread hotani
Code: {% if request.session.pfilter %} {% ifequal request.session.pfilter project.id %} {{ project }} both {{ project.id }} and {{ request.session.pfilter }} return "1" --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Using custom forms with generic views

2006-08-07 Thread jeffmikels
Thanks for your help. I ended up creating a view to do the work. If the data is simple enough and just plain text, is there a compelling reason to use AddManipulator or other manipulators instead of just object.save()? --~--~-~--~~~---~--~~ You received this

Re: cherokee server and django - fast-cgi/scgi rumble

2006-08-07 Thread [EMAIL PROTECTED]
I've only done SCGI in cherokee, I'll try to get FastCGI running and when I do I'll write about it on the wiki :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: Weird slowdown with dev server behind nat

2006-08-07 Thread Adrian Holovaty
On 7/31/06, Akatemik <[EMAIL PROTECTED]> wrote: > I'm running the basic django server and everything works fine from lan. > But from outside every request has a three second overhead, even if > it's just a 304. This means that a small html-page with three JS-files > and a stylesheet takes 15

Re: cherokee server and django - fast-cgi/scgi rumble

2006-08-07 Thread Gacha
Ivan Sagalaev wrote: > [EMAIL PROTECTED] wrote: > > if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not > > in old_url[1].split('/')[-1]): > > IndexError: string index out of range > > -- > > and in the browse flup shows a simillar

admin-interface ... how to handle a list with different contenttypes

2006-08-07 Thread patrickk
class FilmhausPreview(models.Model): contenttype = models.ForeignKey(ContentType) entry = models.IntegerField('ID') position = models.PositiveSmallIntegerField('Position', unique=True, editable=False) It´s a list of different entries (movies, programs, news ...) to be

Re: Tagging.

2006-08-07 Thread Seth Buntin
Thanks Eric. I have one question though. If I have a model named Resources how do I get a field in that that will allow me to define my tags? I put: tags = models.GenericRelation(ObjectTag) But when I go to the admin I get a Formfield not found or something like that. Seth nkeric wrote: >

Which caching method to use in shared hosting?

2006-08-07 Thread Sime Ramov
Hello, Which caching method you consider the best for use in shared hosting environments where memcached isn't available? I'm on Dreamhost and currently using filesystem cache, but I was wondering is database caching maybe better option? I suppose that local memory caching also isn't an

Re: Tagging.

2006-08-07 Thread nkeric
hi Seth, here is a link to the tagging models I've done in my project, you may want to have a look :) http://groups.google.com/group/django-users/browse_thread/thread/50b6712cd7738d9d/4b654db1ecaf4b2f?lnk=gst=ObjectTag=1#4b654db1ecaf4b2f Here is the basic ideas of my tagging app: 1. a table

Re: Tagging.

2006-08-07 Thread Antonio Cavedoni
On 7 Aug 2006, at 15:23, Seth Buntin wrote: > I have a Django project (almost complete) that needs to implement > tagging. […] I think I am going to have to write this > from scratch but I don't know where to start. Can someone point me in > the right direction? You may want to have a look at

Tagging.

2006-08-07 Thread Seth Buntin
I have a Django project (almost complete) that needs to implement tagging. In a previous framework I used a plugin that made this really easy. I don't need much. What was implemented in the framework that "must not be named" was a simple text field. The tags where separated by a space and

Re: Using custom forms with generic views

2006-08-07 Thread Michael van der Westhuizen
On 8/7/06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Sat, 2006-08-05 at 08:36 -0700, jeffmikels wrote: > > I'm trying to create a site that has entries of different types and > > tags that can link to any type of entry. > > > > In my models, I have a > > > > tags =

Re: Django covered in podcast with Guido

2006-08-07 Thread Dan Shafer
I'd say! I mean he calls it his favorite Web app framework and declares himself a satisfied user.Wow.On 8/6/06, Alan Green < [EMAIL PROTECTED]> wrote:On 8/5/06, Simon Willison < [EMAIL PROTECTED]> wrote:>> http://www.twit.tv/floss11>> Django gets some good discussion about 50 minutes in.Guido sure

Re: Django covered in podcast with Guido

2006-08-07 Thread Alan Green
On 8/5/06, Simon Willison <[EMAIL PROTECTED]> wrote: > > http://www.twit.tv/floss11 > > Django gets some good discussion about 50 minutes in. Guido sure says nice things about Django. Congratulations! a -- Alan Green [EMAIL PROTECTED] - http://bright-green.com