Re: IDE

2008-03-06 Thread Jarek Zgoda
gabriel napisał(a): > I am at the point of changing IDE before my next project ( a huge one ). > So far I've used Geany for python but now I am supposed to use django. > Is it anythong with special support for Django?? > > I know that recommendations include SPE and Eclipse but I wonder if you

all about django

2008-03-06 Thread Naruto
no much talking just click the link below and chose ur like to go and u`ll see by ur self bye :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us

Re: how to cache django javascript message file ('/jsi18n/') with apache (production setup)

2008-03-06 Thread alain D.
Thanks for the precise reply ... looking forward to know about your ideas on this matter ... --~--~-~--~~~---~--~~ 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@goog

Re: Iteration not working inside template

2008-03-06 Thread M.Ganesh
Malcolm Tredinnick wrote: > On Thu, 2008-03-06 at 09:17 +0530, M.Ganesh wrote: > >> Hi, >> >> I've pasted a minimalist code here: http://dpaste.com/hold/38198/ >> >> Only the table caption and the table headers show-up in the web page. >> The LunchEnrty_list.count also shows up correctly, but

Re: Advanced admin interface customization question

2008-03-06 Thread David Reynolds
On 5 Mar 2008, at 6:17 pm, Josh Ourisman wrote: > > There are two ways in which I want to customize the admin interface > for a project I'm working on. As far as I can tell, these sorts of > customizations aren't built in, but before I start trying to write > them myself I just want to make sure

Re: IDE

2008-03-06 Thread casseen
I use eclipse + pydev. Eclipse is a memory hungry monster( it's java based after all), but in my opinion its still the best free and open IDE out there. And its platform independent which is a double extra plus for eclipse. I see no use for a dedicated django plugin. Any python supporting IDE sho

MySql autocommit and Django

2008-03-06 Thread Amit Ramon
Hi, I'm writing a custom-sql method that uses SQL "select for update" for updating a table row. The table engine is InnoDB. I'm using Django svn and MySQL 5.0. The MySql default for autocommit is 1, i.e. enabled. The method I'm using looks somewaht like this: def get_next_index(id): from

form.ChoiceField

2008-03-06 Thread Monica Leko
Hi, how can I tell Django that model is ChoiceField, and therefore when I use form_from_model Django will draw radio buttons? Can admin interface have radio buttons for some models? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: IDE

2008-03-06 Thread Michael Newman
I would second vim for quick editing of django and python files, it is great once you get over a bit of a curve. Recently I needed an editor that let me work on a large Ajax file that I knew I would probably need a GUI for and am still in the 30 day trial for textmate( mac only). I am very

Re: Documentation Project [No django directly related]

2008-03-06 Thread Grupo Django
On 6 mar, 01:54, "James Bennett" <[EMAIL PROTECTED]> wrote: > On Wed, Mar 5, 2008 at 3:52 PM, Grupo Django <[EMAIL PROTECTED]> wrote: > > These anotations are not 100% real, I've been looking only for a few > > hours documentation about them, I don't know all the features of each > > system y

Widgets from admin app

2008-03-06 Thread M.Ganesh
Hi, How do I go about using the widgets that are used in the admin app in my own app? Regards Ganesh --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: IDE

2008-03-06 Thread Peter Herndon
I use vim a lot for, as Michael says, quick editing tasks. For longer coding sessions, I use Coda (http://www.panic.com/coda/). It's payware, and it's OS X only, but it is so easy and amazingly productive. You have a terminal session, WebKit-based browser, (S)FTP client, and a really decent tex

Re: IDE

2008-03-06 Thread Peter Danielczyk
I agree with casseen. Eclipse & Pydev works great for Django. See http://pydev.blogspot.com/2006/09/configuring-pydev-to-work-with-django.html for intructions. BTW: " is a memory hungry monster " --> 1 Gig RAM is 20-25 Dollars :-) > > I use eclipse + pydev. Eclipse is a memory hungry monste

ModelForm ManyToMany add

2008-03-06 Thread Alper Çugun
Hello, If I have a model with a ManyToMany relation, the django admin shows multiselect widgets with a plus so you can add the related objects on the spot. Is there a way to duplicate this functionality when rendering a form for the same model using newforms.ModelForm? Thanks, -- Alper Çu

Re: Can't redirect using HttpResponseRedirect with a form in a template inclusion tag

2008-03-06 Thread [EMAIL PROTECTED]
The only place you can have a redirect is in the view, you are treating the inclusion tag as if it was a separate view to be rendered and then included in the page, however this isn't how it works, the best way to do this would be to use the inclusion tag to simply place the form on the page, and

Re: Advanced admin interface customization question

2008-03-06 Thread [EMAIL PROTECTED]
On Mar 6, 12:42 pm, David Reynolds <[EMAIL PROTECTED]> wrote: > On 5 Mar 2008, at 6:17 pm, Josh Ourisman wrote: > > > There are two ways in which I want to customize the admin interface > > for a project I'm working on. As far as I can tell, these sorts of > > customizations aren't built in, but

Can't redirect using HttpResponseRedirect with a form in a template inclusion tag

2008-03-06 Thread A Hampton
I must be missing something, because I'm unable to redirect from a template tag. On my page, I want a form. There is only one box for input -- page number. The visitor enters a page number, it jumps to that page of the site. Instead of having to write it in every view, I wrote an inclusion_tag

Re: Can't redirect using HttpResponseRedirect with a form in a template inclusion tag

2008-03-06 Thread Thomas Guettler
A Hampton schrieb: > I must be missing something, because I'm unable to redirect from a > template tag. > Template tags create text which gets included in your HTML output. You need to redirect in your view method (python script). Or with javascript: Use a button with onclick="... location.hr

Re: sync flickr to my django blog

2008-03-06 Thread cjl
Check out: http://code.google.com/p/django-syncr/ -cjlesh --~--~-~--~~~---~--~~ 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

Newforms-admin: filter_horizontal doesn't work

2008-03-06 Thread Webchemist
Could anybody please explain what are the reasons for filter_horizontal doesn't work in newforms-admin? in models.py for the app: class Block(models.Model): title = models.CharField(max_length=255) code = models.CharField(help_text=u"Допустимы цифры и латинские заглавные буквы", max_leng

Re: form.ChoiceField

2008-03-06 Thread Thomas Guettler
Monica Leko schrieb: > Hi, how can I tell Django that model is ChoiceField, and therefore > when I use form_from_model Django will draw radio buttons? Can admin > interface have radio buttons for some models? > > If you want a list of radio buttons instead of a drop down box, you need a diffe

Re: IDE

2008-03-06 Thread Francis
coda looks very nice. I'm evaluating textmate and openkomodo before paying for something. I've used eclipse+pydev before, but everything seems to be made more complex than necessary(xyz steps for modules). Many web module are half-baked. Right now I am quite satisfied with textmate, I'll test c

loading fixtures for test suite

2008-03-06 Thread Eric Abrahamsen
I'm loading fixtures as part of a test suite, and finding that using manage.py loaddata directly produces different results than using the fixtures attribute of django's TestCase. Namely, Chinese characters in my database get interpreted correctly using loaddata, but running the tests prod

Re: loading fixtures for test suite

2008-03-06 Thread Eric Abrahamsen
Gah TEST_DATABASE_CHARSET Sorry. E On Mar 6, 11:44 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > I'm loading fixtures as part of a test suite, and finding that using > manage.py loaddata directly produces different results than using the > fixtures attribute of django's TestCase. N

Re: IDE

2008-03-06 Thread Floyd Arguello
I also use vim for quick editing tasks, and openkomodo for bigger tasks. Openkomodo does have Ajax support, and its a great all around ide. You might consider Aptana Studio for your Ajax file. They have a free version, and it's available for Windows, Mac, and Linux. No python support, so I sto

newforms 0.96.1 custom validation

2008-03-06 Thread Panos Laganakos
Trying to add custom validation for a customer creation form, but when I add: def clean_username(self): try: user = User.objects.get(username__exact=self.cleaned_data['username']) except User.DoesNotExist: return self.cleaned_data['username']

newforms 0.96.1 custom validation

2008-03-06 Thread Panos Laganakos
Trying to add custom validation for a customer creation form, but when I add: def clean_username(self): try: user = User.objects.get(username__exact=self.cleaned_data['username']) except User.DoesNotExist: return self.cleaned_data['username']

Re: newforms 0.96.1 custom validation

2008-03-06 Thread Malcolm Tredinnick
On Thu, 2008-03-06 at 08:45 -0800, Panos Laganakos wrote: > Trying to add custom validation for a customer creation form, but when > I add: > > def clean_username(self): > try: > user = > User.objects.get(username__exact=self.cleaned_data['username']) > except User.Does

Re: problems with url tag

2008-03-06 Thread msoulier
On Mar 5, 6:50 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > In the meantime, use the url(...) form for your url patterns and give > each one that might cause confusion a unique name. That way you can > refer to them uniquely in the {% url ... %} tag. Ok, I'll do that when the next Django r

Re: MySql autocommit and Django

2008-03-06 Thread Malcolm Tredinnick
On Thu, 2008-03-06 at 13:50 +0200, Amit Ramon wrote: [...] > I would appreciate if anyobe here could approve or disprove this behaviour, > or give any explanation: It's a requirement of the Python DB-API 2.0 (PEP 249) that auto-commit behaviour is turned off when a connection is opened. This is

Re: ModelForm ManyToMany add

2008-03-06 Thread Malcolm Tredinnick
On Thu, 2008-03-06 at 15:24 +0100, Alper Çugun wrote: > If I have a model with a ManyToMany relation, the django admin shows > multiselect widgets with a plus so you can add the related objects on > the spot. Is there a way to duplicate this functionality when > rendering a form for the same mod

Re: IDE

2008-03-06 Thread Joel
Two thumbs up for Eclipse+PyDev. Plus all the other Eclipse goodies: * Source control integration * Aptana for CSS, JS, and HTML editing PyDev even has a for-pay python debugger, although I don't use it. -- Joel Peter Danielczyk wrote: > I agree with casseen. > > Eclipse & Pydev works great f

0.96 custom django login problem

2008-03-06 Thread azormx
Hi, I am new to django, and I am trying to create a custom login application, from where the users might get access to other applications in the system. I can not get it to work, please, I need help. Project structure: txm--+--profile +--app1 +-- ap2 txm.urls ###

One session for all sites

2008-03-06 Thread Niklas Collin
Hi, does anyone know if it's possible to have a single session for all sites? Thanks for the help! Best regards, Niklas Collin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this

Re: Queryset returning unexpected results

2008-03-06 Thread Pigletto
On 6 Mar, 00:04, Darthmahon <[EMAIL PROTECTED]> wrote: > Ahh ok. Something like this then? > > qset = (Q(tags__title__icontains=query) | Q(title__icontains=query)) > results = Blog.objects.filter(qset).extra(LEFT OUTER JOIN tag ON > blog.tag = tag.id) No, because if you use 'tags__title__icontains

variations in referencing related models

2008-03-06 Thread george . kappel
This seem a little awkward so I want to make sure I am not missing anything in view code list = MyModel.objects.filter(client__description = 'ACME') list = MyModel.objects.select_related().order_by('clients_client.description')) in template code mymodel.client.description The awkward part is

MySQL warnings raise exception

2008-03-06 Thread Peter Baumgartner
I'm running the same script over the same flat file that inserts data into the same app and same MySQL server for 3 different projects. Two of the projects print warning messages when bad data is encountered: /usr/local/lib/python2.5/site-packages/django/db/models/base.py:238: Warning: Data trunca

Re: Queryset returning unexpected results

2008-03-06 Thread Julien
Hi, There are some bugs with OR lookups in some particular conditions. See for example: http://groups.google.com/group/django-users/browse_thread/thread/a4679cb9a42c6ba1/1e76718aa0097628?lnk=gst&q=julien+q+malcolm+bug#1e76718aa0097628 Malcolm Tredinnick has been developping the Queryset-refactor

datetime.date.today()

2008-03-06 Thread DuncanM
I want to create a model that doesn't ask for the users input on the date, it takes the days date automatically, I thought it would be as simple as doing: class News(models.Model): newsTitle = models.CharField("News Title", maxlength=200, core=True, help_text="Title of the news item e.g. websi

Re: datetime.date.today()

2008-03-06 Thread Michael
The reason this won't work is because in the models class everything is placed into the database. It is quite difficult to have different values be whatever and have it placed into the database in a coherent way. Check out the models documentation http://www.djangoproject.com/documentation/model-

Re: datetime.date.today()

2008-03-06 Thread Raisins
date needs to be a DateTimeField, and you can also use the built in auto_now_add date = models.DateTimeField(auto_now_add = True) On Mar 6, 5:05 pm, DuncanM <[EMAIL PROTECTED]> wrote: > I want to create a model that doesn't ask for the users input on the > date, it takes the days date automatica

Re: datetime.date.today()

2008-03-06 Thread Malcolm Tredinnick
On Thu, 2008-03-06 at 14:05 -0800, DuncanM wrote: > I want to create a model that doesn't ask for the users input on the > date, it takes the days date automatically, > > I thought it would be as simple as doing: > > class News(models.Model): > newsTitle = models.CharField("News Title", maxle

Re: 0.96 custom django login problem

2008-03-06 Thread Evert Rol
> I am new to django, and I am trying to create a custom login > application, from where the users might get access to other > applications in the system. I can not get it to work, please, I need > help. Well, what exactly isn't working? That may give people a better start on where to look than

Re: IDE

2008-03-06 Thread Tom Badran
Do people find eclipse+pydev reliable? I've tried it out a few times over the last year and it never seems to run for more than a few hours without dying. This is both the 3.2 (from eclipse.org and ubuntu packaged) and 3.3(from eclipse.org) using gcj or suns jvm. It does seem quite nice when its ru

Re: IDE

2008-03-06 Thread casseen
I also use eclipse under ubuntu. I observed crashes when running low on memory. I recently upgraded my RAM and eclipse is now rock solid. It could also help to increase eclipse's memory allocation. On Mar 6, 11:47 pm, "Tom Badran" <[EMAIL PROTECTED]> wrote: > Do people find eclipse+pydev reliable

Re: IDE

2008-03-06 Thread casseen
To change eclipse memory settings edit /usr/lib/eclipse/eclipse.ini -Xms value is the initial java heap size -Xmx value is the maximum java heap size On Mar 6, 11:47 pm, "Tom Badran" <[EMAIL PROTECTED]> wrote: > Do people find eclipse+pydev reliable? I've tried it out a few times over > the last

Re: IDE

2008-03-06 Thread fyleow
I like Komodo. It's free and has SFTP support. You can also get code intelligence to work with Django. It's also cross platform. It's a tad slow when loading but I find it works well. On Mar 5, 6:32 am, gabriel <[EMAIL PROTECTED]> wrote: > Hi , > > I am at the point of changing IDE before my next

Re: Flatpages

2008-03-06 Thread Michael
Te two items that might be different between the servers is that one doesn't have DEBUG set to false or doesn't have flatpages installed properly. On my development servers in order not to have to change the site name and url when I launch the site, I have my development computer under sites the u

Problem with encoding and feeds

2008-03-06 Thread [EMAIL PROTECTED]
I've read over some of the gotchas with since the unicode branch merge, and have successfully dealt with all of them up til now, but I'm not sure what to do here... I'm throwing an error with my feed. The same data appears on the site fine, but in my feed I get UnicodeEncodeError: 'ascii' codec ca

image dimensions

2008-03-06 Thread Eric Abrahamsen
I've become unable to use the get_IMAGEFIELD_dimensions() set of methods on images recently: using pic.get_picFile_width() (where picFile is my model's ImageField) returns this traceback: File "/Library/Python/2.5/site-packages/django/utils/ functional.py", line 55, in _curried retur

Re: IDE

2008-03-06 Thread Julien
+1 for Aptana+PyDev. On Mar 7, 10:23 am, fyleow <[EMAIL PROTECTED]> wrote: > I like Komodo. It's free and has SFTP support. You can also get code > intelligence to work with Django. It's also cross platform. It's a tad > slow when loading but I find it works well. > > On Mar 5, 6:32 am, gabriel <

Re: Problem with encoding and feeds

2008-03-06 Thread Brian Morton
2019 is an right single quote in unicode. Perhaps that title is causing the problem? Did you paste it from some editor that would have created it as that character rather than an apostrophe? Maybe you should correct that by hand if it was pasted. On Mar 6, 7:37 pm, "[EMAIL PROTECTED]" <[EMAIL

"form action" opinions?

2008-03-06 Thread cjl
DU: I'm playing around with forms (newforms), and a common way of handling forms seems to be a template that does this: With a view that does this: if request.method == 'POST': process the form, then redirect... else: display the blank form... OK - I think I understand this. My questio

Custom form where fields in Form do not match Model

2008-03-06 Thread Michael Lake
Hi all I'm having problems in saving a custom form. The form presents list of choices for a user. In the model the choices are stored single string field 'choices'. But in my form I wish to present a list of choices and concatenate them together to save into the model. - Hence the model has 'choi

Re: datetime.date.today()

2008-03-06 Thread Michael.R.Lake
DuncanM wrote: > I want to create a model that doesn't ask for the users input on the > date, it takes the days date automatically, > Also I would ideally like the author to be autopopulated by whoever > posts the item using the admin interface. How would I do this? In your models.py includ

Re: datetime.date.today()

2008-03-06 Thread speleolinux
Hi Oops, I said > Then in the place where you need the 'user' use this: > self.who = str(threadlocals.get_current_user()) In your case it will be self.author Mike --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups