Re: request.user -> logout

2007-11-08 Thread Malcolm Tredinnick
On Thu, 2007-11-08 at 23:30 -0800, globophobe wrote: > This is probably a simple question, but once I've a logged-in user > with django.contrib.auth.authenticate what is the recommended way to > log out the user? Having a look in the documentation for the appropriate module is always a good

request.user -> logout

2007-11-08 Thread globophobe
This is probably a simple question, but once I've a logged-in user with django.contrib.auth.authenticate what is the recommended way to log out the user? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

strange custome sql

2007-11-08 Thread [EMAIL PROTECTED]
i have such in one app: try: connection = MySQLdb.connect(user="root",passwd="root",host="",db="django") except: print "Could not connect to MySQL server." exit( 0 ) cursor =

Re: booleanfield and required = true

2007-11-08 Thread Malcolm Tredinnick
On Fri, 2007-11-09 at 06:26 +, Milan Andric wrote: > > > On Nov 9, 12:02 am, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > > Shouldn't the form give errors and not validate? > > > > Nope. It's a bit tricky, though. The problem is that HTML forms do not > > send *anything* for a

Re: booleanfield and required = true

2007-11-08 Thread Milan Andric
On Nov 9, 12:02 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Shouldn't the form give errors and not validate? > > Nope. It's a bit tricky, though. The problem is that HTML forms do not > send *anything* for a checkbox that you don't check. So missing data for > a checkbox field means

Re: booleanfield and required = true

2007-11-08 Thread Malcolm Tredinnick
On Fri, 2007-11-09 at 05:40 +, Milan Andric wrote: > I might be misunderstanding the documentation about BooleanField. > http://www.djangoproject.com/documentation/newforms/#booleanfield > > but it seems if i have : > > >>> class Foo(forms.Form): > bool =

booleanfield and required = true

2007-11-08 Thread Milan Andric
I might be misunderstanding the documentation about BooleanField. http://www.djangoproject.com/documentation/newforms/#booleanfield but it seems if i have : >>> class Foo(forms.Form): bool = forms.BooleanField(required=True) >>> f=Foo({}) >>> f.is_valid() True >>>f.cleaned_data {'b':

Re: Dynamic ImageField

2007-11-08 Thread cschand
Hi Marcin It's working... Thankyou very much :) cschand On Nov 8, 6:46 pm, Marcin Mierzejewski <[EMAIL PROTECTED]> wrote: > Hi, > > Yes, you > can:http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic...http://code.djangoproject.com/wiki/CustomUploadAndFilters > > Regards, >

Re: Unexpected logouts with latest from svn

2007-11-08 Thread Malcolm Tredinnick
On Thu, 2007-11-08 at 22:53 +, [EMAIL PROTECTED] wrote: > Yesterday I updated my Django svn checkout from r6300 to HEAD > (r6658). After doing this, I began to experience a problem that was > not present before the update. When a user accesses a view that saves > session variables, the view

Re: Will there be a django 0.97 release ?

2007-11-08 Thread Malcolm Tredinnick
On Thu, 2007-11-08 at 21:17 +, kahless wrote: [...] > So are there any plans on releasing a 0.97 ? The next release will almost certainly be written as "1.0". Making releases isn't a trivial thing. Along with the stabilisation period prior to a release, there's the implicit "end-of-life"

Re: webhostingbuzz, anyone tried

2007-11-08 Thread Eric Abrahamsen
> On 08-Nov-07, at 10:42 PM, [EMAIL PROTECTED] wrote: > >> I'm also on webfaction, and like it. The most basic plan is pretty >> skimpy on server RAM (simply enabling debug on my site put it over >> the >> limit, and I was the only one accessing it) > > if you tweak apache a bit and make sure

Re: __str__(self) for ManyToManyField

2007-11-08 Thread Malcolm Tredinnick
On Thu, 2007-11-08 at 09:11 -0800, Xan wrote: > Hi, > > I have these models: > > class A(models.Model): > > [...] > def __str__(self): > return "(%s, %s)" % (self.estudi, self.curs) > > > class Admin: > pass > > and > > class B(models.Model): > >

Re: webhostingbuzz, anyone tried

2007-11-08 Thread Kenneth Gonsalves
On 08-Nov-07, at 10:42 PM, [EMAIL PROTECTED] wrote: > I'm also on webfaction, and like it. The most basic plan is pretty > skimpy on server RAM (simply enabling debug on my site put it over the > limit, and I was the only one accessing it) if you tweak apache a bit and make sure media goes

Unexpected logouts with latest from svn

2007-11-08 Thread [EMAIL PROTECTED]
Yesterday I updated my Django svn checkout from r6300 to HEAD (r6658). After doing this, I began to experience a problem that was not present before the update. When a user accesses a view that saves session variables, the view will return the correct output, but the user will thereafter find

Re: Will there be a django 0.97 release ?

2007-11-08 Thread RajeshD
> as far as i understand it, django applications are ment to be > pluggable.. how big are the odds that you'll find two applications > which would work with the same django trunk revision ? I didn't mean that your app would stop working at all on any other revisions. Just that you can

Re: Best Django Blogs

2007-11-08 Thread RajeshD
A lot of the Blogs on the community aggregator are worth following. To me, the B-List deserves a special mention for its valuable tips and tricks -- it's invaluable to newbies, and often has insightful write ups for the seasoned users as well. Thanks, James!

Re: Will there be a django 0.97 release ?

2007-11-08 Thread kahless
On Nov 8, 10:53 pm, RajeshD <[EMAIL PROTECTED]> wrote: > I understand the concern, but how does having a 0.97 release change > this for you? There would still be potentially backwards-incompatible > changes moving forward from 0.97 to the next official release. of course there will be

Re: context_instance needs documenting on the same page as render_to_response?

2007-11-08 Thread RajeshD
> This page doesn't even show up on the first page of results so it > isn't surprising people miss it. Worth adding a mention to the docs? Worth opening a ticket too :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Multiple arguments to a template filter

2007-11-08 Thread RajeshD
On Nov 8, 4:49 pm, jim <[EMAIL PROTECTED]> wrote: > I am writing some custom template filters. How does one transmit > multiple arguments to a filter. eg. > > {{ form.errors|dynamicformfield:"pass",1,"firstname" }} > > my dynamicformfield filter has the following signature: > > def

Re: Will there be a django 0.97 release ?

2007-11-08 Thread RajeshD
> > So are there any plans on releasing a 0.97 ? I hope you understand my > concerns - django is really great and the trunk is stable but I understand the concern, but how does having a 0.97 release change this for you? There would still be potentially backwards-incompatible changes moving

Multiple arguments to a template filter

2007-11-08 Thread jim
I am writing some custom template filters. How does one transmit multiple arguments to a filter. eg. {{ form.errors|dynamicformfield:"pass",1,"firstname" }} my dynamicformfield filter has the following signature: def dynamicformfield(value, firstpart, midpart, lastpart): I always get a error

Re: Problem with "auto_now_add" in Admin interface

2007-11-08 Thread RajeshD
On Nov 8, 2:17 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Here's a ticket that looks like it describes your problem: > > http://code.djangoproject.com/ticket/1030 > > It's still open but it looks like the last comment might provide a > workaround, depending on the version of Django you are

Will there be a django 0.97 release ?

2007-11-08 Thread kahless
Hi, Sorry if these questions are getting boring since everyone wants to know when the next release (and 1.0) is released .. but i haven't found a answer by searching the forums... After so many backward incompatible changes it would be really nice if there would be a new django release. I want

Re: webhostingbuzz, anyone tried

2007-11-08 Thread Chris Hoeppner
Is anyone on the MediaTemple Django Container Beta Program? El jue, 08-11-2007 a las 17:59 +, hass escribi�: > I too am on webfaction, it's worth it, and dirt cheap. > > > > --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Problem with "auto_now_add" in Admin interface

2007-11-08 Thread Karen Tracey
Here's a ticket that looks like it describes your problem: http://code.djangoproject.com/ticket/1030 It's still open but it looks like the last comment might provide a workaround, depending on the version of Django you are running. Karen On 11/8/07, kevinski <[EMAIL PROTECTED]> wrote: > > > I

Problem with "auto_now_add" in Admin interface

2007-11-08 Thread kevinski
I am building a simple wiki and I am having trouble with my models: from django.db import models class Wikipage(models.Model): title = models.SlugField(primary_key=True) creator = models.CharField(maxlength=25) post_date = models.DateTimeField(auto_now_add=True) class Admin:

Re: parsing Django RSS feeds for content reposting

2007-11-08 Thread Ramdas S
Thanks. But I am looking at a platform independent solution, if any. Javascript looked to be the only option as a client side script pulling data from Django based web app. RS On Nov 8, 2007 8:37 PM, David Reynolds <[EMAIL PROTECTED]> wrote: > > > On 8 Nov 2007, at 1:49 pm, Ramdas S wrote: >

Re: webhostingbuzz, anyone tried

2007-11-08 Thread hass
I too am on webfaction, it's worth it, and dirt cheap. --~--~-~--~~~---~--~~ 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

Re: webhostingbuzz, anyone tried

2007-11-08 Thread girzel
I'm also on webfaction, and like it. The most basic plan is pretty skimpy on server RAM (simply enabling debug on my site put it over the limit, and I was the only one accessing it), but you'll be fine if you take a bit of care with the setup. Django works straight out of the box, and their

__str__(self) for ManyToManyField

2007-11-08 Thread Xan
Hi, I have these models: class A(models.Model): [...] def __str__(self): return "(%s, %s)" % (self.estudi, self.curs) class Admin: pass and class B(models.Model): estudi_oferit = models.ManyToManyField('A', blank=True, null=True)

Re: The Django admin interface optimized for iPhone/iPod touch

2007-11-08 Thread Jannis Leidel
On 11/8/07, Josh <[EMAIL PROTECTED]> wrote: > > What a great idea! I don't (currently) have any devices that would be > able to use this, but I'll keep it in mind. The screenshots look > great too! Thanks Josh! I haven't tried the interface on other devices (e.g. Opera Mini) but it should

Taconite + jquery + Django

2007-11-08 Thread Brian Costlow
Just thought I'd pass this along. I've been lurking about learning as I work on a couple of Django-based projects, and thought it was time to share something back. I've been having a lot of success with this combination in an app I've been tweaking and extending the past week. It's basically a

Re: The Django admin interface optimized for iPhone/iPod touch

2007-11-08 Thread Josh
What a great idea! I don't (currently) have any devices that would be able to use this, but I'll keep it in mind. The screenshots look great too! On Nov 8, 6:55 am, "Jannis Leidel" <[EMAIL PROTECTED]> wrote: > Hi Users, > > I'm very glad to introduce to you django-mobileadmin[1], something >

Re: parsing Django RSS feeds for content reposting

2007-11-08 Thread David Reynolds
On 8 Nov 2007, at 1:49 pm, Ramdas S wrote: > Hi, > > I do not know how much of this post is relevant from point of Django! > Here is what I am looking at! > > I have a regular RSS feed for a blog created using Django's > contrib.feed. Can some one suggest the best practice to have >

Re: webhostingbuzz, anyone tried

2007-11-08 Thread Joe
I use webfaction and I've found them to be great. J On Nov 8, 2:19 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hi guys. > These guys seem to have very tempting packages. They say they support > django. What I'd like to know is what kind of support? Do I have to > install it on my home

Re: query set from ModelMultipleChoice

2007-11-08 Thread Carl Karsten
Carl Karsten wrote: > This works, but there has to be a better way: > > class blastSettings(forms.Form): >users = forms.ModelMultipleChoiceField(queryset=User.objects.all() > > u=x.cleaned_data['users'] > users = User.objects.filter(id__in=[x.id for x in u]).values() > >

The Django admin interface optimized for iPhone/iPod touch

2007-11-08 Thread Jannis Leidel
Hi Users, I'm very glad to introduce to you django-mobileadmin[1], something which I desperately needed because using the Django admin interface is just annoying with MobileSafari on the iPhone/iPod touch platform. So, "mobileadmin" is an alternative admin interface for Django for use with the

parsing Django RSS feeds for content reposting

2007-11-08 Thread Ramdas S
Hi, I do not know how much of this post is relevant from point of Django! Here is what I am looking at! I have a regular RSS feed for a blog created using Django's contrib.feed. Can some one suggest the best practice to have content from the RSS feed made available on other web sites probably

Re: Dynamic ImageField

2007-11-08 Thread Marcin Mierzejewski
Hi, Yes, you can: http://scottbarnham.com/blog/2007/07/31/uploading-images-to-a-dynamic-path-with-django/ http://code.djangoproject.com/wiki/CustomUploadAndFilters Regards, Marcin On Nov 8, 2:08 pm, cschand <[EMAIL PROTECTED]> wrote: > Hi all, > Can we make dynamic ImageFields? upload file

Dynamic ImageField

2007-11-08 Thread cschand
Hi all, Can we make dynamic ImageFields? upload file to /media/avatar/ username or userid/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: How to select all the values from my Field attribute 'choices?

2007-11-08 Thread Marty Alchin
On 11/8/07, äL <[EMAIL PROTECTED]> wrote: > Do I have an error in the import syntax? How can I import ROLE? You don't. Just import Karateka and use Karateka.ROLE. -Gul --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Using auth in model

2007-11-08 Thread Dan Fairs
> > My question above can be simplified as "how to get logged-in user with > request parameter" request.user will give you the logged-in user. If you want to know more about Django profile support, read the docs: http://www.djangobook.com/en/beta/chapter12/ You want the profiles section,

Re: webhostingbuzz, anyone tried

2007-11-08 Thread Tim Chase
> These guys seem to have very tempting packages. They say they support > django. What I'd like to know is what kind of support? Do I have to > install it on my home folder, or is it preinstalled on their servers? I know two folks using WHB, though not for Django. Both are using the basic

Collaborative NGOs "Before it is too late" (Children in the street). COLABORE!

2007-11-08 Thread LIBERTAD!!!
Collaborative NGOs "Before it is too late" (Children in the street). COLABORE! You have to maintain at all times the concsciencia what happens. Stay loose and free. Do not be patterns, but the entire society will seek to formártelo. Stay in nature. If you feel anger, let her be, it will ...

Re: How to select all the values from my Field attribute 'choices?

2007-11-08 Thread äL
Hi, If I try to import ROLE I get an the error "cannot import name ROLE" views.py ### CODE ### def Karateka_edit(request, karateka_id): from kav.info.models import Karateka, ROLE roles= [y for x,y in ROLE] try: karateka = Karateka.objects.get(id = karateka_id)

Re: problem with Django

2007-11-08 Thread Graham Dumpleton
On Nov 8, 7:20 pm, stranger <[EMAIL PROTECTED]> wrote: > God.. How stupid I am ? Everytime I encounter you I am safe. thanks a > lot I am getting the page. > So how to make apache server media files? > > In httpd.conf I added the Location directive to the project directory > is it

Re: problem with Django

2007-11-08 Thread stranger
How can I contact you when I am in need any email or messenger please On Nov 8, 12:20 am, stranger <[EMAIL PROTECTED]> wrote: > God.. How stupid I am ? Everytime I encounter you I am safe. thanks a > lot I am getting the page. > So how to make apache server media files? > > In

Re: problem with Django

2007-11-08 Thread stranger
God.. How stupid I am ? Everytime I encounter you I am safe. thanks a lot I am getting the page. So how to make apache server media files? In httpd.conf I added the Location directive to the project directory is it enough... On Nov 8, 12:16 am, Graham Dumpleton <[EMAIL PROTECTED]>

Re: problem with Django

2007-11-08 Thread Graham Dumpleton
On Nov 8, 7:13 pm, stranger <[EMAIL PROTECTED]> wrote: > Ya mapper is an application in crimemap project. There is an empty > __init.py__ file. > Currenly this is the only url i am using.. > > (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), Put quotes around the second value in

Re: problem with Django

2007-11-08 Thread Graham Dumpleton
You only need to worry about a separate media server if your site is going to get large volumes of traffic or you are serving large media files. For the average user they need not worry about such things, so don't concern yourself for now about it. Graham On Nov 8, 7:11 pm, stranger <[EMAIL

Re: problem with Django

2007-11-08 Thread stranger
Ya mapper is an application in crimemap project. There is an empty __init.py__ file. Currenly this is the only url i am using.. (r'^crime/([a-zA-Z]+)', crimemap.mapper.views.crime_by_type), http://localhost:8000/crime/arson should yield me the resulting view but i am getting an error I

Re: problem with Django

2007-11-08 Thread stranger
Also can anyone suggest me how to setup a webserver to serve media files like css, images, javascripts. I heard that we should not use the same webserver django is using. I am using Apache httpd currently. So if i want to use lighttpd for media how to configure it. Also the lighttpd wont run

Re: problem with Django

2007-11-08 Thread Graham Dumpleton
Are you saying the directory hierarchy is: /home/priya/projects/crimemap /home/priya/projects/crimemap/mapper What is the full contents of urls.py? If 'mapper' is a subdirectory of 'crimemap', does that directory contain at least an empty __init__.py file? Graham On Nov 8, 7:02 pm,

Re: problem with Django

2007-11-08 Thread stranger
Hello Graham, I tried the method u told me...But still the same result. Let me clear a few things. I created a new project "crimemap" in /home/ priya/projects/ and app "mapper" inside crimemap. Now I am getting an error when i run the server. python manage.py runserver Error while