Eclipse + PyDev + Aptana - Anybody??? Need some pointers

2007-06-19 Thread sarvi
I am a beginner with respect to web development, but not to new to software development. I have an eclipse setup with pydev plugin that works well for my django development. Have been able to create the poll application and mess around with it. I then installed Aptana plugin for eclipse. Created

Custom admin view - sorting, filters, and search

2007-06-19 Thread Vincent Nijs
The admin change list pages you get 'for free' when you add: class Admin: list_display = ( ... ) list_filter = ( ... ) search_fields = ( ... ) to your model are really nice. I'd like to add these features to my custom admin pages as well. I am getting part of the way there to sort th

Re: RENDER_TO_RESPONSE and PRETTY ROUTING URL

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 18:48 -0700, johnny wrote: > When I use render_to_response, can I have routing url in it like '/ > posts/all/' or > I have to have '/posts/all.html''? > > My small code: > # I am passing list of objects called 'posts' to template > return render_to_response('/posts/all/', {'

RENDER_TO_RESPONSE and PRETTY ROUTING URL

2007-06-19 Thread johnny
When I use render_to_response, can I have routing url in it like '/ posts/all/' or I have to have '/posts/all.html''? My small code: # I am passing list of objects called 'posts' to template return render_to_response('/posts/all/', {'posts': posts}) In my browser, I want to have pretty url like

Re: KeyError when using blocktrans

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 09:15 -0700, John DeRosa wrote: > [EMAIL PROTECTED] wrote: > > With the latest version of Django from SVN, it appears you can no > > longer use sub-attributes of a template variable within a blocktrans > > tag. For instance, the following will give you a KeyError: > > > > {

Re: Slugify in characters with accent and others

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 06:35 -0700, Jonas wrote: > For if you need 'slug' non-ascii characters as *Á È ï ô ü ñ*, that > will be converted to *A E i o u n* before of slug the string, I have > added a patch in: > > http://code.djangoproject.com/ticket/2276 > http://code.djangoproject.com/attachment/

Re: admin css/images disappeared

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 09:55 +, Evan Carmi wrote: > Hi, > > My admin css and images have disappeared. I am running django with > lighttpd. The usual thing anybody is going to need to know to be able to help you with a problem like this is "what changed?". What is different between now and wh

Re: Comparing dates..

2007-06-19 Thread oggie rob
I could be a bit more pythonic: >>> from django.db.models.query import QOr >>> ql = [Q(birthdate__day=(startdate + timedelta(days=x)).day) & >>> Q(birthdate__month=(startdate + timedelta(days=x)).month) for x in range(7)] >>> Person.objects.filter(QOr(*ql)) -rob On Jun 19, 2:51 pm, Tim Chase <

Re: Comparing dates..

2007-06-19 Thread Tim Chase
> I want to compare dates in my db while ignoring the year field. Lets > say I have a birthday field and want to find upcoming birthdays in the > next one week. How can I achieve this? If I try- > > last_date = datetime.now().date() + timedelta(days=7) > users = User.objects.filter(birthday__day_

Passing a list of field names to the value() method?

2007-06-19 Thread RichardH
This is probably more of a Python question than django, but django provides the context for my problem. Requirement: I have got a user defined list of field names (e.g. field_names=['id','name','description',...]) and I want to pass this list to the value() method on a QuerySet thereby returning

Re: Questions on learning curve

2007-06-19 Thread [EMAIL PROTECTED]
One stumbling block I think really adds to the learning curve for many people is one's level of familiarity with command line operations and server configurations. On Jun 19, 1:51 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hello everyone, > > A few days ago I got an idea to build an onl

Re: FastCGI Shared host

2007-06-19 Thread rtconner
Nothing? :( I'll keep hammering at the thing trying different things.. but I'm sad I can't get this to work with FastCGI at all. On Jun 19, 9:46 am, rtconner <[EMAIL PROTECTED]> wrote: > I set APPEND_SLASH to false, I no longer get the APPEND_SLASH error, > but I still get the WSGI errors. > > On

Re: Questions on learning curve

2007-06-19 Thread [EMAIL PROTECTED]
Seconded... and to compound on the fallacious house-building analogy... Before you build anything, you have to have surveys done, blueprints created, probably some ground clearance/prep, probably need to negotiate utility hookups... all that stuff will take months before the first worker swings a

Re: Questions on learning curve

2007-06-19 Thread Jeremy Dunck
On 6/19/07, Brian Luft <[EMAIL PROTECTED]> wrote: > > In my opinion, claims of learning curve time are somewhere between > mildly and wildly exaggerated. In my opinion the actual learning > curve will depend on a number of factors including but not limited to: You should make this a blog post an

Re: Questions on learning curve

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

Re: persistant dict

2007-06-19 Thread Carl Karsten
Jeremy Dunck wrote: > On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >>> Which cache backend are you using? The snippet I linked is for *a* >>> backend. Many of the Django caching backends do need to pickle since >>> they marshal out of process. >> Um, "The django cache" implies there is on

International format for date and time

2007-06-19 Thread Jonas
Sorry for the subject --~--~-~--~~~---~--~~ 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 to [EMAIL PRO

Internation format for date and time

2007-06-19 Thread Jonas
There is a discussion about if Django should set the date and time to *ISO standard by default* or to following with the actual *north american*. Note that when you create a new project you could change the default to your localization for date and time (at least for north american localization).

Re: persistant dict

2007-06-19 Thread Jeremy Dunck
On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > > Which cache backend are you using? The snippet I linked is for *a* > > backend. Many of the Django caching backends do need to pickle since > > they marshal out of process. > > Um, "The django cache" implies there is only one. There may

Re: persistant dict

2007-06-19 Thread Carl Karsten
Jeremy Dunck wrote: > On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > ... >> The django cache set/get does work. Thanks, M. > > Which cache backend are you using? The snippet I linked is for *a* > backend. Many of the Django caching backends do need to pickle since > they marshal out of

Comparing dates..

2007-06-19 Thread Ramashish Baranwal
Hi, I want to compare dates in my db while ignoring the year field. Lets say I have a birthday field and want to find upcoming birthdays in the next one week. How can I achieve this? If I try- last_date = datetime.now().date() + timedelta(days=7) users = User.objects.filter(birthday__day__lte =

Re: How is profile_callback in django-registration supposed to work?

2007-06-19 Thread patrick k.
profile_callback, defined in registration.models (of course, you could also define it somewhere else ...) from www.user.models import UserProfile ... def profile_callback(user): new_user_profile = UserProfile.objects.create(user=user,

test client login problems

2007-06-19 Thread Chris Brand
I'm running into problems with the test client's login method. Specifically, within a single test method, the first login succeeds but the second one fails. Is this something that should work ? Am I doing something wrong ? Here's an example : from django.test.client import Client from django.test

Re: How is profile_callback in django-registration supposed to work?

2007-06-19 Thread [EMAIL PROTECTED]
Patrick, could you share your def profile_callback, or at least the important parts of it. I'm still not getting anything created. On Jun 19, 1:04 pm, "patrick k." <[EMAIL PROTECTED]> wrote: > I´m using profile_callback=True and then def profile_callback(user) ... > > it works. > > patrick > > Am

Re: How is profile_callback in django-registration supposed to work?

2007-06-19 Thread patrick k.
I´m using profile_callback=True and then def profile_callback(user) ... it works. patrick Am 19.06.2007 um 20:02 schrieb [EMAIL PROTECTED]: > > I've set: > def create_inactive_user(self, username, password, email, > send_email=True, profile_callback=create_site_user): > > also tried profile_ca

How is profile_callback in django-registration supposed to work?

2007-06-19 Thread [EMAIL PROTECTED]
I've set: def create_inactive_user(self, username, password, email, send_email=True, profile_callback=create_site_user): also tried profile_callback=create_site_user() -- wrong number of arguments and profile_callback=create_site_user(new_user) but new_user doesn't exist yet. I have a create_sit

Freelance Django Developer needed

2007-06-19 Thread Gobion
Immediate Django Freelance Position Available DJANGO FREELANCE POSITION: What & When: We are currently looking for a part time or full time freelancer with experience in Python/Django available for July and/or August. In addition to Python and Django experience, ideally the freelancer should have

bug? admin, edit_inline=models.TABULAR, ValidationError

2007-06-19 Thread dailer
In the following case, the admin interface will highlight the fields as an error but not display the message. Is this a bug? def test_validate(field_data, all_data): raise ValidationError, "that is not good" class TestModel(models.Model): testFk= models.ForeignKey(OtherModel, edi

Re: persistant dict

2007-06-19 Thread Jeremy Dunck
On 6/19/07, Carl Karsten <[EMAIL PROTECTED]> wrote: ... > The django cache set/get does work. Thanks, M. Which cache backend are you using? The snippet I linked is for *a* backend. Many of the Django caching backends do need to pickle since they marshal out of process. --~--~-~--~

Re: persistant dict

2007-06-19 Thread Carl Karsten
Jeremy Dunck wrote: > On 6/17/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > ... >> Use the low-level caching API to store things like this. Write a short >> funciton that retrieves a value from the cache and regenerates it and >> stores it if it is not in the cache. No extra work required. >

Re: admin css/images disappeared

2007-06-19 Thread Michael K
On Jun 19, 5:55 am, "Evan Carmi" <[EMAIL PROTECTED]> wrote: > Hi, > > My admin css and images have disappeared. I am running django with > lighttpd. My settings contains: > - > # URL prefix for admin media -- CSS, JavaScript and images. Make sure to >use a > 39 # trailing slash.

Re: Mysql sleeping queries

2007-06-19 Thread Gábor Farkas
David Reynolds wrote: > Malcolm, > > On 19 Jun 2007, at 8:09 am, Malcolm Tredinnick wrote: > >> It would be interesting to know if anything prior to [5482] (that's >> 5482, not 5492) works. There was a very large change in [5482] that >> should be mostly invisible but may have some side-effects

Re: KeyError when using blocktrans

2007-06-19 Thread John DeRosa
[EMAIL PROTECTED] wrote: > With the latest version of Django from SVN, it appears you can no > longer use sub-attributes of a template variable within a blocktrans > tag. For instance, the following will give you a KeyError: > > {% blocktrans %}by {{ item.author }} at{% endblocktrans %} > > How

Re: Bug with regroup ? (which does not regroup as he shoud / I hope...)

2007-06-19 Thread Nicolas Steinmetz
Nicolas Steinmetz a écrit : [...] > I tried this but the bug persists. Sometimes it works well (technical > skills are well regrouped by technical domaines) but if I refresh, it's > no longer the case. > > I even tried this on an easier object and it does not work more > efficiently (user_ski

Re: FastCGI Shared host

2007-06-19 Thread rtconner
I set APPEND_SLASH to false, I no longer get the APPEND_SLASH error, but I still get the WSGI errors. On Jun 19, 2:18 am, Jens Diemer <[EMAIL PROTECTED]> wrote: > rtconner schrieb: > > > ~/www/django> python mysite.fcgi > > ... > > Traceback (most recent call last): > > ... > > if settings.AP

Dubai Holidays Arabian Nights http://aliozturk.blogcu.com

2007-06-19 Thread ALİ ÖZTÜRK Economist
Dubai Holidays Arabian Nights http://aliozturk.blogcu.com ABU DHABI CITY TOUR http://aliozturk.blogcu.com Egypt Holidays Welcome To Civilisation http://aliozturk.blogcu.com Tunisia Holidays Carpets In Carthage http://aliozturk.blogcu.com Morocco Holidays An Exotic Spice http://aliozturk.b

Apache auth

2007-06-19 Thread David Reynolds
Hi, I've been playing with the apache auth from djangosnippets [0] and I've had it working, but it now seems to be erroring a lot with the following error: Mod_python error: "PythonAccessHandler historymagazine.modpython" Traceback (most recent call last): File "/usr/lib/python2.4/site-

Dubai Holidays Arabian Nights http://aliozturk.blogcu.com

2007-06-19 Thread ALİ ÖZTÜRK Economist
Dubai Holidays Arabian Nights http://aliozturk.blogcu.com ABU DHABI CITY TOUR http://aliozturk.blogcu.com Egypt Holidays Welcome To Civilisation http://aliozturk.blogcu.com Tunisia Holidays Carpets In Carthage http://aliozturk.blogcu.com Morocco Holidays An Exotic Spice http://aliozturk.b

Re: WYSIWYG-editior in django

2007-06-19 Thread [EMAIL PROTECTED]
Which version of fckeditor? If it's just the javascript one (does fck even have a python version?), then it should be as simple as putting it with your other static files and calling it from the template, same as any other javascript. On Jun 19, 3:21 am, G bor Farkas <[EMAIL PROTECTED]> wrote: >

Slugify in characters with accent and others

2007-06-19 Thread Jonas
For if you need 'slug' non-ascii characters as *Á È ï ô ü ñ*, that will be converted to *A E i o u n* before of slug the string, I have added a patch in: http://code.djangoproject.com/ticket/2276 http://code.djangoproject.com/attachment/ticket/2276/defaultfilters.py.patch --~--~-~--~---

Re: Mysql sleeping queries

2007-06-19 Thread David Reynolds
Malcolm, On 19 Jun 2007, at 8:09 am, Malcolm Tredinnick wrote: It would be interesting to know if anything prior to [5482] (that's 5482, not 5492) works. There was a very large change in [5482] that should be mostly invisible but may have some side-effects we need to be aware of. Thanks fo

Re: HttpResponseRedirect and IE6

2007-06-19 Thread Jeremy Dunck
On 6/19/07, Merric Mercer <[EMAIL PROTECTED]> wrote: > > I am having real problems with IE6 and HttpResponseRedirect, IE keeps > showing a blank page, while Firefox works absolutely fine. > > Has anybody else come across this issue ? Not that I know of. Show us some code? --~--~-~--~--

HttpResponseRedirect and IE6

2007-06-19 Thread Merric Mercer
I am having real problems with IE6 and HttpResponseRedirect, IE keeps showing a blank page, while Firefox works absolutely fine. Has anybody else come across this issue ? Thanks MerMer --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: delete obsolete content type entries...

2007-06-19 Thread Jens Diemer
Gabriel Farrell schrieb: > On May 7, 4:32 am, Jens Diemer <[EMAIL PROTECTED]> wrote: >> That surprises me. Does nobody have the same problems? >> Still nobody delete a model class? >> >> How to clean up the django tables? With phpMyAdmin? >> > > I've just run into a similar issue when I removed a

Re: Problems with running Django on a remote machine

2007-06-19 Thread Dirk van Oosterbosch, IR labs
On 19-jun-2007, at 0:59, Malcolm Tredinnick wrote: It runs untill I try to load a page (from another ssh shell). And I just get the prompt back: >> >> The server hangs on the next line, 272: >> self.result = application(self.environ, self.start_response) >> and just exits, without

The Number 1 Product of the Year

2007-06-19 Thread JAVED AS
http://thinktarget.net/100_Products_2007.htm Top 100 Product of 2007 1. Google Apps Premier Edition (Web applications; $50 per ser per year) Google is much more than just a search engine, and with its invaluable Google Apps suite, the company is well on its way to challenging Microsoft for product

Re: Django logging facilities

2007-06-19 Thread Ben Godfrey
I used logging for a while but messages were dropped too often. I'm not entirely sure why, as logging is reputedly thread safe. Instead I switched to syslog, which is more reliable, but truncates log messages. Not so useful for later inspection of stack traces. I have not looked at configuring Ap

admin css/images disappeared

2007-06-19 Thread Evan Carmi
Hi, My admin css and images have disappeared. I am running django with lighttpd. My settings contains: - # URL prefix for admin media -- CSS, JavaScript and images. Make sure to use a 39 # trailing slash. 40 # Examples: "http://foo.com/media/";, "/media/". 41 ADMIN_MEDI

The Book

2007-06-19 Thread Lars Stavholm
Just wanted to let you know that the Django Book seems to be due out June 26th, just got a mail from Amazon. /Lars --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send ema

Django logging facilities

2007-06-19 Thread Teófilo Ruiz
Hi. I'm new to this list (and mostly to Django) and I just wanted to say hello first. I'm doing some research with Django and I came to the time of debugging my application. Actually, not only debugging, but logging what happens in my application for later processing. Is there any documentation

Re: FastCGI Shared host

2007-06-19 Thread Jens Diemer
rtconner schrieb: > ~/www/django> python mysite.fcgi > ... > Traceback (most recent call last): > ... > if settings.APPEND_SLASH and (old_url[1][-1] != '/') and ('.' not > in old_url[1].split('/')[-1]): > IndexError: string index out of range > Content-Type: text/html This is probably the sam

Re: WYSIWYG-editior in django

2007-06-19 Thread Gábor Farkas
yarovit wrote: > Hello. How to connect FCKeditor to django? > there is some documentation about how to use the Dojo and the TinyMCE wysiwyg editors with django, maybe those help. go to code.djangoproject.com, search for "wysiwyg", and you should get the relevant links. gabor --~--~-

Most Wanted Services

2007-06-19 Thread sujal jee
Hi, For articles visit: http://www.telepk.com/articles/ For Beauty and Health Tips: http://www.telepk.com/beauty_and_health/ For Home Decoration: http://www.telepk.com/homedecoration/ For Technology News: http:/www.telepk.com/technews/ For Cricket News: http://www.telepk.com/sports/crick

WYSIWYG-editior in django

2007-06-19 Thread yarovit
Hello. How to connect FCKeditor to django? --~--~-~--~~~---~--~~ 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, sen

Re: Mysql sleeping queries

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 06:51 +0100, David Reynolds wrote: > Morning, > > We are experiencing a problem with Mysql with django. Since an svn > up yesterday (which seems to be revision 5492) we have lots of > sleeping (hanging) mysql processes and we keep hitting our limit of > processes (whi

Re: Mysql sleeping queries

2007-06-19 Thread Malcolm Tredinnick
On Tue, 2007-06-19 at 07:02 +0100, David Reynolds wrote: > On 19 Jun 2007, at 6:56 am, Gábor Farkas wrote: > > > hi, > > > > i have no idea what went wrong, but to the developers it certainly > > would > > help, if you could find out exactly which revision broke the mysql > > behaviour. > >