Re: Django or TurboGears for a new survery application?

2006-11-05 Thread iain duncan
On Sun, 2006-05-11 at 14:27 -0600, Adrian Holovaty wrote: > On 11/5/06, Matt Culbreth <[EMAIL PROTECTED]> wrote: > > So, based on this, my initial leaning had been to go to TurboGears. My > > thoughts were that the application is not interested in content > > management or display, and that I'd l

Admin problems when object is created by a view

2006-11-03 Thread iain duncan
If I create a new instance of a database object from a view, this item appears fine in the database and even in the changelist view of the admin, but clicking on the item ( as if going to delete or edit it ) just gets a template error. Anyone know why this is? Ie in the the view method we have h

Re: OT: MySQL to SQLite?

2006-11-03 Thread iain duncan
I do this kind of thing a lot, and find it's much much easier to have MySQL on both machines and use mysqldump. A big advantage of two mysql specific installs is that you can use mysqldump with the field name option and it will still work fine even if you are changing models. I write little bash s

Re: Is Django the right tool for the job?

2006-11-03 Thread iain duncan
On Fri, 2006-03-11 at 13:17 +, elake wrote: > Thanks. Thats what I thought. I think that we are going to put up a > site that is all from a WYSIWYG and in the background I am going to > work on a Django powered site. Would you recommend Postgres over MySQL > or the other way around? I think t

Re: Is Django the right tool for the job?

2006-11-02 Thread iain duncan
> I am working with a small team to create a new web site for our > church. > We have found a site (http://www.prestonwood.org) that we would like > to > use as a model and I am wondering if django is the right tool for the > job. I looked at other django powered sites (http://www.ljworld.com/, >

Admin template variable reference?

2006-11-01 Thread iain duncan
Wondering if there exists somewhere some documentation listing *all* of the template variables available in the various admin views. If not, I think such a thing would be really really useful. Thanks Iain --~--~-~--~~~---~--~~ You received this message because y

Re: Changing admin template for only certain models

2006-10-31 Thread iain duncan
On Tue, 2006-31-10 at 20:19 -0600, James Bennett wrote: > On 10/31/06, iain duncan <[EMAIL PROTECTED]> wrote: > > I would like to change the template ( or change behaviour ) for the > > change list view, but only for one model. Can anyone tell me how one > > could fin

Re: Changing admin template for only certain models

2006-10-31 Thread iain duncan
> When Django renders the list, it looks for the following templates, in > order, and uses the first one it finds: > > admin/appname/modelname/change_list.html > admin/appname/change_list.html > admin/change_list.html > > Where 'appname' and 'modelname' are the names of the application and > th

Re: Changing admin template for only certain models

2006-10-31 Thread iain duncan
On Tue, 2006-31-10 at 20:19 -0600, James Bennett wrote: > On 10/31/06, iain duncan <[EMAIL PROTECTED]> wrote: > > I would like to change the template ( or change behaviour ) for the > > change list view, but only for one model. Can anyone tell me how one > > could fin

Changing admin template for only certain models

2006-10-31 Thread iain duncan
I would like to change the template ( or change behaviour ) for the change list view, but only for one model. Can anyone tell me how one could find out in the template which model we are representing? Or alternately, where in the admin code one might add extra variables to render to the template?

Adding a button to admin view?

2006-10-31 Thread iain duncan
Hi folks, I would like to add a custom form button to the admin interface somehow and am not sure how to go about it. I want to add a "download now" button the list view for some file entries, so it needs to be a link to file. Any idea how this should be done? Thanks Iain --~--~-~--~

Smartest way to integrate pulldown menus?

2006-10-27 Thread iain duncan
Just wondering if anyone has any recos for best toolkit/library/widget/approach to adding dynamic pull down menus to a Django app. I am leaning towards using mochikit and dojo whenever possible because of their adoption by python frameworks, but I am also happy to use whatever fits. Lost in the se

Dojo vs Mochikit for Django dev?

2006-10-17 Thread iain duncan
I have not dug into either Dojo or Mochikit yet and am wondering if one is more suited to Django dev than the other for adding AJAX type bells and whistles. Pros and Cons of either? Thanks Iain --~--~-~--~~~---~--~~ You received this message because you are subsc

Re: Hosting on GoDaddy?

2006-10-15 Thread iain duncan
On Sun, 2006-15-10 at 08:20 +, [EMAIL PROTECTED] wrote: > Ian, > > First off congrats on the project and your good sense to do it in > Django. :) I've not used Python CGI but I presume it follows the > standard cgi model of having to launch a new process for each request. > This will craw

Hosting on GoDaddy?

2006-10-14 Thread iain duncan
I just landed a job for a python CMS and custom shopping cart, but unfortunately the client has recently purchased 5 years of hosting from GoDaddy. Go Daddy says it supports Python CGI. He is prepared to switch hosts and bite the cost if need be, but obviously would prefer not to. Can anyone on

How to override the admin save method?

2006-10-14 Thread iain duncan
I got some previous advice on overriding how the admin does delete which was pretty straightforward as it does just uses a url. The Save button doesn't seem to work that way. I would like to save a file name not as it is given, but in an altered format based on another field, so before the file g

order respect to problem

2006-10-10 Thread iain duncan
Has anyone got this working? Or any other way of ordering items in the admin interface by foreign key? I get error messages in the admin interface with the example below, as far as I can tell it is like the manual. Example from manual: class Answer(models.Model): question = models.ForeignKey

Re: Re: What IDE do you use? (semi-OT)

2006-10-08 Thread iain duncan
On Sun, 2006-08-10 at 21:39 -0500, James Bennett wrote: > On 10/8/06, iain duncan <[EMAIL PROTECTED]> wrote: > > - the python interface for gvim ( allows running a python interpreter > > within vim that can in turn call methods on the vim buffers ). > > Hooray for

Re: What IDE do you use? (semi-OT)

2006-10-08 Thread iain duncan
> > > It's got all the "standard" features: syntax highlighting, > > indentation, etc., but it's also got so much more. The > > text-manipulation things it can do run circles around everything else, > > it's got support for Subversion and WebDAV, it has an insanely > > powerful editing file brow

Re: Shopping carts with Django?

2006-09-29 Thread iain duncan
On Fri, 2006-29-09 at 12:14 -0700, alex kessinger wrote: > http://satchmo.python-hosting.com/ > > is an attempt to make an ecommerce site using django Wicked cool. I'll subscribe. When do we get name something Lester or Prez? Guess I'd have to invent it. ;) Thanks Iain Oh yeah, to the Satchmo

Shopping carts with Django?

2006-09-29 Thread iain duncan
Hi everyone. I've done a couple of few django CMS sites now and have in the past done a complete custom ecommerce-cms-order tracking system in php. Now I have a client that I would like to use Django with and they need a simple but customized shopping cart system. Wondering what folks are using to

Re: I'm so confused...

2006-09-25 Thread iain duncan
On Tue, 2006-26-09 at 07:50 +0530, Kenneth Gonsalves wrote: > > On 26-Sep-06, at 2:20 AM, Julio Nobrega wrote: > > > committed, and learn 2 programming languages, Javascript and Python, > > plus HTML. > > and SQL and CSS If you are new to coding, I would suggest that you focus on the python st

Re: I'm so confused...

2006-09-25 Thread iain duncan
On Mon, 2006-25-09 at 20:44 +, [EMAIL PROTECTED] wrote: > Well Iain perhaps I should shut up and try it first! > > I've set up a laptop to try a clean install of python without > corrupting my current webdev setup. If you're willing to try it, more power to you! I'd recommend picking up a co

Re: I'm so confused...

2006-09-25 Thread iain duncan
On Mon, 2006-25-09 at 20:20 +, [EMAIL PROTECTED] wrote: > Ok, > > I decided that I don't want to spend $1,000s on other people coding my > databases etc so I thought Django looked pretty good. I read some of > the code and it seems pretty intuitive (with a lot of hard work!) > > Now my probl

Re: Fast hosting for Django

2006-09-25 Thread iain duncan
On Mon, 2006-25-09 at 03:01 -0400, David Sissitka wrote: > With a VPS you could install mod_python, either building Apache with it or by > loading it dynamically. For more information, see the documentation: > > http://www.modpython.org/live/current/doc-html/installation.html > > I know for a f

Re: Fast hosting for Django

2006-09-24 Thread iain duncan
On Sun, 2006-24-09 at 23:18 -0400, David Sissitka wrote: > I am a WebFaction customer, definitely not a bad company. A few > thoughts about WebFaction: > > 1) It's a one man show, at least, support is. Support ticket response > times are anywhere from three hours to a day and a half. > 2) The co

Fast hosting for Django

2006-09-24 Thread iain duncan
I know this has been asked many times, but as new hosting solutions pop up continually, just wanted to check on recommendations for good fast shared hosting that is Django friendly and reliable for business clients. Thanks Iain --~--~-~--~~~---~--~~ You received

Javascript image preloading problems from tempates

2006-07-17 Thread Iain Duncan
Hello fellow djangoers. I've been doing a gallery site that is too image heavy for it's own good ( yes, I'm subcontracted by a graphic designer ... ), and am trying to find good ways to control image loading so that the user will wait and then see all the numerous and large images at the same time

Re: Free video of the Jenna Jameson

2006-07-16 Thread Iain Duncan
carlito556 wrote: > Free video of the Jenna Jameson > > at http://www.rosapink.net Jenna Jameson and Django Reindhardt, who knew? Those jazz players are always trouble ... ; ) Iain "I'm all in favour of grants for jazz musicians. Or any other brand of scotch" -- Eddie Condon --~--~-~

Re: Django vs. Rails vs. Symfony: Django is fastest

2006-07-14 Thread Iain Duncan
Andy Dustman wrote: > On 7/14/06, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > >>On Jul 14, 2006, at 1:18 PM, Adrian Holovaty wrote: >> >>>Some folks benchmarked Symfony, Ruby on Rails and Django. Django was >>>the fastest. >> >>By over 30% -- hell yeah! >> >>Now, I've always known in my gut

Re: Set up problems ( webfaction )

2006-07-13 Thread Iain Duncan
> Now my only remaining hurdle ( db migration was surprisingly easy! ) is > those admin media files. I notice you have > > alias /media/ /home2/bmg/django/django/contrib/admin/media/ > > and that you have loaded the alias module from > loadmodule alias_module /etc/httpd/modules/mod_alias.so >

Re: Set up problems ( webfaction )

2006-07-13 Thread Iain Duncan
> in your apache config do something similar to > http://svn.zyons.python-hosting.com/trunk/zilbo/conf/zyons.conf.tmpl > > and that will let the apache handle the 'images' area of your site > instead of django. > > On 14/07/2006, at 12:02 PM, Iain Duncan wrote

Set up problems ( webfaction )

2006-07-13 Thread Iain Duncan
I'm setting up a sight on webfaction, and so far things are coming along ok, but I can't figure out how to serve images. I've never used a shared hosting setup that didn't have a directory called 'public' or 'htdocs'. Has anyone on here used them? Any tips on where I need to put media and what I n

Re: IBM Article on TurboGears (w / Django Comparison)

2006-07-12 Thread Iain Duncan
Good read Ian, thanks for the post. Iain Ian Maurer wrote: > IBM has published the 2nd part in my two-part series on Web > Development frameworks. > > http://www-128.ibm.com/developerworks/linux/library/l-turbogears/ > > Also, at the end of this article I include my comparison of the 2 > frame

Limiting table editing in admin interface

2006-07-11 Thread Iain Duncan
Can anyone tell me if it's possible to limit which entries within a given table can be edited in the admin? I've made a client user account that can only edit certain models, but I would also like to make sure within those model/tables there are some entries that they can't change. ( ie no deleti

Re: book recommendations?

2006-07-10 Thread Iain Duncan
> Design-to-code process (HTML/CSS mostly): Designing With Web Standards > http://www.amazon.com/gp/product/0321385551 Amazon and Indigo both say "customers also bought" "Web Standards Solutions: The Markup and Style Handbook (Pioneering Series)" by Dan Cederholm Any opinions on that? Or on "Cas

Re: Deploying and set up on shared hosting?

2006-07-08 Thread Iain Duncan
> They do also offer business-level accounts with SLA-style guarantees > on uptime, though, and common sense would recommend going that route > if it's what you really need.. I've always marveled at the number of > people out there who claim to have "mission-critical" sites but are > unwilling to

Re: Archlinux now running django!

2006-07-08 Thread Iain Duncan
Ian Holsman wrote: > congrats Sandro. > it looks great. > > I'd be interested to hear what you (and others) think were the > biggest obstacles you had and how you overcame them. > > regards > Ian Yeah, that's one of the nicest layouts I've seen (IMO) for an info-rich site. Especially like t

Re: Deploying and set up on shared hosting?

2006-07-08 Thread Iain Duncan
>>how many other hosting providers are here ;-) > > > I don't have any formal connection with them, but TextDrive > (http://textdrive.com/) is fairly Django-friendly by nature, and I > wrote a (now slightly outdated, but I'll be updating it soon) manual > for deployment there: http://manuals.te

Re: Deploying and set up on shared hosting?

2006-07-07 Thread Iain Duncan
Jay Parlar wrote: > Probably WebFaction (formerly python-hosting.com) would be your best > bet: http://www.webfaction.com/shared_hosting That looks sweet. Anyone else have any feedback on these guys? Iain --~--~-~--~~~---~--~~ You received this message because

Re: development/production mode

2006-07-07 Thread Iain Duncan
>>Do most shared hosting providers allow one to do that? I would have >>thought not > > > not - unless you are on vps hosting with root access, mod_python is > not an option unless your provider is kind enough to restart apache > regularly with a cron job - even that may not be enough

Re: PostgreSQL vs. MySQL

2006-07-07 Thread Iain Duncan
> One of the big advantages of MySQL is ease of use and a choice when it comes > to how you store data. For example: if you need fast reads and less updates, > make your table MyISAM (you can even compress it making it smaller and > faster!). If you need high availability of your data, you can

Re: development/production mode

2006-07-07 Thread Iain Duncan
Wade Leftwich wrote: > Iain Duncan wrote: > >>>>how do you handle changes on a site which is already online (talking >>>>about changing models and/or views)? >>> >>> >>>I typically maintain a duplicate setup on a testing machine

Deploying and set up on shared hosting?

2006-07-07 Thread Iain Duncan
I'm new to Django, but have a project done that must go up live next week for a client. However, it's just glamorized brochure ware with and admin interface, so they likely want to use shared hosting. Can anyone tell me: - Recomendations for reliable shared hosting that is Django friendly with se

Re: development/production mode

2006-07-07 Thread Iain Duncan
>>how do you handle changes on a site which is already online (talking >>about changing models and/or views)? > > > I typically maintain a duplicate setup on a testing machine (in my > case, a laptop running Linux) and use that for development and > testing, then when I know I've got the bugs w

Re: Using a Django project in a python script.

2006-07-06 Thread Iain Duncan
>>As a part of the application I'm writing I need to do certain things to > > the database every night. The easiest way to implement this would be a > python script run every night by cron. > > Set env DJANGO_SETTINGS_MODULE setting for the script. Then just use > your models and template as yo

Re: Code exectution and persistent object question

2006-07-05 Thread Iain Duncan
>>Ok, so we're would be smart place to do housekeeping you want to have >>happen no matter what page is loaded? > > > Middleware: http://www.djangoproject.com/documentation/middleware/ > > You can have functions that run prior to a request being passed along, > prior to a view function being

Re: Code exectution and persistent object question

2006-07-05 Thread Iain Duncan
> Separate client hits might hit separate Python interpreter instances, > and each of those instances will have imported the global namespace on > their own, creating separate global namespaces. > > So like Steven said, it's not safe to do anything in the global > namespace. If you need a per-ses

Re: Code exectution and persistent object question

2006-07-05 Thread Iain Duncan
> Code in the global namespace is executed at module import time. > These variables live as long as the python interpreter runs. (at least > thats my understanding of it) > > This is great for constants and such, but you can't rely on it to store > state variables as, depending on the environm

Re: Deletion of foreign key relations in admin view?

2006-07-05 Thread Iain Duncan
>>This feels more like a problem to be solved at the database level; the >>ideal solution would be to set 'ON DELETE SET NULL' for the >>foreign-key column (assuming -- and I don't know if this is the case >>-- that Django is doing 'ON DELETE CASCADE'). Just make sure that >>column will accept NU

Re: Null values in Foreign Keys?

2006-07-04 Thread Iain Duncan
>>foo = models.ForeignKey( bar, null=True, blank=True ) > > > Give this one a go again. This is the form that should work. Perhaps > there was another problem that got in the way? BTW there is nothing > wrong with using a null field for your foreign key relationship in most > schemas, from a pra

Deletion of foreign key relations in admin view?

2006-07-04 Thread Iain Duncan
One of my very few gripes with the otherwise amazing admin interface is the way deletions are handled when foreign key relationships are there. If you want to delete one item, it takes out any others depending on this item. Makes sense in a way, but could be very dangerous in the hands of a client

Code exectution and persistent object question

2006-07-04 Thread Iain Duncan
I stumbled on some behaviour that I'm sure is explained somewhere but not in the tutorials so I haven't found it. I made a global log object for debugging. I noticed instantiating objects in the view global name space executes before anything else in the views module on page load, very useful for

Re: Django & Apache 1.x

2006-07-04 Thread Iain Duncan
>>Well... Mod_python is the easiest method of running django, FastCGI >>setup is more advanced and usually requires basic knowledge about >>forking vs. threading, writing init scripts etc. These are things that >>makes it harder for beginners to understand Django itself so in my >>opinion it's go

Re: Null values in Foreign Keys?

2006-07-03 Thread Iain Duncan
In addition, I checked my mysql table and the field in question is implemented as an integer with Null allowed and default set to Null, so it appears that syncdb is creating the table properly, but the admin interface is not letting me put in a null value for some reason. Thanks Iain Iain

Null values in Foreign Keys?

2006-07-03 Thread Iain Duncan
The Django sites related-objects documentation says: "if a ForeignKey field has null=True set (i.e., it allows NULL values), you can assign None to it. Example: e = Entry.objects.get(id=2) e.blog = None e.save() # "UPDATE blog_entry SET blog_id = NULL ...;" But I can't figure out how to set it

Re: A small proposal to make it easier to find things

2006-07-03 Thread Iain Duncan
> There already is one: > http://code.djangoproject.com/wiki > > Doesn't contain many full tutorials though. Ah oops, I've been there and didn't even realize it was a wiki! Could certainly do with more fleshed out tutorials on set up and such. Perhaps I will find time to contribute after my cur

Re: A small proposal to make it easier to find things

2006-07-03 Thread Iain Duncan
What about a Django wiki for tutorial type things? Gentoo has one that has been enormously useful to me and could serve well as a model. Iain James Bennett wrote: > One of the great things about Django is that there are lots of people > out there motivated to write about it and share things they

Re: Django on Debian Sarge?

2006-07-02 Thread Iain Duncan
> which would indicate that Gentoo's stable mod_python still isn't new > enough, odd as that sounds. It's only one patchlevel higher than > Sarge's version. > > >>...My home dev box is >>gentoo, all I had to do was emerge mod_python and the mysqldb e-build ( >>can't remember name ), checkout

Re: Django on Debian Sarge?

2006-07-02 Thread Iain Duncan
> Hi, I was looking at trying Django for a project and noticed that in the > comments to the installation directions it was claimed that Debian > Sarge's mod_python isn't recent enough to run Django. That would be a > big complication. Is anyone running Django on Sarge, and can anyone > confirm

Django friendly hosting in Canada?

2006-07-02 Thread Iain Duncan
Anyone have good recomendations for a canadian hosting company that makes setting up Django sites easy? Will pay higher prices for good service and stability. Thanks Iain --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Grou