Re: Admin Pages - want horizontal scroll ability

2009-03-02 Thread Peter Bailey
Yeah, I have big objects in tables. Sigh, was hoping to avoid writing more css, but thought it might come down to that. Thanks Alex. On Mar 2, 3:09 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Mar 2, 2009 at 3:06 PM, Peter Bailey <p.h.bai...@gmail.com> wrote: &g

Admin Pages - want horizontal scroll ability

2009-03-02 Thread Peter Bailey
Hello, I am building a small app that just requires admin functionality, Thought I was about done, but my customer tried it on a huge 1024x768 monitor (have not seen one for a few years). Turns out the if the admin pages would slide horizontally as well as vertically, things would be fine. Works

Re: Created Form - now code works to edit object but add gets NoneType' object is not callable

2009-01-15 Thread Peter Bailey
want to change the defaults on? Much DRYer - ah Thank You On Jan 15, 1:38 pm, Peter Bailey <p.h.bai...@gmail.com> wrote: > Thanks for the tips Dan, I thought the DRY thing could not be right. > Not sure I understand tho - I originally made the form with just the > inner Meta class

Re: Created Form - now code works to edit object but add gets NoneType' object is not callable

2009-01-15 Thread Peter Bailey
Thanks Andy On Jan 15, 1:50 pm, Andy Mckay wrote: > I don't think you are defining the ModelForm correctly, the whole   > point is that Django creates the fields for you. If you look at: > > http://docs.djangoproject.com/en/dev/topics/forms/modelforms > > This is the key

Re: Created Form - now code works to edit object but add gets NoneType' object is not callable

2009-01-15 Thread Peter Bailey
On Jan 15, 1:16 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Jan 15, 5:35 pm, Peter Bailey <p.h.bai...@gmail.com> wrote: > > > I have just recently started using forms. I was avoiding them because > > I thought they were not very DRY, but discovered

Created Form - now code works to edit object but add gets NoneType' object is not callable

2009-01-15 Thread Peter Bailey
I have just recently started using forms. I was avoiding them because I thought they were not very DRY, but discovered I need them for added flexibility such as displaying field lengths for example. Anyway, I have created a Form for a Survey object that I use. If I go to my edit page for a

Re: Django-like PHP framework?

2009-01-05 Thread Peter Bailey
You might want to have a look at CakePHP. It follows the MCV pattern I believe, although I have not looked closely because it is PHP not Python. http://cakephp.org/ Peter On Jan 5, 8:31 am, "thi.l...@gmail.com" wrote: > Hi, > > I have a hard time getting Django adopted as

Re: ForeignKey value return from web page

2008-12-03 Thread Peter Bailey
, 3:25 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > > > I am trying to use ForeignKey data returned from a page and view, and > > am having trouble. I am missing something fundamental I think. > > > Say I have 2 models > > > class TopModel(models.Mod

ForeignKey value return from web page

2008-12-03 Thread Peter Bailey
I am trying to use ForeignKey data returned from a page and view, and am having trouble. I am missing something fundamental I think. Say I have 2 models class TopModel(models.Model): name = models.CharField(max_length=50) db_type = models.CharField(max_length=1,

Re: Multiple saves without redirecting

2008-11-05 Thread Peter Bailey
Well that sounds very logical. Thanks very much. I'll make the changes and give it a go. Thanks again, Peter On Nov 5, 11:51 am, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Nov 5, 3:54 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > > > I want to create a fo

Multiple saves without redirecting

2008-11-05 Thread Peter Bailey
I want to create a form for a large object that has numerous non- mandatory fields. I am still learning django, and am missing something easy I hope. All the examples and docs I see say to redirect after the form is posted and saved to the db (in my case). What I want is to leave the form up

Re: Abstract Superclass and Foreign Keys

2008-09-22 Thread Peter Bailey
, Peter Bailey <[EMAIL PROTECTED]> wrote: > Malcolm, (or any other knowledgeable soul), I have been experimenting > with bothabstractclasses and GenericForeignKeys and Relations to > solve my issues, and I still have some problems and questions. There > are not a lot of examples of

Re: Abstract Superclass and Foreign Keys

2008-09-22 Thread Peter Bailey
d thinking if the Admin can work properly with this, there must be a way that I can too. Very frustrating. Thoughts anyone (maybe I am losing it :-) . Thanks again, Peter On Sep 16, 9:37 am, Peter Bailey <[EMAIL PROTECTED]> wrote: > Thanks for the responses. There are a number of sub

Re: Abstract Superclass and Foreign Keys

2008-09-16 Thread Peter Bailey
:10 -0700, Peter Bailey wrote: > > Hi all. I have a set of classes (web page items like radios, > > checkboxes, etc.) They are built on a superclass - Item.  I need a > > join table to link them to specific pages in which I also store a > > positi

Abstract Superclass and Foreign Keys

2008-09-15 Thread Peter Bailey
Hi all. I have a set of classes (web page items like radios, checkboxes, etc.) They are built on a superclass - Item. I need a join table to link them to specific pages in which I also store a position (PageItem) . Here is a snippet: #

Re: Stupid noob question - admin link

2008-09-10 Thread Peter Bailey
Thanks everyone for your answers. Lots to learn here, but sure is fun! On Sep 10, 1:03 pm, AmanKow <[EMAIL PROTECTED]> wrote: > > Summary : You could simply copy the file base_site.html from admin > > templates to a directory called "admin" in your own template directory > > and add a link to

Re: Stupid noob question - admin link

2008-09-09 Thread Peter Bailey
in my root where I came from, so the user can navigate there after completing whatever they were doing in admin. On Sep 9, 3:42 pm, Daniel Roseman <[EMAIL PROTECTED]> wrote: > On Sep 9, 7:16 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > Hi all, starting to think there is

Stupid noob question - admin link

2008-09-09 Thread Peter Bailey
Hi all, starting to think there is so much stuff in django and python that I will never learn it all. I am building a site that used the admin piece for most of the CRUD and a few other pages for the rest of my requirements. I link to the admin from my main app page, and would like to be able to

Re: Migrating to newforms-admin and classes already registered error

2008-07-22 Thread Peter Bailey
That works much better Malcolm, thank you very much. Appreciate the explanations too. Cheers, Peter On Jul 22, 3:23 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Tue, 2008-07-22 at 12:21 -0700, Peter Bailey wrote: > > Hi all. I am attempting to convert an app I am

Migrating to newforms-admin and classes already registered error

2008-07-22 Thread Peter Bailey
Hi all. I am attempting to convert an app I am writing to use the nfa. I have looked at all the docs available about this, but must have missed something. I am using: Django version 1.0-alpha-SVN-8053 Anyway, I have changed my urls.py file to be like so: from django.contrib import admin

Re: Add column to generated ManyToMany table and access from admin

2008-05-19 Thread Peter Bailey
Thanks Russ. On May 17, 4:26 am, "Russell Keith-Magee" <[EMAIL PROTECTED]> wrote: > On Sat, May 17, 2008 at 2:19 AM, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > However, I would really like to add a column to the join table, > > "order", so

Re: Add column to generated ManyToMany table and access from admin

2008-05-16 Thread Peter Bailey
= models.ForeignKey(Survey) >item = models.M2M(ItemOrder) >order = models.IntegerField() #Page Order >file_name = models.CharField(max_length=50) > > You can also add a 'unique_together' constraint to your meta class in > ItemOrder, if helpful. > hth, > -richard > &

Add column to generated ManyToMany table and access from admin

2008-05-16 Thread Peter Bailey
I am pretty new to Django, and am building a web generating app. I am hoping to get a lot of functionality out of the admin. So far that is working great. I do have 2 classes in my models that have a many to many relationship. The code is generated nicely and everything works correctly. The

Re: Newbie Data Model Question

2008-05-06 Thread Peter Bailey
torn on whether to use subtypes or not. More complicated (bad) but better db space usage (good). I guess disk space is pretty cheap these days lol. Thanks again, Peter On May 6, 6:25 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, May 6, 2008 at 3:01 PM, Peter Baile

Re: Newbie Data Model Question

2008-05-06 Thread Peter Bailey
what a feeling, what a rush! Cheers On May 6, 2:34 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On Tue, May 6, 2008 at 2:25 PM, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > Hey alen. I have tried implementing this and it makes good sense as > > far

Re: Newbie Data Model Question

2008-05-06 Thread Peter Bailey
to me. Thanks, Peter On May 6, 1:33 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > Thanks very much for your solution and reply alen. I'm learning the > ins and outs of python and django at the same time - fun adventure - > so far python is blowing me away - I love it. Better

Re: Newbie Data Model Question

2008-05-06 Thread Peter Bailey
els.CharField(max_length=20) > > Regards, > -Alen > > On May 6, 5:43 pm, Peter Bailey <[EMAIL PROTECTED]> wrote: > > > I have designed a small db model (on paper) and want to implement it > > in my models.py file. So far, this has been pretty straight forward

Newbie Data Model Question

2008-05-06 Thread Peter Bailey
I have designed a small db model (on paper) and want to implement it in my models.py file. So far, this has been pretty straight forward, but I have a generic superclass and several subclasses, and I am unsure how to implement this. My DB has page objects (webpages) with a few common attributes,

Re: MS SQL and Django - Any current info?

2007-11-02 Thread Peter Bailey
Thanks Carl. I'll give it a go. Cheers, Peter On Nov 1, 7:11 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > Peter Bailey wrote: > > Can anyone tell me if there is any current news about MS SQL support? > > I am looking at frameworks for a client, and my preferenc

MS SQL and Django - Any current info?

2007-11-01 Thread Peter Bailey
Can anyone tell me if there is any current news about MS SQL support? I am looking at frameworks for a client, and my preference is really to go the Django route. The plan will be to migrate over time from an asp environment with an MS SQL back end. So basically I am stuck having to use MS SQL

Re: Django on Linux, MS SQL on Windoz

2007-08-10 Thread Peter Bailey
Thanks Florian. Guess I better have a look at SQLAlchemey - too bad that branch of django does not seem to be advancing much either!. Thanks for your help. Peter On 8/10/07, Florian Apolloner <[EMAIL PROTECTED]> wrote: > > > Hi, > There is currently no fully working backend for mssql, but

Re: Pro Django Book preview

2006-10-17 Thread Peter Bailey
It would be cool if Apress could use some type of process with that book like Dave Thomas did with Agile Web Development With Rails (and some of their other titles). The Pragmatic Programmers released early beta versions of the book in pdf format, automated input from their readers to deal with