Re: ImportError at/ No module name

2015-11-07 Thread Scott Anderson
We just tripped across something similar here as well. The person doing the tutorial had flipped the 'startup' and 'put "blog" in the INSTALLED_APPS' steps of the tutorial. She commented out 'blog' from INSTALLED_APPS and startapp worked as intended. -scott On Sunday, August 11, 2013 at

Re: Question about static file serving strategy with S3 and Cloudfront

2014-07-03 Thread Scott Anderson
This is what we do, although we don't use query strings as some network appliances don't respect them with respect to caching. We use a virtual directory instead: //example.com/static//images/blancmange.png Where is obtained like this: $ git log --oneline | wc -l | awk '{ print $1; }' And

Re: django-php - yeah, it happened.

2014-02-28 Thread Scott Anderson
On Feb 28, 2014, at 1:51 PM, Rafał Pitoń wrote: > You should give Jinja and projects like django-jinja a look then. They are > exactly what you want: Twig like template system for Django. Thanks, but that’s not the piece I need. I’m happy with Django’s templates and I

Re: django-php - yeah, it happened.

2014-02-28 Thread Scott Anderson
Well, things like Twig are based on Django templates. We're currently migrating from PHP to Django, and if something like Django-PHP made that easier I would most definitely use it. To be honest I wish there were a Twig-like solution for Django. We're going to try adding the missing tags to

Re: Terrible performance when dropping into raw SQL Oracle

2014-02-27 Thread Scott Anderson
Are you timing the query in the view specifically, or the entire view? That is, do you know for sure that it is *only* the query that is taking 16 seconds and not the rest of the view? -scott On Wednesday, February 26, 2014 5:53:15 PM UTC-5, Shawn H wrote: > > I said that before testing it.

Re: new to Django and building web applications. Advice with postgresql

2013-05-21 Thread Scott Anderson
On May 21, 2013, at 8:04 AM, Tom Evans wrote: > > The purpose of using an ORM is to make your application database > agnostic. You should not find that changing DB engine is overly > taxing. Theoretically, yes. The difference between theory and practice is very small in theory, and not so much

Re: new to Django and building web applications. Advice with postgresql

2013-05-19 Thread Scott Anderson
On Sunday, May 19, 2013 11:18:07 AM UTC-4, WongoBongo wrote: > You don't have to become an expert with postgres to use Django. You can do > most of the db development using SQLite and hold off on postgres until you > are ready to deploy. I highly recommend *against* waiting for PostgreSQL

Re: How many workers do you run on one machine using django celery?

2013-04-21 Thread Scott Anderson
You can't test a system like this by sending one message: you're just testing the latency, not throughput. Latency is the end-to-end time it takes for a single message to make its way through the system. Throughput is the number of total messages per second that can make their way through. As

Re: Django-Registration/Custom Authentication Issue

2013-04-17 Thread Scott Anderson
That's good to know. How stable is it? -scott Via mobile phone On Apr 17, 2013, at 3:52 AM, James Bennett wrote: Current hg tip is actually 1.5-compatible, in the sense that if you want to use your own User model, you just subclass the provided stuff and plug in your

Re: Django-Registration/Custom Authentication Issue

2013-04-16 Thread Scott Anderson
Django registration is not compatible with custom user models in Django 1.5, as it directly references django.contrib.auth.models.User in several places. If you want to maintain your own copy you can swap those refs for those of your own User model. -scott Via mobile phone On Apr 16, 2013, at

Re: make_template_fragment_key is in what version?

2013-04-11 Thread Scott Anderson
Derp, my fault, thanks. I don't know how I missed that. Odd that that was the page that showed up first in the search results too. Regards, -scott On Apr 11, 2013, at 8:24 PM, James Bennett wrote: > Notice that your URL marks the version of Django as 'dev' -- that means it's > the

make_template_fragment_key is in what version?

2013-04-11 Thread Scott Anderson
Hello all, The public current version cache docs reference make_template_cache_key: https://docs.djangoproject.com/en/dev/topics/cache/ django.core.cache.utils.make_template_fragment_key(fragment_name, vary_on=None) If you want to obtain the cache key used for a cached fragment, you can use

Re: Arithmetic operations in a templete

2007-09-14 Thread Scott Anderson
the original point: why does Django adhere to such a nannyish philosophy, and how do you solve the problem I presented *within Django* in a reasonable way? Thanks and regards, -scott anderson On Thu, 2007-09-13 at 23:46 -0500, James Bennett wrote: > On 9/13/07, Scott Anderson <[EMAIL PROTECTED]&

Re: Arithmetic operations in a templete

2007-09-14 Thread Scott Anderson
n ''parrotButton-%s" % self.id > domid = property(_domid) > > and use parrot.domid in your templates. > > On 14 sep, 06:46, "James Bennett" <[EMAIL PROTECTED]> wrote: > > On 9/13/07, Scott Anderson <[EMAIL PROTECTED]> wrote: > > >

Re: Arithmetic operations in a templete

2007-09-13 Thread Scott Anderson
s %}, and filters, and being able to parse my tags any way I wish. I just need a bit more... What I'm hoping, however, is that this missive was moot, because you'll say, "no, Scott, you should just do *this*:", followed by an elegant and reasonable solution that I, as a relative

Re: javascript options

2006-08-15 Thread Scott Anderson
On Tue, 2006-08-15 at 10:34 +0200, Steven Armstrong wrote: > > and prototype [rails fame] > > - extends builtins (e.g. Object) which kills for in loops and has other > ugly implications This hasn't been true for a few releases now with respect to exending Object, but yes, that was probably the

Re: Django neophyte question.

2006-08-14 Thread Scott Anderson
Gloria, Try: python manage.py runserver dev.blah.server.com: or python manage.py runserver 11.22.33.44: where 11.22.33.44 is the external numeric IP address of dev.blah.server.com. Regards, -scott On Mon, 2006-08-14 at 20:11 -0700, Gloria wrote: > Hi. I am a Python geek who has

Re: how can I build this query?

2006-06-24 Thread Scott Anderson
Not a problem, Eric, glad to be of help. You could also do this: ContentType.objects.filter(app_label__exact='aiyo', model__in=('content', 'product')) which is more concise and may treat the query optimizer in your database better. Regards, -scott On Sat, 2006-06-24 at 17:00 +, nkeric

Re: how can I build this query?

2006-06-24 Thread Scott Anderson
Try: ContentType.objects.filter( (Q(app_label__exact='aiyo') & Q(model__exact='content')) | (Q(app_label__exact='aiyo') & Q(model__exact='product')) ) Regards, -scott On Sat, 2006-06-24 at 09:06 -0700, nkeric wrote: > sqlite> select * from django_content_type where (app_label='aiyo'

Re: Using offset and limit to produce a blog archive

2006-06-20 Thread Scott Anderson
You should find what you're looking for here: http://www.djangoproject.com/documentation/url_dispatch/#example Regards, -scott On Tue, 2006-06-20 at 12:18 +, [EMAIL PROTECTED] wrote: > Hi All, > > I'm in the process of learning Django by example - creating a blog > application. > SO, I

Re: Ajax support, there is no need for reinventing the wheel

2006-06-04 Thread Scott Anderson
This is endemic with all asynchronous Javascript work, no matter what the back-end. You have to make sure to trap both successes and failures in the Javascript code -- I don't know how mochikit does that, but with prototype you need to specify an onFailure hook to get errors. Regards, -scott

Re: Ajax support, there is no need for reinventing the wheel

2006-06-04 Thread Scott Anderson
I'm sorry, but I can't agree. I've used DWR as well, and the "server generates your Javascript to include" model really creates a lot of problems, both with versioning and performance. Simple is best. I've had the best luck with straightforward use of the prototype.js Ajax class. Regards,

Re: Rich Text Editor for BBCOde?

2006-06-01 Thread Scott Anderson
On Thu, 2006-06-01 at 11:43 +, [EMAIL PROTECTED] wrote: > > All this may sound a bit (very?) paranoid for a small community portal > site. The large number of comment spamming, SPAM and exploits against > phpBB sites, etc. show that some people just don't play fair. You don't > really want

Re: Improper quoting using extra() in Postgres

2006-06-01 Thread Scott Anderson
Great, thanks Adrian! Works perfectly, and man that was quick. ;-) Regards, -scott On Wed, 2006-05-31 at 23:49 -0500, Adrian Holovaty wrote: > On 5/31/06, Scott Anderson <[EMAIL PROTECTED]> wrote: > > The problem is that either Django or the driver is quoting the funct

Improper quoting using extra() in Postgres

2006-05-31 Thread Scott Anderson
Hi all, I'm using the extra() method to add a calculated field to my object: Table.objects.extra(select={'level':'nlevel(hierarchy)'}) where nlevel is a function defined in my PostgreSQL database. The problem is that either Django or the driver is quoting the function instead of inserting it

Re: Please help with project setup

2006-05-30 Thread Scott Anderson
TinyMCE (http://tinymce.moxiecode.com/) is an RTE that was extremely easy to integrate with Django for me. There are processors which can convert HTML to PDF, as well, but how well they work depends on the HTML and CSS being used. Regards, -scott On Tue, 2006-05-30 at 11:22 +, Kristoffer

Adding a specialized database type

2006-05-29 Thread Scott Anderson
Hi all, I'd like to add a specialized data type for PostgreSQL: the contrib/ltree type. I've found the DATA_TYPES hash in the backend creation objects, but my question is this: What's the least intrusive, best way to add this mapping for my application? I could: 1) modify the Django source

Re: Tagging app

2006-05-25 Thread Scott Anderson
Luke, I'm definitely interested, since I've been thinking about doing this very thing. Regards, -scott On Fri, 2006-05-26 at 00:57 +0100, Luke Plant wrote: > Hi all, > > I've been writing some tagging functionality for my site, and I've > developed it in a way that is reusable and generic,

Re: Problem with Django Captcha

2006-05-19 Thread Scott Anderson
Imaging > and > pycrypto (if you want to use the register app in that SVN) > > If you want, feel free to ping me on irc (my nick is firemansam) or > Skype: iholsman / gtalk: kryton _at_ gmail.com > and we'll get it sorted out for you. (and post back the answer here >