Re: @url tag - getting rid of urlpatterns

2007-08-29 Thread Ivan Sagalaev
Ilya Semenov wrote: > === apps/app1/views/__init__.py === > @url(r'^index/$') > def index(request): > ... > > @url(r'^news/$') > def news(request): While the decorator looks nice it creates in my opinion at least as many problems as it solves. 1. You can apply decorators only to custom v

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Russell Keith-Magee
On 8/30/07, Ulf Kronman <[EMAIL PROTECTED]> wrote: > > I also notice that the command names have changed from dump_data and > load_data to dumpdata and loaddata, respectively. I guess that this > means that in the future, we should always presume that management > commands are addressed with the l

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
> > Is there any documentation on this change around yet? > As always, backwards-incompatible changes appear here: > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Chang... Thanks again. I also notice that the command names have changed from dump_data and load_data to dumpdata a

Software Engineering/Web Development position in Perth, Australia

2007-08-29 Thread Russell Keith-Magee
Hi all, The company that I work for is currently seeking to hire a Software Engineer/Web Developer. Job description follows. Please note that because of the requirements of our customers, the position is only available to Australian citizens. Yours, Russ Magee %-)

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Ross Poulton
Sorry for the off-topic reply... but did the mention of Welsh make anybody else think of Snakes & Rubies[1]? Cool presentation for those who haven't yet seen it. "Already we have 19 translations of the Django admin, and it's really a trip for the hell of it to go in there, and change your browser

Re: Max. size of User.email is 75 chars

2007-08-29 Thread SmileyChris
On Aug 30, 4:28 am, "Peter Melvyn" <[EMAIL PROTECTED]> wrote: > Hi all, > > I've a question, why max. size of User.email field is set to 75 characters, > if RFC 2821 limits local part to 64 characters and domain to 255. > With '@' it is together 320 chars. > > Should not be this field extended? I

Re: Django 1 debugging in pydev with breakpoints

2007-08-29 Thread Lee Connell
works for me. you need to use runserver --noreload in your run command within eclipse. Look here for more info: http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html On Wed, 2007-08-29 at 11:16 +, Rufman wrote: > hey guys > > does anyone have an idea how i can set bre

Re: foreign keys between different application models

2007-08-29 Thread Russell Keith-Magee
On 8/29/07, Graham Carlyle <[EMAIL PROTECTED]> wrote: > > I was hoping something similar would be tenable for the production phase > as well... just dumping the data and then re-loading after recreating > the database, with some possible data munging if the schema has changed > in an incompatible

Re: is possible to only select the specified fields?

2007-08-29 Thread Diego pylorca
ok, but this not return a querySet, return a dictionary :S On 8/29/07, James Bennett <[EMAIL PROTECTED]> wrote: > > On 8/29/07, Diego pylorca <[EMAIL PROTECTED]> wrote: > > Somethimes I must show only field1 and field2. > > > > is some way to only select the field1 and field2? > > http://www.d

Re: Apache + Django - syntax error

2007-08-29 Thread Graham Dumpleton
On Aug 29, 11:06 pm, b3n <[EMAIL PROTECTED]> wrote: > Hey I managed to get Apache to find Django! > > > SetHandler python-program > PythonHandler django.core.handlers.modpython > PythonPath "['C:\Python'] + sys.path" > SetEnv DJANGO_SETTINGS_MODULE bookmarks.settings > PythonD

Re: is possible to only select the specified fields?

2007-08-29 Thread James Bennett
On 8/29/07, Diego pylorca <[EMAIL PROTECTED]> wrote: > Somethimes I must show only field1 and field2. > > is some way to only select the field1 and field2? http://www.djangoproject.com/documentation/db-api/#values-fields -- "Bureaucrat Conrad, you are technically correct -- the best kind of co

is possible to only select the specified fields?

2007-08-29 Thread Diego pylorca
Hi! class Entry(models.model): field1 = models.x(...) field2 = models.x(...) field3 = models.y(...) # Too big field When I do Entry.objects.all() django convert this to "SELECT `field1`, `field2`, `field3` FROM app_entrys" Somethimes I must show only field1 and field2. is some way

Strange encoding behavior

2007-08-29 Thread Anderson Santos
Hello, I am migrating a stable lighttpd+fcgi django app to apache+mod_python and I am dealing with a strange encoding behavior. Here what I did: With a plain migration from the working app to the new mod_python one I got a lot of LATIN1 codec errors that never occured on the last architecture.

Re: Multi page article

2007-08-29 Thread RajeshD
I would second Michael's suggestion to use a page break marker. I have used that in many instances with great succcess -- your content admins will thank you :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: django under 2.5

2007-08-29 Thread John DeRosa
ditto Kevin Menard wrote: > On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: >> Hi list, >> >> I have been running django under python 2.4 but now I'm considering >> switching to 2.5. Are there any known compatibility issues? Or is it >> just straightforward? > > I've been running under 2.5

Re: Keeping track of the original values for a record...

2007-08-29 Thread [EMAIL PROTECTED]
Maybe it's a bug in my branch..I'm using the multiple db branch... but the other method Mike pointed out appears to work. Tomorrow I'm going to tie it all together and have my save method only fire save if there are dirty fields, and log what data has been changed into my event table... Thanks a

Re: site/section/app

2007-08-29 Thread RajeshD
1. You could use a GenericForeignKey in your 'App' model: http://www.djangoproject.com/documentation/models/generic_relations/ Quote: "Generic relations let an object have a foreign key to any object through a content-type/object-id field. A generic foreign key can point to any object, be it ani

Re: Keeping track of the original values for a record...

2007-08-29 Thread Doug B
Hmm. It works in shell for me, I'm not sure what the difference might be. It only keeps _original_data for the life of the instance, so if the view completes, the next view is a different instance. You could make a pickle field to persist it, if you wanted to keep track of the changed values.

Re: Keeping track of the original values for a record...

2007-08-29 Thread [EMAIL PROTECTED]
Ahh..this appears to work! Thanks! On Aug 29, 3:46 pm, Michael <[EMAIL PROTECTED]> wrote: > You can simply override the __init__ method and take a copy of the > values then: > > See Malcolm's explanation > here:http://groups.google.com/group/django-users/msg/6d849eca95243371 > > -Mike > > On Au

Re: Multi page article

2007-08-29 Thread Michael
I wouldn't be storing the pages in a separate model, but rather using some sort of page break marker within a 'body' field of the NewsStory... otherwise i can imagine it will become difficult to edit (add an extra paragraph to the first page, then cut-n-paste like a waterfall through the other pag

Re: Keeping track of the original values for a record...

2007-08-29 Thread Michael
You can simply override the __init__ method and take a copy of the values then: See Malcolm's explanation here: http://groups.google.com/group/django-users/msg/6d849eca95243371 -Mike On Aug 30, 5:28 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I tried using the signals... but setting a

$5 into $50000

2007-08-29 Thread [EMAIL PROTECTED]
Read this. It can change your life: HOW MUCH DO YOU SPEND ON LOTTERIES? HAVE YOU EVER WON? HOW MUCH DOES $5 BUY AT MCDONALD'S? AT A BAR? HOW MUCH DOES ONE MAGAZINE COST? MORE THAN THIS DOES MOST LIKELY... I saw an article in an internet newsgroup telling me I could make $50,000 within a m

Re: Keeping track of the original values for a record...

2007-08-29 Thread [EMAIL PROTECTED]
I tried using the signals... but setting a new value on the record, seems to also set it on the _original_data ...which is odd...maybe I'm not seeing something stupid that I'm doing? If I change my marketing_status_name data in my view and save, the new data is in both the _original_data, and in

Multi page article

2007-08-29 Thread MichaelMartinides
Hi all, Any tips for setting up a multi-page article (ie one news story spread over several pages, box with a content list of the news story, links, etc.)? With my current knowledge I would do this: class NewsStory(models.Model): headline = ... image = ... class NewsStoryPage(models.Model):

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread James Bennett
On 8/29/07, Ulf Kronman <[EMAIL PROTECTED]> wrote: > Is there any documentation on this change around yet? As always, backwards-incompatible changes appear here: http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Changestomanagement.pycommands -- "Bureaucrat Conrad, you are techni

Re: Forms, paging and pretty urls

2007-08-29 Thread [EMAIL PROTECTED]
Easiest way to do it with your url scheme is to use Javascript and build up the location by concatenating "/goals/page" + pagele.value + "start35/". You'd then navigate to this url onsubmit or some other trigger. You could also change your code to look for the page number in the arguments and t

Re: Reutilizing views

2007-08-29 Thread Doug B
I think you should take a look at writing a custom inclusion tag, and then using that tag in both views. http://www.djangoproject.com/documentation/templates_python/#inclusion-tags Unless I am misunderstanding, they would be perfect for what you want to do (and are very easy to make). --~--~--

Re: Keeping track of the original values for a record...

2007-08-29 Thread Doug B
You could probably use the post_init signal to make a copy of the model values for comparison in your save method. I'm doing something similar to create a special manager object each time a certain model instance is created. Something like this... def backup_model_data(sender, instance, signal,

Re: django under 2.5

2007-08-29 Thread Kevin Menard
On 8/28/07, Alvaro Mouriño <[EMAIL PROTECTED]> wrote: > > Hi list, > > I have been running django under python 2.4 but now I'm considering > switching to 2.5. Are there any known compatibility issues? Or is it > just straightforward? I've been running under 2.5 without any problems. The same cod

Re: Keeping track of the original values for a record...

2007-08-29 Thread George Vilches
Jure Čuhalev wrote: > On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: >> Since there isn't a load() method on a model... I'm thinking I somehow >> have to do this on the manager..but not sure ... any tips would be >> great. >> >> When I load a record, either via get() or by looping throug

Re: Keeping track of the original values for a record...

2007-08-29 Thread [EMAIL PROTECTED]
Thanks..but I'm already overriding save, and creating an event record... I need to know how to do something extra when the data is loaded initially. I know I could query the record again into a new object and use that for the original values..but that seems pretty hackish ...so I'd prefer to

Forms, paging and pretty urls

2007-08-29 Thread Matt Haggard
How do you incorporate forms into pretty urls? I have a paged list of things that you access with the following urls /goals/page1/start35/ /goals/page2/start35/ /goals/page3/start35/ etc... Doing links to the next and previous page is easy: {% url ids.views.goals page_num=prev_page,start_num=s

Re: Keeping track of the original values for a record...

2007-08-29 Thread Jure Čuhalev
On 8/29/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > Since there isn't a load() method on a model... I'm thinking I somehow > have to do this on the manager..but not sure ... any tips would be > great. > > When I load a record, either via get() or by looping through the > results of a .fil

Keeping track of the original values for a record...

2007-08-29 Thread [EMAIL PROTECTED]
Since there isn't a load() method on a model... I'm thinking I somehow have to do this on the manager..but not sure ... any tips would be great. When I load a record, either via get() or by looping through the results of a .filter(), I'd like to keep track of the original attribute values via set

@url tag - getting rid of urlpatterns

2007-08-29 Thread Ilya Semenov
I've been using django for almost a year and I was always frustrated by its cumbersome urlpatterns system. While it is really flexible, it doesn't provide any shortcuts for widely-used url and views naming schemes. Let me show in examples what I mean. As everyone, I started with the tutorial and

Max. size of User.email is 75 chars

2007-08-29 Thread Peter Melvyn
Hi all, I've a question, why max. size of User.email field is set to 75 characters, if RFC 2821 limits local part to 64 characters and domain to 255. With '@' it is together 320 chars. Should not be this field extended? Peter --~--~-~--~~~---~--~~ You received

Admin search does not work in my models

2007-08-29 Thread Ariel Mauricio Nunez Gomez
Hello people, Summary: Django admin search returns all results in my models. (in auth.user, search works ok) Context: I'm using revision 6023 from trunk, using Postgresql 8.2 with psycopg2 on an Ubuntu Feisty 7.04 Box. Model: Using a simple model: from django.db import models # Create your mod

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Iapain
> patrickk, I'm not sure what lapain's experience with unicode is, but > please disregard the advice to switch defaultencoding to utf-8. I didnt want this either, but some time you have to toil a bit for debugging. I suggested him to use smart_str in post1, because i am aware of recently merger o

Re: caching and authentication

2007-08-29 Thread patrickk
thanks jeremy. answer to "what isn´t working": on the top of each page, we have two links which depend on whether the user is authenticated or not. either: username / logout (if authenticated) or: login / register (if not authenticated) when I use cache_page (with or without patch_vary_headers r

Re: Django 1 debugging in pydev with breakpoints

2007-08-29 Thread Bob T.
You'll need to run the development server using the debug button from within Eclipse, like you're probably already doing. Be sure to add the --noreload parameter to your manage.py runserver. command. Bob --~--~-~--~~~---~--~~ You received this message because yo

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
got it cocoa was showing everything in the mysql as utf8, but the tables themselves were latin1 :-) wicked, I now have the great job of turning it all back, setting it to not create as Latin1 in the future, check all the data thanks for your help everyone, not a django problem, an mysql one

Re: caching and authentication

2007-08-29 Thread Jeremy Dunck
It's clear to me that the docs involving patch_vary_header, cache_page and the cache middleware need to be improved. I'm using this thread as proof. :) The cache_page decorator is actually just a wrapper around the cache middleware; think of it as view-specific application ofthe cache middlewar

Re: non unicode

2007-08-29 Thread Malcolm Tredinnick
On Wed, 2007-08-29 at 14:58 +0100, Robin Becker wrote: > Hi, we're having some troubles with latest django that are caused by the > switch > to unicode string output. In particular since we were already carefully > handling > the conversion and encoding of the database values we are now gettin

django guru wanted

2007-08-29 Thread Stephen Phillips
i need a django guru to get our development team up and moving quickly 2-4 week contract - brisbane australia - will fly in / fly out - accommodation included - top dollar for the right guy major new australian news site mysql / lucene skills useful will consider applicants from usa / uk / au

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I´ll do a django-update on the weekend. If the problem still exists, I´ll post here again. Thanks for the answers, Patrick On 29 Aug., 17:06, patrickk <[EMAIL PROTECTED]> wrote: > I´m on revision 5646 > > On 29 Aug., 16:57, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > > > On 8/29/07, Michael Radz

Re: foreign keys between different application models

2007-08-29 Thread Graham Carlyle
On Wed, 2007-08-29 at 21:12 +0800, Russell Keith-Magee wrote: > There are 2 options for workarounds: > 1) use SQL ALTER statements rather than resetting the table. This > requires writing manual SQL statements to modify the existing tables > 2) Drop the entire database and start again from scratch

Re: non unicode

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Robin Becker wrote: > > Hi, we're having some troubles with latest django that are caused by the > switch > to unicode string output. In particular since we were already carefully > handling > the conversion and encoding of the database values we are now getting errors > bec

Re: non unicode

2007-08-29 Thread Malcolm Tredinnick
On Thu, 2007-08-30 at 00:52 +1000, Malcolm Tredinnick wrote: > On Wed, 2007-08-29 at 14:58 +0100, Robin Becker wrote: > > Hi, we're having some troubles with latest django that are caused by the > > switch > > to unicode string output. In particular since we were already carefully > > handling

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I´m on revision 5646 On 29 Aug., 16:57, "Jeremy Dunck" <[EMAIL PROTECTED]> wrote: > On 8/29/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > > > > > > On Wed, Aug 29, patrickk wrote: > > > > I just changed > > > self._cache.set(key, value, timeout or self.default_timeout) > > > to > > > self._

Re: Choices cannot be marked for translation?

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Jarek Zgoda wrote: > > Kenneth Gonsalves napisał(a): > > >>> now, this doesnt work - when I remove the _(), then the choices > >>> appear. How do I then mark them for translation? > >>> > >> Make sure to use gettext_lazy > > i *am* using: from django.utils.tr

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Jeremy Dunck
On 8/29/07, Michael Radziej <[EMAIL PROTECTED]> wrote: > > On Wed, Aug 29, patrickk wrote: > > > > > I just changed > > self._cache.set(key, value, timeout or self.default_timeout) > > to > > self._cache.set(smart_str(key), value, timeout or > > self.default_timeout) > > in memcached.py > > and it

Re: Reutilizing views

2007-08-29 Thread Grupo Django
You are right, entrada is front door, but front page is portada, the front page of a magazine or a newspaper is called portada, and the entrance or front door of a house entrada :-) On 29 ago, 15:39, Etienne Robillard <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 >

non unicode

2007-08-29 Thread Robin Becker
Hi, we're having some troubles with latest django that are caused by the switch to unicode string output. In particular since we were already carefully handling the conversion and encoding of the database values we are now getting errors because the data is in unicode. Is it possible to disabl

Re: Reutilizing views

2007-08-29 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 You're welcome, and thanks for the Spanish tip.. (I thought entrada was the appropriate word for front door, but my Spanish skills arent very sharp..) Have to go catch a bus now.. =] Gracias, Etienne On Wed, 29 Aug 2007 05:45:41 -0700 Grupo

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
Hi Russ, > Rather than call the command directly, you now go through the > management interface and invoke the command by name: > >>> management.call_command('dumpdata', 'kth', format='json', indent=2) Thanks for an *extremely* fast support response. Fantastic! Is there any documentation on thi

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Russell Keith-Magee
On 8/29/07, Ulf Kronman <[EMAIL PROTECTED]> wrote: > > I've been using some borrowed code snippets to make a script that > saves data from my PostgreSQL database, and now the script has stopped > working since I last updated the Django code. > > This is how I used to do it: > > from django.core im

django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
Hi all, I've been using Django for building an application containing information about my university's scientific publications, and I'm quite impressed with it. I've been using some borrowed code snippets to make a script that saves data from my PostgreSQL database, and now the script has stoppe

Multiple Django sites under Apache 2 on RHEL4 ?

2007-08-29 Thread b3n
I did search first and read a few threads but I'm still confused. We have a dedicated server running RHEL ES4 . We have about 10 simple PHP sites on there, under Apache. I want to start using Django for some sites (I wont mix PHP and Python). What is the right way to set this up? I've been maki

Re: Apache + Django - syntax error

2007-08-29 Thread b3n
Ahh never mind. I hadn't started the MySQL server. Doh. --~--~-~--~~~---~--~~ 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 t

Re: Django Development Position

2007-08-29 Thread Josh Trutwin
On Wed, 29 Aug 2007 13:33:50 +0530 Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > given the international nature of this list, it would be best for > all job posters to follow the most sensible procedure - very brief > description of the job and a pointer to a web page that gives full > detai

Re: foreign keys between different application models

2007-08-29 Thread Russell Keith-Magee
On 8/29/07, Graham Carlyle <[EMAIL PROTECTED]> wrote: > > So should models in different application's never have foreign key > dependencies and so i should bring them back to one application? or does > anyone know if there is another way around this problem? Models can and should have foreign key

Re: Apache + Django - syntax error

2007-08-29 Thread b3n
Hey I managed to get Apache to find Django! SetHandler python-program PythonHandler django.core.handlers.modpython PythonPath "['C:\Python'] + sys.path" SetEnv DJANGO_SETTINGS_MODULE bookmarks.settings PythonDebug On Now I get a nice Django-styled error instead of the crapp

Re: count() causes QuerySet re-evaluation?

2007-08-29 Thread Russell Keith-Magee
On 8/29/07, Bjorn Ruud <[EMAIL PROTECTED]> wrote: > > The pool QuerySet gets re-evaluated when the count() in the loop is > run. Since one of the fields in the filter gets changed, the amount of > objects in the QuerySet will be different. If pool.count() is replaced > with len(pool) this does not

Re: Reutilizing views

2007-08-29 Thread Grupo Django
Thanks Etienne! By the way, the minus sign in the view was a mistake, I wanted to write front_page. Anyway, it was just an example, in my case, the view is called 'portada' = 'front page' in Spanish :-) Thanks. On 29 ago, 14:30, Etienne Robillard <[EMAIL PROTECTED]> wrote: > -BEGIN PGP SIGNE

Re: Apache + Django - syntax error

2007-08-29 Thread b3n
Still says a syntax error when I navigate to http://localhost/ MOD_PYTHON ERROR ProcessId: 1420 Interpreter:'localhost' ServerName: 'localhost' DocumentRoot: 'C:/xampp/htdocs' URI:'/' Location: '/' Directory: None Filename: 'C:/xampp/htdocs/' PathInf

HttpMethodsMiddleware and mod_python (REST)

2007-08-29 Thread David Larlet
Hello all, I wonder if there is an alternative of the HttpMethodsMiddleware snippet http://www.djangosnippets.org/snippets/174/ which works with mod_python because for the moment it raises an AttributeError when you try to modify the request.method: request.method = request.REQUEST[_MIDDLEWARE_K

Re: Reutilizing views

2007-08-29 Thread Etienne Robillard
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Grupo, I think it would be better not using the minus sign for naming your front page function. Also, dont put weird attributes directly in a view, but instead use a dictionary in your urls.py (read "Passing extra options to view functions in

Re: Django 1 debugging in pydev with breakpoints

2007-08-29 Thread Peter Melvyn
On 8/29/07, Rufman <[EMAIL PROTECTED]> wrote: > does anyone have an idea how i can set breakpoint while debugging in > pydev. i got the dev server to work from inside eclipse but breakpoint > don't seem to work. You need to configure and run dev server first (F9), then break its execution using

Re: Apache + Django - syntax error

2007-08-29 Thread daev
Try simple: PythonPath "C:\Python" --~--~-~--~~~---~--~~ 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 email

Apache + Django - syntax error

2007-08-29 Thread b3n
I'm trying to get Django working on my local Apache (v2). I'm on Windows XP. SetHandler python-program PythonHandler django.core.handlers.modpython SetEnv DJANGO_SETTINGS_MODULE bookmarks.settings PythonDebug On PythonPath "C:\Python\bookmarks" If I take out PythonPath I ge

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Hi Jarek Yep, got that line in my.cnf, my cocoa Show Variables are all utf8. curl tells me it's utf8, request.meta tells me it's utf8, bit it really doesn't look like it is utf8 any more suggestions anyone? On 29/08/2007, Jarek Zgoda <[EMAIL PROTECTED]> wrote: > > > Matt Davies napisał(a): > >

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Jarek Zgoda
Matt Davies napisał(a): > yeah mate, everything I can think of is set to utf-8 and unicode as > explained here > > How did you get that character into the database? > > Did you add it to a web form and put it in like that? > > If so, did you type the character, or did you copy and paste it fro

Re: modpython and python2.5

2007-08-29 Thread Grupo Django
Finally I have rewritten the code to make it compatible with python2.4. It was the easiest solution. I hope Debian makes python 2.5 the default interpreter soon. On 28 ago, 17:40, TheMaTrIx <[EMAIL PROTECTED]> wrote: > mod_python needs to be compiled against the python version your using. > > On

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Jason Davies
Hi Matt, On Aug 29, 12:02 pm, "Matt Davies" <[EMAIL PROTECTED]> wrote: > How did you get that character into the database? > > Did you add it to a web form and put it in like that? > > If so, did you type the character, or did you copy and paste it from > somewhere else? I copied and pasted it i

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Hi Jason yeah mate, everything I can think of is set to utf-8 and unicode as explained here How did you get that character into the database? Did you add it to a web form and put it in like that? If so, did you type the character, or did you copy and paste it from somewhere else? Sorry to be a

Django 1 debugging in pydev with breakpoints

2007-08-29 Thread Rufman
hey guys does anyone have an idea how i can set breakpoint while debugging in pydev. i got the dev server to work from inside eclipse but breakpoint don't seem to work. stephane --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Reutilizing views

2007-08-29 Thread Grupo Django
Hello, I'd like to know if there is some way for reutilizing a view. In my case, I have an application to show some data, but I want to show the same data in the front page, among other data from other models. Well, I have figured out this method: def myview(request, returnHTTP=True): t = lo

Re: Choices cannot be marked for translation?

2007-08-29 Thread Jarek Zgoda
Kenneth Gonsalves napisał(a): >>> now, this doesnt work - when I remove the _(), then the choices >>> appear. How do I then mark them for translation? >>> >> Make sure to use gettext_lazy > i *am* using: from django.utils.translation import gettext_lazy > as _ Ha! H

site/section/app

2007-08-29 Thread Rob Slotboom
I'm trying to implement a kind of model but I'm stuck. Maybe someone outhere can give me some help? This is what I'm thinking about: A site can have sections and a section can have apps. Also a site can have apps. For example: Site: gardening.org app: news sections: garden/kitchen garden apps:

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Jason Davies
Hi Matt, On Aug 29, 11:19 am, "Matt Davies" <[EMAIL PROTECTED]> wrote: > Jason, do me a favour, can you try putting the welsh w character with a > circumflex into one of your django sites, see if it get's transated ok for > me? Seems to work fine for me. Are you sure the MySQL database is using

search better and free things to download from here

2007-08-29 Thread [EMAIL PROTECTED]
This is Piyu, (this will help you finding and downloading any stuff for free) This may help you to get better things (Only for windows users) Click Here http://contest.guruji.com/download.php?refid=225ec06f8fe542cd04d824c79beeb5e7 Please use this for anything you feel for. You know what an

Re: Django, CherryPy and threading

2007-08-29 Thread Justin Johnson
Okay, maybe my text should have read "I've deployed Django with Apache and ModPython where each request *may* be serviced by a separate process." Concurrent requests being handled within the same interpreter was my concern with Django. After a quick look at the source code it seems that Data

foreign keys between different application models

2007-08-29 Thread Graham Carlyle
I recently decided to split out a django application from another one as it seemed to nicely separate a related bunch of views & models. However a model in the split-out application needs a foreign key to a model in the original application. This seems to cause ./manage reset to now fail. I thi

Re: caching and authentication

2007-08-29 Thread patrickk
I´ve been too optimistic - the above code doesn´t work. (This whole caching-issue gives me the willies) On 29 Aug., 12:21, patrickk <[EMAIL PROTECTED]> wrote: > it´s a bit late, but I just wanted to tell that it works with > patch_vary_headers. > in my opinion, this could be explained better in t

Re: caching and authentication

2007-08-29 Thread patrickk
it´s a bit late, but I just wanted to tell that it works with patch_vary_headers. in my opinion, this could be explained better in the docs. so, if one uses a page based on user-authentication and wants to cache that page using the cache_page decorator, here´s the code: def my_view(request):

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Jason, do me a favour, can you try putting the welsh w character with a circumflex into one of your django sites, see if it get's transated ok for me? I'm running unicde django, utf8 all over the place, sitecustomize is telling it to be utf8, but I can't get those characters into mysql at all Can

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Just added the app, nice work Jas On 29/08/2007, Jason Davies <[EMAIL PROTECTED]> wrote: > > > On Aug 29, 11:07 am, Jason Davies <[EMAIL PROTECTED]> wrote: > > http://www.cyswllt.org/cy/ > > There's also a Welsh translation of my fbfriends Facebook application: > http://www.jasondavies.com/fbfri

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Hi Jason, Thomas Jason, have you had any problems with the w character in capital and lower case? And the y character in capital and lower case? On 29/08/2007, Thomas Badran <[EMAIL PROTECTED]> wrote: > > > Afraid not, i havent started toying with this yes. I was going on the > assumption that u

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Jason Davies
On Aug 29, 11:07 am, Jason Davies <[EMAIL PROTECTED]> wrote: > http://www.cyswllt.org/cy/ There's also a Welsh translation of my fbfriends Facebook application: http://www.jasondavies.com/fbfriends/ Jason --~--~-~--~~~---~--~~ You received this message because y

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Thomas Badran
Afraid not, i havent started toying with this yes. I was going on the assumption that unicode would work fine without problems (i thought everythign was unicode internally), looks like i might need to push forward some testing. Tom On Wed, 2007-08-29 at 11:04 +0100, Matt Davies wrote: > Thomas,

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Jason Davies
Hello, One of my first Django-powered sites was in fact bilingual (Welsh and English) :-) http://www.cyswllt.org/cy/ To activate the Welsh translation of the admin interface, simply set LANGUAGE_CODE [1] to 'cy' in your settings. Jason [1] http://www.djangoproject.com/documentation/settings/#

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Matt Davies
Thomas, I'm having one hell of a problem getting certain characters to work in Unicode django Basically the wW and yY with circumflexes above them. You don't know if they're in some wierd character set that I need to grab somehow? On 29/08/2007, Thomas Badran <[EMAIL PROTECTED]> wrote: > > > I

Re: Anyone built a django site in Welsh?

2007-08-29 Thread Thomas Badran
I haven't yet, but I'm currently working on a clients site that's likely to be translated at some point. Not the admin site though, just the main content. Tom On Wed, 2007-08-29 at 07:28 +, vanderkerkoff wrote: > Hello everyone > > I was wondering if anyone in this group had built a django

Re: Choices cannot be marked for translation?

2007-08-29 Thread Kenneth Gonsalves
On 29-Aug-07, at 2:53 PM, Jarek Zgoda wrote: >> now, this doesnt work - when I remove the _(), then the choices >> appear. How do I then mark them for translation? >> > Make sure to use gettext_lazy i *am* using: from django.utils.translation import gettext_lazy as _

Re: Choices cannot be marked for translation?

2007-08-29 Thread Kenneth Gonsalves
On 29-Aug-07, at 2:51 PM, Michael Radziej wrote: >> doesnt work - i just marked one string, the marked string didnt >> appear, the other two did. > > Well, sorry, then I'm personally running out of ideas. But this > looks really > weird. i filed a bug report -- regards kg http://lawgon.liv

Re: Choices cannot be marked for translation?

2007-08-29 Thread Jarek Zgoda
Kenneth Gonsalves napisał(a): > now, this doesnt work - when I remove the _(), then the choices > appear. How do I then mark them for translation? > Make sure to use gettext_lazy >>> i *am* using: from django.utils.translation import gettext_lazy as _ >> Ha! How should we know? >

Re: Choices cannot be marked for translation?

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, Kenneth Gonsalves wrote: > > > On 29-Aug-07, at 2:24 PM, Michael Radziej wrote: > > now, this doesnt work - when I remove the _(), then the choices > appear. How do I then mark them for translation? > > >>> > >>> Make sure to use gettext_lazy > >> > >> i *am* usi

Re: Choices cannot be marked for translation?

2007-08-29 Thread Kenneth Gonsalves
On 29-Aug-07, at 2:24 PM, Michael Radziej wrote: now, this doesnt work - when I remove the _(), then the choices appear. How do I then mark them for translation? >>> >>> Make sure to use gettext_lazy >> >> i *am* using: from django.utils.translation import gettext_lazy as _ > > Ha

Re: UnicodeDecodeError with memcache

2007-08-29 Thread Michael Radziej
On Wed, Aug 29, patrickk wrote: > > I just changed > self._cache.set(key, value, timeout or self.default_timeout) > to > self._cache.set(smart_str(key), value, timeout or > self.default_timeout) > in memcached.py > and it seems to work. > > Don´t know if that´s a proper solution though. Me eit

Re: UnicodeDecodeError with memcache

2007-08-29 Thread patrickk
I just changed self._cache.set(key, value, timeout or self.default_timeout) to self._cache.set(smart_str(key), value, timeout or self.default_timeout) in memcached.py and it seems to work. Don´t know if that´s a proper solution though. thanks, patrick On Aug 29, 10:32 am, Michael Radziej <[EMA

  1   2   >