Re: error when using delete generic views

2009-01-28 Thread Daniel Roseman
On Jan 29, 7:02 am, vierda wrote: > dear all, > I have problem when using delete_object generic views, the code always > raise error delete_object() takes at least 3 non-keyword arguments (0 > given) but I think I have provided 4 arguments. my code as per below. > Thank you for any kind help. > >

Re: Meta-information for model and form fields

2009-01-28 Thread Vinay Sajip
On Jan 29, 12:35 am, Malcolm Tredinnick wrote: > On Wed, 2009-01-28 at 04:27 -0800, Vinay Sajip wrote: > > I'd like to attach some user-defined meta-information to individual > > model fields and have it also be available in the corresponding form > > fields. Ideally, I'd have liked to have a ke

error when using delete generic views

2009-01-28 Thread vierda
dear all, I have problem when using delete_object generic views, the code always raise error delete_object() takes at least 3 non-keyword arguments (0 given) but I think I have provided 4 arguments. my code as per below. Thank you for any kind help. views.py : def delete_profile(request): use

Re: admin sorting in ManyToMany fields

2009-01-28 Thread Aaron Lee
Just to be clear, the ManyToManyField will have 'a', 'c', 'b' listed under Person1's admin interface with 'a' and 'c' highlighted. What I want to achieve is to order the name => 'a', 'b', 'c' with 'a', 'c' highlighted for Person1 and 'b' highlighted for Person2. -Aaron On Wed, Jan 28, 2009 at 6:0

Re: QuerySet.create(**kw) and force_insert

2009-01-28 Thread Jason Geiger
> Sure. Open a ticket and attach a patch to update the docs and we'll > commit it at some point. You're right that we should update the docs. Done! http://code.djangoproject.com/ticket/10145 > Still, if the extra line of code will really set you back each time I suppose one extra line isn't too

Re: Any django users in Malaysia/Singapore

2009-01-28 Thread Kelvin Quee
>From Singapore here. We have at least 1 Django expert in our company. :) Kelvin Quee k...@kquee.com +65 9177 3635 http://kquee.com 2009/1/29 ycloh : > > Yeah, would have been nice if there was some sharing, which is why i > wanted to know if there were users in KL or Sin. Would be nice to

Re: QuerySet.create(**kw) and force_insert

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 21:26 -0800, Jason Geiger wrote: > Hello all. The docs say about QuerySet.create [1]: > """ > This is equivalent to (but much simpler than): > > >>> b = Blog.objects.get(id=1) > >>> e = Entry( > blog=b, > headline='Hello', > body_text='Hi', >

QuerySet.create(**kw) and force_insert

2009-01-28 Thread Jason Geiger
Hello all. The docs say about QuerySet.create [1]: """ This is equivalent to (but much simpler than): >>> b = Blog.objects.get(id=1) >>> e = Entry( blog=b, headline='Hello', body_text='Hi', pub_date=datetime.date(2005, 1, 1) ) >>> e.save() """ I was tryin

Re: Any django users in Malaysia/Singapore

2009-01-28 Thread ycloh
Yeah, would have been nice if there was some sharing, which is why i wanted to know if there were users in KL or Sin. Would be nice to at least arrange some sort of get together/ teh tarik session, if there were enough developers around. On Jan 29, 9:15 am, Bond Lim wrote: > Hi, I am from Malay

Re: @cache_control() and @never_cache not working

2009-01-28 Thread BluMarble
Anyone? --~--~-~--~~~---~--~~ 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 django-users+unsubscr...@

Re: passing self?

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 05:53 -0800, ajlozier wrote: > Thank you for responding. > > Yeah I was starting to figure out just what you're saying, that I > can't access the functions of a class within the class definition > itself. This is also true in PHP. In this case, if I were writing in > PHP I

Re: Django Forms in HTML 4.01 Strict

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 14:33 +0100, Gertjan Klein wrote: > Malcolm Tredinnick wrote: > > >In HTML, the requirement for errors of this form ( instead of > >), is that the parser *must* recover in a way that forces it to > >treat it as "" -- it has to ignore the invalid characters and > >recover in

Re: Debug output from template language?

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 18:06 -0800, Margie wrote: > Ah, right - of course. Thanks, Malcom. > > This is only slightly related, but perhaps you have a good answer. > Are most people using the standard template language? Not sure how we'd measure "most" people. But you could safely assume a few th

Re: absolute_import, app names, dots, and a bug

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 22:50 -0500, Karen Tracey wrote: > On Wed, Jan 28, 2009 at 9:51 PM, Todd O'Bryan > wrote: > > On Sun, Jan 25, 2009 at 7:13 PM, Karen Tracey > wrote: > > Sounds related to: > > > > http://code.djangoproject.com/ticket/8193 >

Re: admin-like filters in custom views

2009-01-28 Thread gsiems
In Django 0.96 I was able to do something along the lines of: def list_doohickies(request): return list_objects(request, 'doohickies', 'doohicky') def list_objects(request, app_label, model_name, reqd_permission): model = models.get_model(app_label, model_name) if model is None:

Re: absolute_import, app names, dots, and a bug

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 9:51 PM, Todd O'Bryan wrote: > On Sun, Jan 25, 2009 at 7:13 PM, Karen Tracey wrote: > > Sounds related to: > > > > http://code.djangoproject.com/ticket/8193 > > > > Karen > > > > That's exactly what it is, and that hasn't been fixed because people > don't think it's reall

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-28 Thread Rodrigo C.
> Just a suggestion -- if the admin site does the sort of thing you want, then > taking a look at the admin code would probably be helpful in figuring out > how to do it. Sorry I don't know offhand without doing more digging than I > have time for what it does, exactly, but if it is showing a work

RE: admin_perm_test decorator?

2009-01-28 Thread Ian Cullinan
Ok, thanks. I guess it's one more thing to look forward to in 1.1 :) From: django-users@googlegroups.com [django-us...@googlegroups.com] On Behalf Of alex.gay...@gmail.com [alex.gay...@gmail.com] Sent: Thursday, 29 January 2009 11:59 AM To: Django users S

Re: absolute_import, app names, dots, and a bug

2009-01-28 Thread Todd O'Bryan
On Sun, Jan 25, 2009 at 7:13 PM, Karen Tracey wrote: > On Sun, Jan 25, 2009 at 7:03 PM, Todd O'Bryan wrote: >> >> I've been trying to convert my apps to use the relative imports from >> __future__ and have noticed a problem. I think it may be something >> Django is doing, but I'm not sure. >> >>

Re: Debug output from template language?

2009-01-28 Thread Margie
Ah, right - of course. Thanks, Malcom. This is only slightly related, but perhaps you have a good answer. Are most people using the standard template language? I know there are some others out there (though I can't remeber the names offhand). As a python programmer I find using the template lan

Re: OneToOneField relation and bidirectional StackedInline behavior in contrib.admin context

2009-01-28 Thread peschler
Hi, actually I am facing the same problem here. I did quite a search on the subject and I found no real solution to this use case. Here are my models: --- contacts/models.py: class Address(models.Model): street = models.CharField(max_length=255) city = models.CharField(max_le

Re: admin sorting in ManyToMany fields

2009-01-28 Thread Aaron Lee
On Wed, Jan 28, 2009 at 4:44 PM, Malcolm Tredinnick < malc...@pointy-stick.com> wrote: > > On Wed, 2009-01-28 at 06:49 -0800, Aaron Lee wrote: > > I tried doing that but it didn't work, the order of names within the > > PersonAdmin still shows the Name according to pk order. > > Firstly, realise

Re: Any django users in Malaysia/Singapore

2009-01-28 Thread Graham Dumpleton
On Jan 29, 12:15 pm, Bond Lim wrote: > Hi, I am from Malaysia and currently using django. Too bad is that in > Malaysia, we do not have any python or django conference, > > On Wed, Jan 28, 2009 at 04:58:09PM -0800, ycloh wrote: > > > Hi all, just wondering if there are many django users in this

Re: admin_perm_test decorator?

2009-01-28 Thread alex.gay...@gmail.com
On Jan 28, 7:49 pm, Ian Cullinan wrote: > The docs > athttp://docs.djangoproject.com/en/dev/ref/contrib/admin/#protecting-cu...say > to use the "decorator provided in django.contrib.admin.utils.admin_perm_test" > to protect custom AdminSite and ModelAdmin views, but it doesn't exist (in > 1.0

Re: Queryset unexpectedly turning into list

2009-01-28 Thread mb0...@googlemail.com
> "Normally" (which might well mean "hopefully") it shouldn't matter > whether you're getting back an iterator or a list (which is still > iterable) at that point in the code. I could imagine or construct code > that behaves differently in the two cases, but do you have a real-life > case where th

Re: 'FtrToolTags' is not a valid tag library: Could not load template library from django.templatetags.FtrToolTags, cannot import name Product

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 16:15 -0800, Thiago F. Crepaldi wrote: > in models.py all the code is ok. What other files are using the Product model? In particular, how do you import it into the module(s) that are using it in template tags. Something in your code is not importing Product or importing it

Re: Any django users in Malaysia/Singapore

2009-01-28 Thread Bond Lim
Hi, I am from Malaysia and currently using django. Too bad is that in Malaysia, we do not have any python or django conference, On Wed, Jan 28, 2009 at 04:58:09PM -0800, ycloh wrote: > > Hi all, just wondering if there are many django users in this part of > this world and how is django being use

Re: can i use models like that??

2009-01-28 Thread Malcolm Tredinnick
On Thu, 2009-01-29 at 00:09 +0200, Mirat Can Bayrak wrote: > Can you look at these, can they work? > > i tried that one but not worked, is there way to make it working? (nope, > there was no error messages, only strings are not shown at admin panel) > > LANGUAGE_OPTIONS = (('en_GB', '(British)

Re: How to do Refbacks in Django?

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 11:49 -0800, Fluoborate wrote: > Hello, > > I would like some suggestions for how to do refbacks in Django. Every > time someone clicks a link that brings them to my site, I want to > record what site referred them. This is done using the HTTP referrer > header. Here are my

Re: Debug output from template language?

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 14:05 -0800, Margie wrote: > Is there a way to generate debug output from the template language? > Suppose I have something like this: > > {% for field in form %} > {{ field.label_tag }}{{ field }} tr> > {% if field.help_text %} > {{ fiel

Re: Custom authentication backend and User passwords

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 11:34 -0800, Delta20 wrote: > Is there a way to make it so that when you create a User in admin, the > password is set such that the user cannot login using ModelBackend? Have a look at this: http://docs.djangoproject.com/en/dev/topics/auth/#django.contrib.auth.models.User.s

Re: Changing comments preview form

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 19:24 +0100, Florian Lindner wrote: > > Am 28.01.2009 um 05:19 schrieb Malcolm Tredinnick: > > > > > On Tue, 2009-01-27 at 20:11 +0100, Florian Lindner wrote: > >> Hello, > >> > >> I'm playing around with the contrib.comments framework. I want to > >> change the preview for

Any django users in Malaysia/Singapore

2009-01-28 Thread ycloh
Hi all, just wondering if there are many django users in this part of this world and how is django being used. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Creating test databases. Nose framework

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 17:19 +0200, Oleg Oltar wrote: > Any idea? Generally, you'll want to wait more than 6 hours before asking again. A couple of days, at least, would be a reasonable period. > On Wed, Jan 28, 2009 at 11:41 AM, Oleg Oltar > wrote: > Can't find how to add predefined da

Re: Complex queries with datetime field

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 16:10 +0100, Stefan Tunsch wrote: > Hi! > > I have a calendar that permits multiple selections of dates. > > My view has to filter the data depending on the selected dates. > > I am unsure about how I can construct a query that filters correctly the > data. > > I constru

admin_perm_test decorator?

2009-01-28 Thread Ian Cullinan
The docs at http://docs.djangoproject.com/en/dev/ref/contrib/admin/#protecting-custom-adminsite-and-modeladmin say to use the "decorator provided in django.contrib.admin.utils.admin_perm_test" to protect custom AdminSite and ModelAdmin views, but it doesn't exist (in 1.0, at least): $ pwd /us

Re: admin sorting in ManyToMany fields

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 06:49 -0800, Aaron Lee wrote: > I tried doing that but it didn't work, the order of names within the > PersonAdmin still shows the Name according to pk order. Firstly, realise that your question doesn't have a "correct" answer. Ordering by multi-valued fields always have th

Re: Complex Form Widgets

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 11:48 +0200, Donn wrote: > On Wednesday, 28 January 2009 09:46:09 Paul Johnston wrote: > > Is it possible to use more complex form widgets > In my *very* limited experience, I would say yes. > > The widgets are really javascript and all your Django view needs to worry > a

Re: Meta-information for model and form fields

2009-01-28 Thread Malcolm Tredinnick
On Wed, 2009-01-28 at 04:27 -0800, Vinay Sajip wrote: > I'd like to attach some user-defined meta-information to individual > model fields and have it also be available in the corresponding form > fields. Ideally, I'd have liked to have a keyword arg on the fields... > > class MyModel(models.Mode

Re: 'FtrToolTags' is not a valid tag library: Could not load template library from django.templatetags.FtrToolTags, cannot import name Product

2009-01-28 Thread Thiago F. Crepaldi
in models.py all the code is ok. Is there any procedure to "register" Product ? when i type "python" in my red hat console, nothings happens, so i can't run "python manage.py syncdb" Would that be the reason Product is not recognized ? it is the only new model inserted into the project r...@serv

Re: media files apache/modpython windows

2009-01-28 Thread Brian Neal
On Jan 28, 3:51 pm, Karen Tracey wrote: > On Wed, Jan 28, 2009 at 3:39 PM, May wrote: > > > Hello, > > > I have the admin templates with CSS working under local server windows/ > > apache/modpython.  Now I would like to get my site css files to work > > under apache. > > > The settings and http

Re: Improving the response time in Django Admin

2009-01-28 Thread Russell Keith-Magee
On Thu, Jan 29, 2009 at 7:41 AM, Tipan wrote: > > Can anyone suggest some areas to explore to improve the response time > on the Admin. We're currently on release 7476 (pre new forms admin), > but due to go to the latest development release next week, although > I'm not sure how significant this

Re: ContentTypes and fixtures

2009-01-28 Thread Russell Keith-Magee
On Thu, Jan 29, 2009 at 7:36 AM, Oliver Beattie wrote: > > How can I be sure that the ContentType IDs are always constant, and > therefore my data in fixtures is guaranteed to always point to the > right object? Oliver, meet ticket #7052. Ticket #7052, meet Oliver :-) This is an annoying bug th

Re: Changing database fields

2009-01-28 Thread Russell Keith-Magee
On Thu, Jan 29, 2009 at 6:53 AM, Mark Jones wrote: > > This is where Rails rocks and DJango doesn't. I haven't been able to > find any kind of DB Migrations in Django like those in Rails. Sad > too, because other than that, Python is a lot nicer than Ruby (Syntax > wise for an old C++ programme

Re: Improving the response time in Django Admin

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 5:41 PM, Tipan wrote: > > We're running several Django sites on 3 dedicated servers with (1 app, > 1 media and 1 data). The sites generally run pretty quickly for users. > We are using db caching (we'll be moving to mem_cached in due course) > on most views other than thos

Improving the response time in Django Admin

2009-01-28 Thread Tipan
We're running several Django sites on 3 dedicated servers with (1 app, 1 media and 1 data). The sites generally run pretty quickly for users. We are using db caching (we'll be moving to mem_cached in due course) on most views other than those showing specific user data. The site has about 90,000 r

ContentTypes and fixtures

2009-01-28 Thread Oliver Beattie
Hey everyone, I'm converting some of my stuff over to use Django fixtures instead of the old dump-import a SQL file. This is all going very well, until I realised that my GenericForeignKeys might be broken if I rely on fixtures. In my old SQL method, this was not an issue as I could guarantee th

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 3:21 PM, madhav wrote: > > Awesome Tracey. > > Almost all of my doubts regarding django emailing are gone. Except > One. Assuming I haven't set anything in the settings regarding > emailing. So NO EMAIL_HOST_USER, nothing else... I try sending the > email from the django s

django admin model organization

2009-01-28 Thread matthew.j.ga...@gmail.com
I love the admin interface, and it works perfectly for almost every aspect of the application I am writing. However, I have discovered that the default behavior of the admin interface to list all models in one grouping is not ideal in my case... I have a *large* number of models (that are based o

Re: links in table - one for URL, one not

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 4:28 PM, May wrote: > > Hello, > > I am extracting data from a postgres table into an html table. I have > two columns. > > The user can select the link in this column, the link will be returned > through the URL and view.py to extract more information from the > postgres

Debug output from template language?

2009-01-28 Thread Margie
Is there a way to generate debug output from the template language? Suppose I have something like this: {% for field in form %} {{ field.label_tag }}{{ field }} {% if field.help_text %} {{ field.help_text }}{% endif %} {% endfor %} Suppose I want to

Re: Changing database fields

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 4:29 PM, Oleg Oltar wrote: > Hi! > I am creating my first application. Which is to be a small publishing > system. > > I defined a model, which represent a single article, and also added about > 15 articles to my database (which is sqlite3). > > Now I understand that I sho

Re: Changing database fields

2009-01-28 Thread Mark Jones
This is where Rails rocks and DJango doesn't. I haven't been able to find any kind of DB Migrations in Django like those in Rails. Sad too, because other than that, Python is a lot nicer than Ruby (Syntax wise for an old C++ programmer) On Jan 28, 3:29 pm, Oleg Oltar wrote: > Hi! > I am creati

Re: media files apache/modpython windows

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 3:39 PM, May wrote: > > Hello, > > I have the admin templates with CSS working under local server windows/ > apache/modpython. Now I would like to get my site css files to work > under apache. > > The settings and http.conf code is here: > http://dpaste.com/114010/ > > I

Re: ImportError: No module named django.core.handlers.modpython

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 3:39 PM, saturdayplace wrote: > > Ahh. OK, so I installed django in /home/thunsaker/python_modules/ > django-trunk. And then did: >ln -s /home/thunsaker/python_modules/django-trunk/django /usr/lib/ > python2.5/site-packages > so that django's on the pythonpath. I'm u

Re: ImportError: No module named django.core.handlers.modpython

2009-01-28 Thread saturdayplace
OK - so it looks like it was a permissions problem. I moved my django-1.0.X and django-projects directories to /var/www where my apache could get to it, and that seems to have cleared everything up. Thanks for the pointer. On Jan 28, 1:39 pm, saturdayplace wrote: > On Jan 28, 12:31 pm, Karen Tr

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread Ian
On Jan 28, 1:25 pm, João Olavo Baião de Vasconcelos wrote: > I think that I realised what is the problem. > > Karen, just add a TextField to the Book model (say, "description = > models.TextField()"), try to search for something and you'll see that error > message. I'm not 100% sure about it, coz

Changing database fields

2009-01-28 Thread Oleg Oltar
Hi! I am creating my first application. Which is to be a small publishing system. I defined a model, which represent a single article, and also added about 15 articles to my database (which is sqlite3). Now I understand that I should extend my models with few more fields (e.g. need to add categor

links in table - one for URL, one not

2009-01-28 Thread May
Hello, I am extracting data from a postgres table into an html table. I have two columns. The user can select the link in this column, the link will be returned through the URL and view.py to extract more information from the postgres table: {{ researchproject.restitle| safe }} This column wi

can i use models like that??

2009-01-28 Thread Mirat Can Bayrak
Can you look at these, can they work? i tried that one but not worked, is there way to make it working? (nope, there was no error messages, only strings are not shown at admin panel) LANGUAGE_OPTIONS = (('en_GB', '(British) English'), ('tr', 'Turkish'), ('es', 'Spanish')) class ShortDescriptio

media files apache/modpython windows

2009-01-28 Thread May
Hello, I have the admin templates with CSS working under local server windows/ apache/modpython. Now I would like to get my site css files to work under apache. The settings and http.conf code is here: http://dpaste.com/114010/ I can place mysite css and images under the apache htdocs, but I c

Re: ImportError: No module named django.core.handlers.modpython

2009-01-28 Thread saturdayplace
On Jan 28, 12:31 pm, Karen Tracey wrote: > On Wed, Jan 28, 2009 at 1:48 PM, saturdayplace wrote: > > > > > > > I'm trying to get Django set up on a new webserver, and I get the > > above error.  Here's my setup: > > > $python > > Python 2.5 (r25:51908, Apr 10 2007, 10:29:13) > > [GCC 4.1.2 2007

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread João Olavo Baião de Vasconcelos
I think that I realised what is the problem. Karen, just add a TextField to the Book model (say, "description = models.TextField()"), try to search for something and you'll see that error message. I'm not 100% sure about it, coz I tested this at work and then came home. Probably is the same bug r

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread madhav
Awesome Tracey. Almost all of my doubts regarding django emailing are gone. Except One. Assuming I haven't set anything in the settings regarding emailing. So NO EMAIL_HOST_USER, nothing else... I try sending the email from the django shell(python manage.py shell) to somevalidu...@xyz.com, using

How to do Refbacks in Django?

2009-01-28 Thread Fluoborate
Hello, I would like some suggestions for how to do refbacks in Django. Every time someone clicks a link that brings them to my site, I want to record what site referred them. This is done using the HTTP referrer header. Here are my questions: 1. Does the code to do this already exist somewhere (

Custom authentication backend and User passwords

2009-01-28 Thread Delta20
Is there a way to make it so that when you create a User in admin, the password is set such that the user cannot login using ModelBackend? I'm using two authentication backends, a custom backend and Modelbackend: i.e.: AUTHENTICATION_BACKENDS = ('myapp.auth.ActiveDirectoryBackend', 'django.contr

ForeignKey.limit_choices_to

2009-01-28 Thread msmtotti
Hola que tal, eh buscado informacion en la documentaciony encontre esta propiedad "ForeignKey.limit_choices_to" para delimitar mi ForeignKey. Lo que quiero hacer es delimitar mi ForeignKey de grupo_pregunta para que solo me tome el id, del script Eh intentado ponerlo asi pero me marca el sigiuent

Re: ImportError: No module named django.core.handlers.modpython

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 1:48 PM, saturdayplace wrote: > > I'm trying to get Django set up on a new webserver, and I get the > above error. Here's my setup: > > $python > Python 2.5 (r25:51908, Apr 10 2007, 10:29:13) > [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 > Type "help", "copyright", "c

Re: django.core.mail.EmailMessage confusion

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 1:53 PM, madhav wrote: > > I am trying to fire emails to users, using EmailMessage class. As we > all know it accepts from_email,subject,etc... > But assume a case where a site's user has got an email like: > ser...@google.com(which the site owner's didn't confirm previous

Re: Several browser windows, one session object - should I be locking django session objects?

2009-01-28 Thread Matthias Julius
Michael Newman writes: > On Jan 27, 4:52 pm, Matthias Julius wrote: >> mvtango writes: >> > my users keep several browser windows open in my application, I need >> > to keep session information for all these windows separate. But I have >> > only one session object - modifying it while the use

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 1:39 PM, madhav wrote: > > To add to my previous reply > Even EmailMessage class has got from_email attribute which means it > can have dynamic EmailMessage. > If it has to only pick settings.EMAIL_HOST_USER, why would it require > a atttribute called from_email? > EM

django.core.mail.EmailMessage confusion

2009-01-28 Thread madhav
I am trying to fire emails to users, using EmailMessage class. As we all know it accepts from_email,subject,etc... But assume a case where a site's user has got an email like: ser...@google.com(which the site owner's didn't confirm previously), and he is sending an email to el...@yahoo.com(which f

ImportError: No module named django.core.handlers.modpython

2009-01-28 Thread saturdayplace
I'm trying to get Django set up on a new webserver, and I get the above error. Here's my setup: $python Python 2.5 (r25:51908, Apr 10 2007, 10:29:13) [GCC 4.1.2 20070403 (Red Hat 4.1.2-8)] on linux2 Type "help", "copyright", "credits" or "license" for more information. >>> >>> import django >>>

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 1:18 PM, madhav wrote: > > Thankyou Tracey, > You are right about settings.EMAIL_HOST_USER not getting overriden > from django.core.email. Even I checked it. > But the current behaviour is a bit confusing. Because, I can have a > default email id > for the entire applicati

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread madhav
To add to my previous reply Even EmailMessage class has got from_email attribute which means it can have dynamic EmailMessage. If it has to only pick settings.EMAIL_HOST_USER, why would it require a atttribute called from_email? On Jan 28, 11:18 pm, madhav wrote: > Thankyou Tracey, > You are

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread Ian
On Jan 28, 9:46 am, João Olavo Baião de Vasconcelos wrote: > On Wed, Jan 28, 2009 at 1:31 PM, Karen Tracey wrote: > > You are including the __name in your manual search but you left it out of > > the search_fields you listed in your ModelAdmin.  So what happens if you > > make search_fields = ['

Re: Changing comments preview form

2009-01-28 Thread Florian Lindner
Am 28.01.2009 um 05:19 schrieb Malcolm Tredinnick: > > On Tue, 2009-01-27 at 20:11 +0100, Florian Lindner wrote: >> Hello, >> >> I'm playing around with the contrib.comments framework. I want to >> change the preview form. For that I've copied preview.html to xgm/ >> Blog/ >> templates/comments

Re: Problems with authentication login/logout

2009-01-28 Thread Matias Surdi
Matias Surdi escribió: > I've followed the documentation on users authentication and it's working > fine except for one thing. > > When a user logs out from the public views, it is also logged out from > the admin site and when the user logs in in the public view, if it has > staff permission

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread madhav
Thankyou Tracey, You are right about settings.EMAIL_HOST_USER not getting overriden from django.core.email. Even I checked it. But the current behaviour is a bit confusing. Because, I can have a default email id for the entire application(like sys...@mysite.com or do-not- re...@mysite.com) which w

Re: settings.EMAIL_HOST_USER problem

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 12:20 PM, madhav wrote: > > I need some help regarding django emailing. I have set the > settings.EMAIL_HOST_USER to 'do-not-re...@mysite.com' and whenever I > am trying to send an email in any context, its taking the 'do-not- > re...@mysite.com' as from address and sendin

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 11:46 AM, João Olavo Baião de Vasconcelos < joaool...@gmail.com> wrote: > On Wed, Jan 28, 2009 at 1:31 PM, Karen Tracey wrote: > >> You are including the __name in your manual search but you left it out of >> the search_fields you listed in your ModelAdmin. So what happen

Problems with authentication login/logout

2009-01-28 Thread Matias Surdi
I've followed the documentation on users authentication and it's working fine except for one thing. When a user logs out from the public views, it is also logged out from the admin site and when the user logs in in the public view, if it has staff permission it can access the admin site.So far

settings.EMAIL_HOST_USER problem

2009-01-28 Thread madhav
I need some help regarding django emailing. I have set the settings.EMAIL_HOST_USER to 'do-not-re...@mysite.com' and whenever I am trying to send an email in any context, its taking the 'do-not- re...@mysite.com' as from address and sending it, eventhough I supply a different from-address while se

Re: 'FtrToolTags' is not a valid tag library: Could not load template library from django.templatetags.FtrToolTags, cannot import name Product

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 12:03 PM, Thiago F. Crepaldi wrote: > > Hello, a created a new model on a already working system in my > development computer. When i finished it, i exported those mysql data > data through phpmyadmin and imported to the production table. When i > deployed the new site, i g

'FtrToolTags' is not a valid tag library: Could not load template library from django.templatetags.FtrToolTags, cannot import name Product

2009-01-28 Thread Thiago F. Crepaldi
Hello, a created a new model on a already working system in my development computer. When i finished it, i exported those mysql data data through phpmyadmin and imported to the production table. When i deployed the new site, i got: TemplateSyntaxError at 'FtrToolTags' is not a valid tag library:

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread João Olavo Baião de Vasconcelos
On Wed, Jan 28, 2009 at 1:31 PM, Karen Tracey wrote: > You are including the __name in your manual search but you left it out of > the search_fields you listed in your ModelAdmin. So what happens if you > make search_fields = ['title', 'authors__name']? > I did it, and got this error message: *

Re: Bound Inline Formset doesn't render FileField's current value, needs to be reentered.

2009-01-28 Thread Karen Tracey
On Tue, Jan 27, 2009 at 5:48 PM, Rodrigo C. wrote: > > > This isn't a Django issue. It's a standard property of browsers: you > > can't set an initial value for file input fields. This is a security > > measure, to stop malicious pages uploading files from your hard drive > > without your explici

Re: Django admin "Change password / Log out" urls wrong

2009-01-28 Thread Blixt
Ah, it certainly sounds like it! Thanks for the heads up! Regards, Andreas On Jan 28, 4:27 pm, Karen Tracey wrote: > On Wed, Jan 28, 2009 at 10:16 AM, Blixt wrote: > > > Hi there. > > > As the subject states, the urls for changing password and logging out > > are wrong, while the rest of the u

Re: Multithreaded development server

2009-01-28 Thread Almad
On 28 Led, 15:20, Ned Batchelder wrote: > Almad, you've pointed to ticket 10117 a few times now, but I don't see > how this has anything to do with a single-threaded server.  I think if > you could clarify that point, maybe we'd be able to make some progress > on this. True, I just got that feel

Re: Search in a ManyToManyField in Admin interface

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 6:19 AM, João Olavo Baião de Vasconcelos < joaool...@gmail.com> wrote: > Hi all, > > I'd like to search in a m2mfield using the search_fields trick in admin > interface (django 1.0.2). > > A simple example of models: > """ > class Book(models.Model): > title = models.Char

Re: Django admin "Change password / Log out" urls wrong

2009-01-28 Thread Karen Tracey
On Wed, Jan 28, 2009 at 10:16 AM, Blixt wrote: > > Hi there. > > As the subject states, the urls for changing password and logging out > are wrong, while the rest of the urls in the admin application are > correct. The problem with those two urls is that they start with > "admin/", even if I'm al

Django admin "Change password / Log out" urls wrong

2009-01-28 Thread Blixt
Hi there. As the subject states, the urls for changing password and logging out are wrong, while the rest of the urls in the admin application are correct. The problem with those two urls is that they start with "admin/", even if I'm already in the admin "directory." For them to work, they should

Re: Creating test databases. Nose framework

2009-01-28 Thread varikin
On Jan 27, 5:00 pm, Oleg Oltar wrote: > So if I have to store a User object in db (with fields (name, email, pass) > How should I define the fixture? Should I define it in setup? When I created my fixtures for my tests, I did ran[1] ./manage.py dumpdata auth > auth.json Then I just edited au

Re: Creating test databases. Nose framework

2009-01-28 Thread Oleg Oltar
Any idea? On Wed, Jan 28, 2009 at 11:41 AM, Oleg Oltar wrote: > Can't find how to add predefined data to the db. Sorry for being silly, > maybe someone can point me? > Please > > > On Wed, Jan 28, 2009 at 2:45 AM, Russell Keith-Magee < > freakboy3...@gmail.com> wrote: > >> >> On Wed, Jan 28,

ANN: Launch of the djangoproject.cz site

2009-01-28 Thread Plovarna
Hello, I would like call to attention to launch of the Czech site about the Django framework. Like other national versions, this web is targeted mainly to Django beginners. I hope that this site will speak to wide range of Czech developers and it will bring more popularity to Django in my c

Re: Adjusting these models for other functionality

2009-01-28 Thread Almost George
On Jan 27, 9:56 pm, Malcolm Tredinnick wrote: > On Tue, 2009-01-27 at 09:57 -0800,AlmostGeorgewrote: > > -- MODELS -- ( Other, unimportant fields/models have been removed ) > > >    class Band(models.Model): > >            name    = models.CharField(max_length = 50, unique = True) > > >    clas

Re: ObjectPaginator

2009-01-28 Thread Patricio Palma
Yeah, versions problems I fix it downloading the lasted rosetta version from svn. svn co http://django-rosetta.googlecode.com/svn/trunk/ Ty a lot --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Complex queries with datetime field

2009-01-28 Thread Stefan Tunsch
Hi! I have a calendar that permits multiple selections of dates. My view has to filter the data depending on the selected dates. I am unsure about how I can construct a query that filters correctly the data. I construct my list of datetime objects like this: list = request.session['selected_

Re: Django VBulletin auth backend

2009-01-28 Thread Bashar
Hello, Did you find a solution for this? i believe there are lots of bridges out there for joomla/vbulletin for example i think its doable in django easily for any python guy On Jan 14, 10:12 pm, "Chris H." wrote: > Has anybody done any work on writing a Django auth backend for an > existingVB

Re: File as data backend for model

2009-01-28 Thread Matthias Julius
Malcolm Tredinnick writes: > On Tue, 2009-01-27 at 17:13 -0500, Matthias Julius wrote: >> I am trying to write a model for which the data can be represented as >> a simple array of a fixed number of one byte integers. To use a >> SQL database for that would be very much overkill. I would simpl

  1   2   >