Re: django transactions.

2011-06-08 Thread Marc Aymerich
On Tue, Jun 7, 2011 at 11:53 PM, Malcolm Box wrote: > n 7 June 2011 15:16, Marc Aymerich wrote: >> >> Hi, >> I've activated the >> 'django.middleware.transaction.TransactionMiddleware' and I've >> decorated one method with @transaction.commit_on_success >> With this I expect that if the method ra

Bug? Duplicate search results in admin when ManyToMany relationships are used

2011-06-08 Thread Nikolai Prokoschenko
Hello, yesterday, I tried upgrading my project to Django 1.3 from 1.2.4. One peculiar problem has arised: when I searched for users in the admin area, I suddenly had duplicated search results for some users. After comparing the queries with 1.2.4 it seems to me that a DISTINCT clause has been m

Re: VERY cheap django hosting?

2011-06-08 Thread Chris Lawlor
Always Data (http://www.alwaysdata.com) has a free plan, but it is quite limited (you only get 10 MB disk space). On Jun 8, 2:39 am, Maksymus007 wrote: > megiteam.pl is 24PLN which is about 8usd a month:) > > Pozdrawiam, Maksymilian Pawlak > 08-06-2011 08:30 użytkownik "raj" napisał:> Hey guys,

Re: VERY cheap django hosting?

2011-06-08 Thread roberto
http://www.asmallorange.com/ On Jun 8, 10:17 am, Chris Lawlor wrote: > Always Data (http://www.alwaysdata.com) has a free plan, but it is > quite limited (you only get 10 MB disk space). > > On Jun 8, 2:39 am, Maksymus007 wrote: > > > > > > > > > megiteam.pl is 24PLN which is about 8usd a month:

Django solved tutorial for download??

2011-06-08 Thread Pardini Andres
Hi guys, I am looking for django tutorial solved, for downloading If anyone has a link, please share it :) Cheers!! -- 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 unsubsc

Django Inline Autocomplete

2011-06-08 Thread George Cummins
Is it possible to filter an inline autocomplete field by a dynamic value entered by a user? For example, I have a an admin form where staff enters games information including home and visiting team, game date and time, score, etc. They also enter individual player names and stats. I would like to

Django Class Based FormView and multiple forms

2011-06-08 Thread Michel Thadeu Sabchuk
Hi guys, Is there a general guideline to work with class based generic views and multiple forms? I already use FormView but it seems focused on a single form. Suppose a user profile registration: with function based views, I use two forms, one for the user account and other for the profile. I ca

Re: Add custom html between two model fields in Django admin's change_form

2011-06-08 Thread christian.posta
Well, there are a couple things you could do: for the PresupuestoAdminForm, you could do this to the CharField: name = forms.CharField(max_length=100, widget=forms.TextInput(attrs={'readonly': 'readonly'})) (note the CharField is from the 'forms' package, not the 'models' you'll also need to r

tuple comparison to make one tuple

2011-06-08 Thread MikeKJ
I have 3 tuples of email addresses, I want to compare the 3 against each other to make a single tuple of email addresses with no duplicates, any ideas? -- View this message in context: http://old.nabble.com/tuple-comparison-to-make-one-tuple-tp31802229p31802229.html Sent from the django-users ma

Re: tuple comparison to make one tuple

2011-06-08 Thread Tom Evans
On Wed, Jun 8, 2011 at 5:34 PM, MikeKJ wrote: > > I have 3 tuples of email addresses, I want to compare the 3 against each > other to make a single tuple of email addresses with no duplicates, any > ideas? >>> t1 = ( 'a...@b.com', 'b...@b.com', 'c...@b.com' ) >>> t2 = ( 'a...@b.com', 'a...@c.com'

Re: tuple comparison to make one tuple

2011-06-08 Thread Jason Culverhouse
On Jun 8, 2011, at 9:41 AM, Tom Evans wrote: > On Wed, Jun 8, 2011 at 5:34 PM, MikeKJ wrote: >> >> I have 3 tuples of email addresses, I want to compare the 3 against each >> other to make a single tuple of email addresses with no duplicates, any >> ideas? > t1 = ( 'a...@b.com', 'b...@b.c

Trouble with simple aggregation

2011-06-08 Thread Thomas Weholt
Say I got a model like so: class Article(models.Model): title = models.CharField(max_length=100) text = models.TextField() category = models.CharField(max_length=20) author = models.CharField(max_length=50) Article.objects.create(title="Foo", text="Story about foo", category="adve

Re: VERY cheap django hosting?

2011-06-08 Thread Anoop Thomas Mathew
Hi all, It would be a good idea to check out hostrail.com which provides really cheap vps' . I've been using it for last 6+ months and seems to be pretty good @ 1.4$/month for 256 MB vps. You can easily fetch some good promos to get cheap rates from them. Regards, Anoop Thomas Mathew On 8 Jun 2011

Re: Trouble with simple aggregation

2011-06-08 Thread Ian Clelland
On Wed, Jun 8, 2011 at 10:11 AM, Thomas Weholt wrote: > Say I got a model like so: > > class Article(models.Model): >title = models.CharField(max_length=100) >text = models.TextField() >category = models.CharField(max_length=20) >author = models.CharField(max_length=50) > > Article

Django 1.3 Email Errors

2011-06-08 Thread Mike
So am am ready to deploy using apache/modwsgi. However I noticed that I am not getting emailed 500 errors. In my settings file I have: LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'class'

Re: best framework/reusable app for caching model instances (object level cache) ?

2011-06-08 Thread Nan
I'm looking into caching options at the moment too. Did you end up using django-cache-utils? Is it working out for you? On May 17, 12:36 pm, stargazer wrote: > After looking at these libraries... I think the best solution would be > not use these kind of libraries (ORMcache) at all. > > The @c

Re: VERY cheap django hosting?

2011-06-08 Thread Nan
Seconding the suggestion of asmallorange.com -- one of the best inexpensive hosts I've used. I haven't run Django on their servers, but it can be made to run using FastCGI (there are instructions on their wiki somewhere). On Jun 8, 2:30 am, raj wrote: > Hey guys, > Just wondering if you could gi

Re: ANN: django-supervisor: easy integration between django and supervisord

2011-06-08 Thread Ethan Jucovy
This is really excellent - thanks for releasing it. -Ethan On Tue, Jun 7, 2011 at 10:51 PM, Ryan Kelly wrote: > > Hi All, > > > I've just released a little experiment in combining the process > management awesomeness of supervisord with the convenience of Django's > management scripts. It's c

ImageField issue

2011-06-08 Thread Greg Donald
I have a model EventType that has an ImageField named image. When I post my image upload form I can upload an image with no problems. But when I try to save() an image from the file system I get the error: 'str' object has no attribute 'chunks' Here is my code: et = EventType( name=name ) et

Re: ImageField issue

2011-06-08 Thread Daniel Roseman
On Wednesday, 8 June 2011 20:40:35 UTC+1, Greg Donald wrote: > > I have a model EventType that has an ImageField named image. > > When I post my image upload form I can upload an image with no problems. > > > But when I try to save() an image from the file system I get the error: > > 'str' object h

[Django 1.2] Admin ForeignKey edit link?

2011-06-08 Thread Micky Hulse
Hi, Looks like ticket #13165 is the way to go, but I thought I would ask the group before I consider applying the patch. I would love to have an "edit" pencil link for my model's FKs. Other than applying the patch, are there any good work-arounds out there? I was considering extending/overridin

Re: [Django 1.2] Admin ForeignKey edit link?

2011-06-08 Thread Micky Hulse
On Wed, Jun 8, 2011 at 12:51 PM, Micky Hulse wrote: > Looks like ticket #13165 is the way to go, but I thought I would ask > the group before I consider applying the patch. Ooops, here's the link to the ticket: -- You received this message because

Re: ImageField issue

2011-06-08 Thread Greg Donald
On Wed, Jun 8, 2011 at 2:51 PM, Daniel Roseman wrote: > But that "bunch of image data" is a string - because that's what .read() > returns. > The FileField documentation [1] shows how to save a disk file to a field: >     from django.core.files import File >     f = open('/tmp/hello.world') >    

Re: VERY cheap django hosting?

2011-06-08 Thread Tiago Almeida
I use http://djangohosting.ch/ for a small company website and haven't experienced any issues on the last 4 months. It is a shared hosting account but the machine is quite beefy and always idle :) you pay 12€ every 3 months. It is very easy to deploy django project there, unlike vps where you have

Re: VERY cheap django hosting?

2011-06-08 Thread Alasdair Nicol
I have used djangohosting.ch before and recommend them. As BR says it's very easy to deploy, and I thought their support was super. Alasdair On 08/06/11 22:13, Tiago Almeida wrote: I use http://djangohosting.ch/ for a small company website and haven't experienced any issues on the last 4 month

Re: Parsing feeds that are imported

2011-06-08 Thread Chris McComas
Chris, Thanks, the django community aggregator is built on top of the Universal Feed Parser. I figured out the zip codes function of my app. What I can't figure out is why when I add a m2m model to my update_feeds.py does not work. As far as I can tell in the update_feeds doesn't access the Feed

Re: VERY cheap django hosting?

2011-06-08 Thread Bobby Roberts
i've been using webfaction.com for a while for $9/mo with one click django installs. You can also checkout www.slicehost.com if you want your own vps and more control. -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

send_mail issue

2011-06-08 Thread Bobby Roberts
hi all... i'm trying to send an email attachment and am getting the following traceback: global name 'EmailMessage' is not defined Here's the code: [...] from django.core.mail import send_mail list2send = mymodel.objects.filter(idNumber = 3) filecontent = render_to_string('template_

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
that should be message = EmailMessage(subject, emailmsg,'fromem...@domainname.com',to_email,attachments=(filename,filecontent,'application/ vnd.ms-excel')) -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dja

Re: send_mail issue

2011-06-08 Thread Kenneth Gonsalves
On Wed, 2011-06-08 at 17:35 -0700, Bobby Roberts wrote: > global name 'EmailMessage' is not defined where does 'EmailMessage' come from? -- regards KG http://lawgon.livejournal.com Coimbatore LUG rox http://ilugcbe.techstud.org/ -- You received this message because you are subscribed to the Goo

Re: send_mail issue

2011-06-08 Thread David Graves
from django.core.mail import EmailMessage On Wed, Jun 8, 2011 at 7:35 PM, Bobby Roberts wrote: > hi all... i'm trying to send an email attachment and am getting the > following traceback: > > global name 'EmailMessage' is not defined > > Here's the code: > > [...] >from django.core.mail impo

Re: VERY cheap django hosting?

2011-06-08 Thread ApogeeGMail
+1 for webfaction On Jun 8, 2011, at 8:29 PM, Bobby Roberts wrote: > i've been using webfaction.com for a while for $9/mo with one click > django installs. You can also checkout www.slicehost.com if you want > your own vps and more control. > > -- > You received this message because you are sub

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
hey david... that got past he original error but now i'm getting this: _create_attachment() takes at most 4 arguments (37 given) i think this is happening from the content argument maybe? any idea how to get around that? On Jun 8, 8:38 pm, David Graves wrote: > from django.core.mail import E

Re: Django 1.3 Email Errors

2011-06-08 Thread Mike
Sorry for the chatter. I tracked her down. An easy test is to try: from django.core import mail mail.mail_admins('subk','ssdf') If that doesn't work then the logging won't. My logging test, was wrong. I should have used the named logger 'django.request': logger = logging.getLogger('django.requ

Re: send_mail issue

2011-06-08 Thread David Graves
From https://docs.djangoproject.com/en/dev/topics/email/#django.core.mail.EmailMessagelooks like attachments argument should be a list of tuples, so instead of attachments=(filename,filecontent,'application/vnd.ms-excel'), try attachments=[(filename,filecontent,'application/vnd.ms-excel')]. If tha

Re: send_mail issue

2011-06-08 Thread Bobby Roberts
got it... worked like a charm. i read that but it didn't click the first time. thanks again! On Jun 8, 9:50 pm, David Graves wrote: > Fromhttps://docs.djangoproject.com/en/dev/topics/email/#django.core.mail > like attachments argument should be a list of tuples, so instead of > attachments=

Re: VERY cheap django hosting?

2011-06-08 Thread raj
Ya, i think as a first timer, I'm gunna go with something that is non- vps. I'll learn about preconfiguring stuff when the time comes. I think djangohosting.ch looks the best. But asmallorange and alwaysdata also look appealing. Thanks all. On Jun 8, 8:58 pm, ApogeeGMail wrote: > +1 for webfactio

Re: VERY cheap django hosting?

2011-06-08 Thread raj
Actually, I might reconsider, What do you guys think of hostgator? They also have django hosting with fastcgi, And there's is shared hosting. Pros, cons? Thanks -Raj On Jun 9, 12:27 am, raj wrote: > Ya, i think as a first timer, I'm gunna go with something that is non- > vps. I'll learn about prec

How to use django-batchimport

2011-06-08 Thread mongoose
Hi there, I am trying to use django-batchimport that I got from http://code.google.com/p/django-batchimport/ It's function is to allow for importing/exporting of data from excel into and out of django models. There is no documentation on the new version(which is still not so new). I am hoping othe