Re: How to override automatic plural names of models in admin interface

2006-06-26 Thread mohan
Thanks Adrian, It worked. Thanks for your support. --~--~-~--~~~---~--~~ 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

Maintaining foreign key reference when foreign object gets deleted

2006-06-26 Thread mohan
Hi, I have the following 3 models with one model having a foreign key reference to another model. class DeliveryBatch(models.Model): delivered_to = models.ForeignKey(Centre) ... class Centre(models.Model): is_deleted = models.BooleanField(default=false) ... class

Disable autoreload to allow single thread debugging

2006-06-26 Thread magic
To debug using pydev in eclipse the django server needs to run in a single thread. However django/core/management.py autoreloads main to run in another thread or process. django/core/management.py (line 1013) from django.utils import autoreload autoreload.main(inner_run) I believe

Re: how to manually invlaid a cached view?

2006-06-26 Thread Jay Parlar
On 6/26/06, Wei Litao <[EMAIL PROTECTED]> wrote: > I have checked the cache document, it said that an view can have an > @cache_page(60 * 15) decorator to store it on a cache, But it didn't say how > to fluch it. Is there some api to invalid a view cache manually? I want to > invalid some view

how to manually invlaid a cached view?

2006-06-26 Thread Wei Litao
I have checked the cache document, it said that an view can have an @cache_page(60 * 15) decorator to store it on a cache, But it didn't say how to fluch it. Is there some api to invalid a view cache manually? I want to invalid some view cache when calling another view. Sincerely,Wei Litao

Re: svn co fails with "501 Not Implemented"

2006-06-26 Thread Jay Parlar
On 6/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I'm newbie to svn and to django; plan to use dojo, so need to checkout > "trunk" per the download page. > > I just installed svn 1.1.4 using apt-get on a Lineox workstation. > > I tried the command "svn co >

Packaging django/flup for ubuntu

2006-06-26 Thread Douglas Campos
does anyone have some light for me? I'm new to this ubuntu thing I want to mantain a nightly .deb build from django svn, to help the poor (tm) Thanx --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: Repetitive background tasks

2006-06-26 Thread Aaron
Embrace the OS. Whats wrong with OS specific tools anyway? If you are developing on windows and deploying to unix then you can use something like cygwin to get cron in there. When I code in java I use the excellent quartz scheduler, but then I have to use my home-gronw monitoring tools to

Re: SuspiciousOperation: User tampered with session cookie

2006-06-26 Thread [EMAIL PROTECTED]
Did your domain change? I have seen this error when I was working on myDomainOne and then started the same app under myDomainTwo. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Repetitive background tasks

2006-06-26 Thread Tyson Tate
On Jun 26, 2006, at 12:43 PM, Glenn Tenney wrote: > > [...] > 2) Also within your application, write a global function that (a) > immediately checks to see if it's the first time it's invoked each day > (or whatever interval), and then, if it is the first time, (b) does > all of the repetitive

Time Tracking Tool

2006-06-26 Thread Jos Yule
I'm in the prototype phase for designing a time tracking/invoicing tool for my small business. First i'd like to know if anyone has already done this kind of thing? If not, i'd like to make something available to other looking for this kind of functionality. I should note that this _IS NOT_ for

svn co fails with "501 Not Implemented"

2006-06-26 Thread fred
I'm newbie to svn and to django; plan to use dojo, so need to checkout "trunk" per the download page. I just installed svn 1.1.4 using apt-get on a Lineox workstation. I tried the command "svn co http://code.djangoproject.com/svn/django/trunk/; as described on the download page and get an error

Re: Repetitive background tasks

2006-06-26 Thread Glenn Tenney
On Mon, Jun 26, 2006 at 06:07:19PM -, Harish Mallipeddi wrote: > Is there a way to do this by resorting to a solution within the django > framework and not some OS-level solution like cron jobs on Linux? As has been mentioned, using cron (or cron-like) to schedule running a Python script is

Re: Adding search functionality

2006-06-26 Thread Guillermo Fernandez Castellanos
Hi, There's probably a better way, but I would do like the code they use in the admin, something like: # 'query' is the query you want to run. It can be, for instance, "WLAN john" or_query=Q() search_fields = ['articles','author'] # and whatever field of the articles you want to search if query:

Re: Repetitive background tasks

2006-06-26 Thread Simon Willison
On 26 Jun 2006, at 19:07, Harish Mallipeddi wrote: > I'm wondering if someone could advise me on how to do certain periodic > background tasks with django? For instance, if I needed to retrieve a > list of RSS feeds daily to check for updates how would I do that? > > Is there a way to do this

Repetitive background tasks

2006-06-26 Thread Harish Mallipeddi
Hi all, I'm wondering if someone could advise me on how to do certain periodic background tasks with django? For instance, if I needed to retrieve a list of RSS feeds daily to check for updates how would I do that? Is there a way to do this by resorting to a solution within the django framework

Re: Advanced Locale from URL middleware

2006-06-26 Thread jon1012
Hi Adrian, Ok, no problem, I'll just post a message on my blog and link to it from the wiki page. Jon --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

How to select distinct rows?

2006-06-26 Thread Ville Säävuori
Say I have a model like class Example (models.Model): ip = models.IPAddressField() desc = models.CharField(maxlength=255) created = models.DateTimeField(auto_now_add=True) How do I make a query that counts distinct objects by ip (or any other field that is not pk)? It's

Adding search functionality

2006-06-26 Thread Kristoffer
I have a simple Django application that displays articles. Now, I would like to let my users search the articles for key words, and I found this topic from this group: http://groups.google.com/group/django-users/browse_thread/thread/e5e82d81b0b85aa7/b06b72997a6a1e0c Is this still the way to go

Re: admin connection mysql problem

2006-06-26 Thread John DeRosa
When I've seen messages similar to this, it's usually because an identifier in the meta.Admin list_display list was not defined as a field in the class. A good place to start would be to check the spelling of every field listed in meta.Admin. John Patrick wrote: > Hi, > when i go in my

admin templates

2006-06-26 Thread [EMAIL PROTECTED]
Hello all, I copied the templates of the admin app base.html and base_site.html to create my own views. The admin app and my app worked very well, but if I broose the template I copied, the admin app does not work anymore, giving a GET 200 return code with no content. To recover a fonctionnal

admin connection mysql problem

2006-06-26 Thread Patrick
Hi, when i go in my admin site (http://basetta.pupazzo.org/admin) I recieve always this Mod_python error: "PythonHandler django.core.handlers.modpython" Traceback (most recent call last): File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in HandlerDispatch result =

Re: Model vanishes from Admin

2006-06-26 Thread [EMAIL PROTECTED]
Malcolm Tredinnick wrote: > On Sat, 2006-06-24 at 23:57 -0700, [EMAIL PROTECTED] wrote: > > Not sure if this makes a difference or not, but when I run "manage.py > > validate" it says that there are 0 errors... and like I said > > originally... The files on my production server are an exact

RE: Error importing middleware django.contrib.sessions.middleware: "cannot import name backend"

2006-06-26 Thread Kevin Fullerton
That is very annoying, but now fixed, and turned out to be two related but different problems 1) My Ultra5 that I use as a Postgresql database server had a problem with the network card and had put itself into a stop mode 2) Upgrading packages on my Debian machine I use for Django, it decided to

Re: Error importing middleware django.contrib.sessions.middleware: "cannot import name backend"

2006-06-26 Thread Malcolm Tredinnick
On Mon, 2006-06-26 at 11:45 +0100, Kevin Fullerton wrote: > Hi, > > I run off the SVN version of Django - updated to the latest version > this morning and get the following when I run a project that was > working fine last week (think I was at revision 3200 last week and am > at 3206 today) >

Error importing middleware django.contrib.sessions.middleware: "cannot import name backend"

2006-06-26 Thread Kevin Fullerton
Hi,   I run off the SVN version of Django - updated to the latest version this morning and get the following when I run a project that was working fine last week (think I was at revision 3200 last week and am at 3206 today)   [EMAIL PROTECTED]:~/django_projects/syweb$ ./manage.py runserver

Re: syncdb

2006-06-26 Thread ama55
i have moved the update version into a new place and installed it, but i had to replace the ez_setup.py file with the old one, because the installation failed with the new version. using the old ez_setup.py file the installation worked and the new version was installed and everythin is working

Error importing middleware django.contrib.sessions.middleware: "cannot import name backend"

2006-06-26 Thread Kevin Fullerton
Hi,   I run off the SVN version of Django - updated to the latest version this morning and get the following when I run a project that was working fine last week (think I was at revision 3200 last week and am at 3206 today)   [EMAIL PROTECTED]:~/django_projects/syweb$ ./manage.py runserver

Re: syncdb

2006-06-26 Thread ama55
no. it is giving me the old result. --~--~-~--~~~---~--~~ 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: syncdb

2006-06-26 Thread Malcolm Tredinnick
On Mon, 2006-06-26 at 02:26 -0700, ama55 wrote: > Dear Malcom: > i run manage.py --version, it is true i am using version 0.91. > so i run svn co http://code.djangoproject.com/svn/django/trunk/. > and run the project from the start but it gave me the same error, so i > have to download a newer

Re: syncdb

2006-06-26 Thread ama55
Dear Malcom: i run manage.py --version, it is true i am using version 0.91. so i run svn co http://code.djangoproject.com/svn/django/trunk/. and run the project from the start but it gave me the same error, so i have to download a newer version or anything else. Thanks for your reply

Re: Mark user as 'already voted' in polls app

2006-06-26 Thread Guillermo Fernandez Castellanos
Ok, I tried it and it works. The idea is to put a cookie in the computer of the other person, where it stocks all the polls it has participated to. That way it does not depend of the IP. The code: def vote(request, poll_id): p = get_object_or_404(Poll, pk=poll_id)

Re: syncdb

2006-06-26 Thread Malcolm Tredinnick
On Mon, 2006-06-26 at 07:46 +, ama55 wrote: > Hi all: > i am trying to run python manage.py syncdb. but it keeps giving me this > message: > 'syncdb' was invalid. > if anyone knows how to solve this problem please let me know What does "manage.py --version" tell you (if it gives you an

Re: OneToMany and filters

2006-06-26 Thread Gavin.Kou
maybe this is a bug, when import the model via the follow: from projectName.appName.models import className but not: from appName.models import className maybe a solution. for more infomation , pls refer to: http://groups.google.com/group/django-developers/browse_thread/thread/51ebb62cc40ff3f7

Re: Mark user as 'already voted' in polls app

2006-06-26 Thread bahund
I'm in the same boat as well, where I'll have logged in users as well as anonymous users, and each user will only be allowed to submit each poll once. I haven't figured out how to handle the anonymous users yet (I'll stay tuned to this thread), but I may be able to suggest a way to handle it in

syncdb

2006-06-26 Thread ama55
Hi all: i am trying to run python manage.py syncdb. but it keeps giving me this message: 'syncdb' was invalid. if anyone knows how to solve this problem please let me know --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Follow 'True' and FileField's

2006-06-26 Thread opendev
Hello, I am implementing a scenario where multiple attachments are part of an 'article' entity. When using Article.ChangeManipulator(article_id, follow = { 'attachment': True }) within my custom controller (which is build according to the guidelines for the new admin branch) the following things