view_func.__module__ suddenly broken

2013-02-26 Thread Greg Donald
port 2.0.1-0ubuntu15.1 2.0.1-0ubuntu17.1 2013-01-25 03:41:06 upgrade python-apport 2.0.1-0ubuntu15.1 2.0.1-0ubuntu17.1 I also tried rearranging my middleware list, didn't help. Any idea what else might be causing this issue? Thanks. -- Greg Donald -- You received this message b

Re: last changed by User

2012-09-27 Thread Greg Donald
On Thu, Sep 27, 2012 at 10:28 PM, Lachlan Musicman <data...@gmail.com> wrote: > I wanted to display the user that last changed a model instance. I use django-reversion for this: https://github.com/etianen/django-reversion -- Greg Donald -- You received this message be

django 1.4 memory issues

2012-06-12 Thread Greg Donald
urt. So everything is running fine again, but something changed in Django 1.4 that causes my same project code to leak memory. I'd sure like to figure it out. Thanks. -- Greg Donald -- You received this message because you are subscribed to the Google Groups "Django users" g

Re: Django vs. Ruby on Rails

2012-01-28 Thread Greg Donald
me. Django feels like a sure bet. Maybe I'm just old, but sometimes I get the feeling Rails is being built by some kids in someone's basement. -- Greg Donald -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Logging into CSRF protected Django site using Curl?

2012-01-08 Thread Greg Donald
this seems awfully convoluted. Is this the only to login to a Django > site that uses CSRF protection? https://docs.djangoproject.com/en/1.3/ref/contrib/csrf/#exceptions I use this on views that my mobile apps post to. -- Greg Donald -- You received this message because you are subscribed

Re: Which Linux distro to use on EC2?

2011-11-20 Thread Greg Donald
ption: http://www.freebsd.org/commercial/isp.html -- Greg Donald -- 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 d

Re: Which Linux distro to use on EC2?

2011-11-15 Thread Greg Donald
ill land in the same place, so dependency issues are usually extremely low. -- Greg Donald -- 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 gro

Re: sorl thumbnail

2011-06-15 Thread Greg Donald
So what does one use for thumbnails when sorl thumbnail works great in development but fails on two different production servers? -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit

Re: sorl thumbnail

2011-06-11 Thread Greg Donald
uploaded image is not corrupt. The only thing left is permissions, and they are as open as they can be. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send em

Re: sorl thumbnail

2011-06-10 Thread Greg Donald
at > up.image is an ImageField. It is, it's a sorl thumbnail ImageField to be exact. -- Greg Donald destiney.com | gregdonald.com -- 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@googlegroup

Re: sorl thumbnail

2011-06-10 Thread Greg Donald
On Fri, Jun 10, 2011 at 11:59 AM, Greg Donald <gdon...@gmail.com> wrote: >  File "/usr/local/lib/python2.6/dist-packages/PIL/ImageFile.py", line > 52, in raise_ioerror >   raise IOError(message + " when reading image file") > > IOError: broken data strea

sorl thumbnail

2011-06-10 Thread Greg Donald
essage + " when reading image file") IOError: broken data stream when reading image file The error isn't very helpful since the file is there and is readable by all. I'm not sure how to get a more explicit error, or what to try and fix. Stuck. Thanks, -- Greg Donald destiney.

Re: ImageField issue

2011-06-08 Thread Greg Donald
s import File >     f = open('/tmp/hello.world') >     myfile = File(f) >     et.image.save( image_name, myfile ) > > https://docs.djangoproject.com/en/1.3/ref/models/fields/#django.db.models.FieldFile.save I see now.. got it working. Thanks. -- Greg Donald destiney.com | gr

ImageField issue

2011-06-08 Thread Greg Donald
ning a str, it spews a bunch of what appears to be image data when I debug it. Any idea what I'm doing wrong? Thanks. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gro

Re: boolean default

2011-05-17 Thread Greg Donald
no default set. -- Greg Donald destiney.com | gregdonald.com -- 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

Re: boolean default

2011-05-17 Thread Greg Donald
eld default to false and not provide a value at all when I created a new record. -- Greg Donald destiney.com | gregdonald.com -- 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@google

boolean default

2011-05-15 Thread Greg Donald
How do I set a default for a BooleanField() ? I tried foo = models.BooleanField( default=False ) but that only produces foo boolean NOT NULL, Docs do not mention how as far as I can tell http://docs.djangoproject.com/en/1.3/ref/models/fields/#booleanfield -- Greg Donald destiney.com

Re: existing data failing validation

2011-05-15 Thread Greg Donald
ven though it's right there in the post data. This is so overly complicated. What is the point of having a model form if you're just going to exclude important things from it to cheat to get by an edit form? -- Greg Donald destiney.com | gregdonald.com -- You received this message because you

Re: existing data failing validation

2011-05-15 Thread Greg Donald
ude previously set data? ipdb> form.errors {'company': [u'This field is required.']} -- Greg Donald destiney.com | gregdonald.com -- 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@googl

Re: existing data failing validation

2011-05-14 Thread Greg Donald
( max_length=32 ) class ContactForm( ModelForm ): class Meta: model = Contact name = CharField( required=True ) The fields failing validation are ones I'm not re-submitting back in my edit form. Am I supposed to list company again in my ContactForm class? Guess I can go t

existing data failing validation

2011-05-14 Thread Greg Donald
not providing fields already set. form = ContactForm( request.POST, instance=contact ) form.errors says I need to provide a company, but it is already saved in the database. What am I missing here? -- Greg Donald destiney.com | gregdonald.com -- You received this message because you

Re: form new versus edit

2011-05-14 Thread Greg Donald
nvention for getting my name field HTML rendered, I naturally tried {{ form.id }}, but it doesn't seem to know about Django conventions I don't guess. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users&q

Re: form new versus edit

2011-05-14 Thread Greg Donald
ield( widget=TextInput( attrs={ 'class':'myclass' } ) ) in a single place for all my CharField types? -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: form new versus edit

2011-05-14 Thread Greg Donald
of thought has gone into the > project, and if something's there it's probably for a really good reason. > When you choose not to follow a Django convention and run into a problem > then don't be surprised. I didn't realize trying to access my own form data directly was unconventional, m

Re: form new versus edit

2011-05-14 Thread Greg Donald
I do use {{ form.name }} then I have to set CSS attributes for every field using: name = forms.CharField( widget=forms.TextInput(attrs={'class':'special'})) How is that better than just writing a simple field myself? -- Greg Donald destiney.com | gregdonald.com -- You received this message becau

Re: form new versus edit

2011-05-14 Thread Greg Donald
On Sat, May 14, 2011 at 4:08 PM, Shawn Milochik <sh...@milochik.com> wrote: > On 05/14/2011 05:04 PM, Greg Donald wrote: >> >> I have a "new" contact form.  If I post it, and it has error, I found >> (while debugging, not documented that I can find) that I

form new versus edit

2011-05-14 Thread Greg Donald
throws an exception. What am I doing wrong? I'd really like to just have my one _form.html template included in both my add.html and my edit.html templates. How can I do that when the form doesn't even work the same between new versus editing? Thanks. -- Greg Donald destiney.com | gregdonald.c

Re: using django on a server?

2011-05-09 Thread Greg Donald
On Mon, May 9, 2011 at 11:02 PM, Eric Chamberlain <e...@rf.com> wrote: > We use Amazon Web Services and can change our setup on an hourly basis. Do they support DNS yet, or are you still responsible for that yourself? -- Greg Donald destiney.com | gregdonald.com -- You received thi

Re: using django on a server?

2011-05-09 Thread Greg Donald
u can install what you want. The question of "Does my host support that?" becomes irrelevant. You can support whatever because you can install whatever. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "

Re: using django on a server?

2011-05-09 Thread Greg Donald
to "support" anything nowadays. -- Greg Donald destiney.com | gregdonald.com -- 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 gr

Re: Encrpting urls to hide PKs

2011-05-09 Thread Greg Donald
ver, and only give the client an identifier of that data. Yeah, sounds exactly like a session-based cookie. -- Greg Donald destiney.com | gregdonald.com -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to d

Re: form name from the POST request

2007-09-10 Thread Greg Donald
On Tue, 11 Sep 2007, Oleg Korsak wrote: > Hello. How can I get a form name from the POST request? As far as I know it's not sent. Use a hidden field to identify the form server side. > Also how can I explore a "request" object to see what it contains? print '%s' % request

Re: Performance for django for years

2007-09-10 Thread Greg Donald
to code as: > > class A(models.Model): > year = models.CharField(maxlength=4) > [...] > > or > class A(models.Model): > year = models.PossitiveIntegerField() > [...] > > what it's the best for database performance (I use mysql) For performance an unsigned smallint

Re: Integrating Django with existing site.

2007-09-04 Thread Greg Donald
coming URLs that aren't yet in your new Django app before they get to it, sending them to the legacy app instead. http://httpd.apache.org/docs/2.2/mod/mod_rewrite.html http://howto.kryl.info/mod_rewrite/ -- Greg Donald Cyberfusion Consulting http://cyberfusionconsulting.com/ --~--~-~--

Re: Does the django admin support the Group?

2007-09-03 Thread Greg Donald
On Tue, Sep 04, 2007 at 04:56:47AM -, Bear wrote: > For instance, Group A can access all the tables but Group B just > access some of them? http://www.djangobook.com/en/beta/chapter06/ There's a small section "Users, groups, and permissions", about halfway down the page.

send_mail() doesn't handle extra headers?

2007-08-31 Thread Greg Donald
or is there a better way? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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 unsubs

Re: dynamic filtering in a QuerySet

2007-08-30 Thread Greg Donald
On 8/30/07, daev <[EMAIL PROTECTED]> wrote: > > widgets = widgets.filter( **filters ) When I try that I get the error: filter() keywords must be strings Does that have anything to do with the fact that they are unicode? filters: {u'LOB': u'B'} -- Greg Donald http://

dynamic filtering in a QuerySet

2007-08-30 Thread Greg Donald
eval() and all sort of back tick and quoting combinations, nothing seems to work. Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: mysql/pkg_resources problem

2007-08-16 Thread Greg Donald
On 8/16/07, Greg Donald <[EMAIL PROTECTED]> wrote: > I have a new Django setup I'm trying to finish up the install for. > I'm getting this error: > > Error loading MySQLdb module: No module named pkg_resources I figured it out. I built my MySQL from source but forgot to ad

mysql/pkg_resources problem

2007-08-16 Thread Greg Donald
nks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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 grou

Re: The Django Book

2007-08-06 Thread Greg Donald
You get what you pay for. And pretty soon there will be a Django book you can pay for :) -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this gr

Re: Where did you put your homepage view?

2007-05-23 Thread Greg Donald
On 5/23/07, David Larlet <[EMAIL PROTECTED]> wrote: > I'm juste curious, where did you put your homepage view when you've > got a project with a lot of apps? Is there a best practice here? I usually make a home controller. Then I typically use an index action for the home page view

Re: How well should I know Python before using Django?

2007-05-09 Thread Greg Donald
Debugging. When you get stuck, and you will get stuck, you need to know best way to get unstuck. Being able to interrogate your environment is debugging skill #1. -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this mess

Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald
4 libs while in verbose mode of running > ldconfig. You wanna put the libs path of your new python install in there, something like /usr/local/python2.5/lib or whatever yours is exactly. After that run ldconfig so your system knows to look there for shared libraries from now on. --

Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald
our locate database is up to date. Run `updatedb` when in doubt. Some other things to check: Did you restart Apache? Are you compiling a new Python from source? If so did you add the Python libs path to your ld.so.config? Did you run ldconfig

Re: Upgrade from Python 2.4 to 2.5

2007-05-07 Thread Greg Donald
On 5/7/07, RollyF <[EMAIL PROTECTED]> wrote: > How do I configure Apache2 or mod_python to use Python 2.5? Adjust your paths so the place where you installed your new Python 2.5 is ahead of your old Python's path. -- Greg Donald http://des

Re: Django IDE

2007-04-05 Thread Greg Donald
way and I've looked many times. :( -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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@googlegro

Re: Any books available

2007-04-05 Thread Greg Donald
On 4/5/07, Frank <[EMAIL PROTECTED]> wrote: > Looking for books on django. http://www.djangobook.com/ -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Djang

Re: development server

2007-03-29 Thread Greg Donald
en _finally_ I'm back in business. I realize I could forgo the fixing of bash by just hitting up and enter, but then any future debugging sessions would require typing blind to step through code and interrogate variables and stuff, not fun. -- Greg Donald http://

Re: development server

2007-03-29 Thread Greg Donald
bash prompt, it locks up, I have to hit Ctrl + C, then restart it. Are you saying this is not normal? What can I do to fix it? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

development server

2007-03-29 Thread Greg Donald
goes away and I again have to restart the development server. What is up with that? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: newbie - deploy error

2007-03-27 Thread Greg Donald
NGS_MODULE mysite.settings > PythonDebug On > Here's what I use in development: http://destiney.com/blog/django-apache-vhost -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Group

Re: foreign key filtering

2007-03-26 Thread Greg Donald
On 3/26/07, RajeshD <[EMAIL PROTECTED]> wrote: > Try this: > msgs = Messages.active.filter(project__active=True) Yup. Thanks. -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: sql log

2007-03-26 Thread Greg Donald
pment. Tailing all the SQL queries created by the code I'm writing, however, is. -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: sql log

2007-03-26 Thread Greg Donald
simple since I am the page requester. -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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

foreign key filtering

2007-03-26 Thread Greg Donald
this for active project filtering: msgs = Messages.active.filter( Q( project=project.id, project.active=True ) ) Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: sql log

2007-03-26 Thread Greg Donald
I don't really know what I'm looking for without tab completion. I barely know with it. Any idea how to make pdb use ipython? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

filters/sql

2007-03-26 Thread Greg Donald
:Error binding parameter 2 - probably unsupported type. I can do pretty much any part of the filtering by itself and it works, just not all together like I need it. What's the correct way to do this sort of a query/filter? Thanks, -- Greg Donald http://destiney.com

Re: tuples into a select list

2007-03-23 Thread Greg Donald
On 3/23/07, Greg Donald <[EMAIL PROTECTED]> wrote: > Could not parse the remainder: [0] Solved. I found it was c.0 and c.1 that I needed. -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are s

tuples into a select list

2007-03-23 Thread Greg Donald
I have some tuples like this: categories = ( ( 'a', 'abc' ), ( 'b', 'def' ) ) How can I build select options from that in a template? When I try this: {% for c in categories %} {{ c[1] }} {% endfor %} I get this error: Could not parse the remainder: [0] Thanks, -- Greg Donald http

adding to User class

2007-03-22 Thread Greg Donald
How/where can I add a method to the built-in User class? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

sql log

2007-03-13 Thread Greg Donald
How can I see the sql Django produces? Is it being logged somewhere or can I configure Django to log it somewhere? I realize I can look at the logs from my db server but I'm wanting just the queries produced by Django itself. Thanks, -- Greg Donald http://destiney.com

Re: model validation

2007-03-11 Thread Greg Donald
m mysite.groceries.models import List In [3]: l = List(name='', created_at=datetime.datetime.now()) In [4]: l.save() In [5]: l.name Out[5]: '' What am I missing here? -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because

Re: model validation

2007-03-10 Thread Greg Donald
uot; exactly? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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 u

model validation

2007-03-10 Thread Greg Donald
Why doesn't this prevent me from entering an empty string into the database? name = models.CharField(maxlength=32, blank=False, null=False) Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: debugging/breakpointing

2007-03-09 Thread Greg Donald
On 3/9/07, Ned Batchelder <[EMAIL PROTECTED]> wrote: > PDB lets you do what you want. Yup.. thanks. Is there a way to get tab completion working? Or make it use ipython? I seem to have command history, but not across sessions? -- Greg Donald http://des

Re: debugging/breakpointing

2007-03-09 Thread Greg Donald
s there some listener script I need to run? > just before the django > handler is called. After that you can step, set breakpoints, etc. Is there a tutorial or howto for all of this? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~--

debugging/breakpointing

2007-03-09 Thread Greg Donald
. Failing that, could someone point me to the best practices page or whatever for debugging Django? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users&q

howto add join table field?

2007-03-08 Thread Greg Donald
? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ 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 th

Re: apache vhost /media issue

2007-03-04 Thread Greg Donald
On 3/4/07, akonsu <[EMAIL PROTECTED]> wrote: > i had the same error which went away after i added "Allow" directive > in to my httpd.conf. Order deny,allow Allow from all That was indeed the fix. Thanks. -- Greg Dona

apache vhost /media issue

2007-03-04 Thread Greg Donald
dia folder into the Django app directory at one point, no help. Other than the media files, my Django app functions perfectly. Any idea what I'm doing wrong or what else can I do to debug this? Thanks, -- Greg Donald http://destiney.com/ --~--~-~--~~~---~--~~ Yo