Re: create/drop individual table

2007-04-04 Thread Nathan R. Yergler
There's no Django magic there; just do it like you normally would using your database. On 4/4/07, John <[EMAIL PROTECTED]> wrote: > > Hi, new to django, getting familiar w/ it. So far, love what I've > seen. One question: how do I create/drop an individual table, > preferably not from the manage.

Re: Ordered list of objects?

2007-04-04 Thread Nathan R. Yergler
On 4/4/07, Atilla <[EMAIL PROTECTED]> wrote: > > On 04/04/07, Nathan R. Yergler <[EMAIL PROTECTED]> wrote: > > > > I'm working on an app for a client, and one of the requirements is > > that they be able to re-order objects in the admin interface. I

Ordered list of objects?

2007-04-03 Thread Nathan R. Yergler
I'm working on an app for a client, and one of the requirements is that they be able to re-order objects in the admin interface. I know exactly how I'd do with with an object database, but the ideas I've come up with for doing it with Django all involve using some tracking field, and then updatin

Re: Application for Google Summer of Code

2007-03-23 Thread Nathan R. Yergler
On 3/23/07, Tim Chase <[EMAIL PROTECTED]> wrote: > > > I've started to write an application for Google Summer of > > Code, and I would LOVE any feedback you can possibly give me. > > Please comment on both language and content. > > I guess my first concern/interest/question would be "what makes >

Re: Django & Web Services Api

2007-03-19 Thread Nathan R. Yergler
ElementTree is great, and included with Python 2.5; lxml (http://codespeak.net/lxml) is a super-fast ElementTree + xpath + xslt + lots library implemented on top of libxml2. On 3/19/07, johnny <[EMAIL PROTECTED]> wrote: > > I need to create a simple web api for my project. Basically they make >

Re: WHAT IS DJANGO?

2007-03-14 Thread Nathan R. Yergler
I think you've found the wrong Django. This Django is a Python web framework for building web applications. On 3/14/07, DICK <[EMAIL PROTECTED]> wrote: > > I AM NEW TO THIS SITE AND THE REASON I AM POSTING THIS IS BECAUSE I > WANTED TO DOWLOAD SOME SHEET MUSIC AND TABLATURE AT THIS LINK: > > cbs

Re: Apache2 displays django app as a file list

2007-03-11 Thread Nathan R. Yergler
I don't do tons of mod_python, but one thing that I immediately notice is that you're mod_python to handle the "/' location, but requesting the "/python" location. Does it work if you do http://mydom.net/ ? On 3/11/07, Mikey <[EMAIL PROTECTED]> wrote: > > I have mod-python working - I got a tes

Re: dojo problem

2007-03-08 Thread Nathan R. Yergler
ib/admin/media/js/admin? (note the *media* directory) > > > > On Mar 7, 3:06 pm, "Nathan R. Yergler" <[EMAIL PROTECTED]> wrote: > > On 3/6/07, Mary <[EMAIL PROTECTED]> wrote: > > > > > > > > > > > > > here is my model : > >

Re: New framework configuration

2007-03-08 Thread Nathan R. Yergler
management trivial (or at least sane). FWIW. NRY > On Mar 7, 10:37 am, "Nathan R. Yergler" <[EMAIL PROTECTED]> wrote: > > I'm not sure I fully understand the question, but why not just build > > Python from source in something like /usr/local/python24

Re: New framework configuration

2007-03-07 Thread Nathan R. Yergler
I'm not sure I fully understand the question, but why not just build Python from source in something like /usr/local/python244? Nathan On 3/7/07, jlnn <[EMAIL PROTECTED]> wrote: > > We're trying to set up a framework for our developers. We're using a > standard install of RHEL ES4. If we modify

Re: dojo problem

2007-03-07 Thread Nathan R. Yergler
On 3/6/07, Mary <[EMAIL PROTECTED]> wrote: > > here is my model : > text = models.TextField(help_text='Rich Text Editing.') > class Admin: > js = ['js/admin/AddRichTextEditing.js'] > > list_display = ('title','owner','time_created') > > i have added the dojo folder in my me

Re: published permission

2007-03-01 Thread Nathan R. Yergler
> > All what i want is to make the published field to appear for certain > user only in the admin interface > is there in way to do that with django pleasee > So you want to allow a group of users to edit the DonorProfile, but only select users within that group may edit the published field?

Re: how can i find a full source code for complete django

2007-02-28 Thread Nathan R. Yergler
On 2/28/07, Mary <[EMAIL PROTECTED]> wrote: > > thank you for the quick reply > I went the 1st link in the search which was > http://www2.jeffcroft.com/blog/2007/feb/25/two-new-django-sites-both-source-available/ > and i found that there is no source code on the site may be i am > stupid and i can

Uploading large files

2007-02-19 Thread Nathan R. Yergler
A little late, but as promised, I've bundled the code I'm using for handling large file uploads in my application. It's a bit of a cheat -- it actually uses a CGI for handling the actual upload and requires an embedded iframe to make things work quite right. But it has the following features: *

Re: Django over modpython

2007-02-16 Thread Nathan R. Yergler
It might work, but you probably won't be happy with the performance. Using CGI means that *every request* needs to load the Python interpreter and Django libraries into memory. FastCGI and mod_python keep them in memory, which is a huge performance gain. I know that Webfaction supports both mod_

Re: catalog of django apps?

2007-02-15 Thread Nathan R. Yergler
Is there a reason *not* to use the Cheeseshop, and utilize the metadata framework it provides? For example, Zope Corp publishes Zope-specific pieces there and marks them as "Framework:Zope" (or something like that... don't recall exactly). This makes the packages available to setuptools enabled

Re: best "right now" solution for large file uploads?

2007-02-12 Thread Nathan R. Yergler
I recently had this problem and got nowhere with the ticket 2070 patches. I wanted large file upload with user feedback. I ended up implementing a two-part solution: a CGI that actually handles the uploading (the "tramline"-like component) and a Django interface to it. I've received permission

Re: Installation Question

2007-02-11 Thread Nathan R. Yergler
See http://www.djangoproject.com/documentation/install/ for installation information and requirements. Your PHP information doesn't matter in the least, since Django isn't PHP based. Nathan On 2/11/07, Tavernaci <[EMAIL PROTECTED]> wrote: > > Hello > > I was searching for cms system which is v

Re: apply a patch

2007-01-15 Thread Nathan R. Yergler
If you're on Windows you might look into using Cygwin (http://cygwin.com) which provides a Unix-like environment for windows (where patch -p0... does work). NRY Picio wrote: Thanks Russell, but I'm on windows (sorry if I've not told you before..) I knew about the unix way > patch -p0 < ti

Re: dividing up views.py into multiple files

2007-01-10 Thread Nathan R. Yergler
Did you add a file named __init__.py to the views directory you created? This file tells Python to treat the directory as a package and allow traversal into the view file. NRY Stefan Foulis wrote: > I searched around the django documentation and didn't find anything > about this... > > what

Re: Another print_r() to {% debug %} question...

2006-12-19 Thread Nathan R. Yergler
radioflyer wrote: > ...I'm new to Python and still thinking like a PHP user I'm afraid... > > I've found a number of posts about dumping debug info to a template, > but I'm still a little confused. Maybe I don't understand the nature > of the 'context' returned from my view. > > If I have this

Re: Getting values from a Drop Down menu

2006-12-15 Thread Nathan R. Yergler
Don't you need to specify a name for the select element? If you're trying to get the selection with the key "value", I think you need to do: . . . NRY MattW wrote: > Dear All, > > A newbie with Django, but seem to be doing with some basics so far, but > seem to be a bit stuck on getting

Re: Property overrides

2006-12-12 Thread Nathan R. Yergler
> This won't work with the admin interface, because it wouldn't know > about your set_posted() method. With that said, you might be able to > use Python properties, but I have never tried that and am not sure > whether it would work. If it did work, you could do this: > > class Entry(models.Model

Re: Problem on Display Image

2006-12-12 Thread Nathan R. Yergler
Django uses the urljoin function in the Python standard library urlparse module[1] to join the MEDIA_URL to the image file path. If the MEDIA_URL specifies a directory and does not have a trailing slash, the directory portion is dropped. So to get Django to generate the correct URLs, you need to

Re: Problems with MEDIA_URL

2006-12-01 Thread Nathan R. Yergler
f the final component. NRY On Thu, 2006-11-30 at 11:30 -0500, Nathan R. Yergler wrote: > I'm using an ImageField in my model, and am having problems with the > get_FOO_url() functionality. > > For example, with a model such as: > > class MyModel(models.Model): > &g

Re: Database error only for certain models?

2006-12-01 Thread Nathan R. Yergler
I've seen something similar to this happen when I run syncdb, change a model slightly, and then forget to drop the tables and re-sync. So Django finds the database fine, and only the tables relating to the changed model cause problems. Hope that helps, Nathan On Sat, 2006-12-02 at 01:48 +,

Problems with MEDIA_URL

2006-11-30 Thread Nathan R. Yergler
I'm using an ImageField in my model, and am having problems with the get_FOO_url() functionality. For example, with a model such as: class MyModel(models.Model): headshot = models.ImageField(upload_to='uploads/foo') and the following in settings.py: MEDIA_ROOT='/home/user/myproject/media'

Re: best place to put dispatcher.connect code?

2006-11-29 Thread Nathan R. Yergler
I don't think manage.py does much with the path, since the INSTALLED_APPS are given in Python package path syntax, and therefore must be resolvable on the PYTHONPATH (ie, no additional information is given for paths). The only thing I've noticed that it may twiddle is adding the directory contain

Re: models as a package, admin functionality

2006-11-27 Thread Nathan R. Yergler
Uh, nevermind... I was doing: import realFile instead of: from realFile import realClass in __init__.py On Mon, 2006-11-27 at 15:37 -0500, Nathan R. Yergler wrote: > I wrote to the list a while ago about implementing models as a package > (ie, a "models" subdirectory with

models as a package, admin functionality

2006-11-27 Thread Nathan R. Yergler
I wrote to the list a while ago about implementing models as a package (ie, a "models" subdirectory with __init__.py, etc inside). As I was told then, i needed to add: class Meta: app_label='appname' to each individual model class. That worked up to getting the database API to recognize the

Re: django admin : "unique" field option error with models.BooleanField

2006-11-12 Thread Nathan R. Yergler
By definition there are only two possible values for a BooleanField: True and False. And if you add the unique=True constraint (which says each row must be unique), well, two is all you get. Maybe unique=True isn't exactly what you want? Nathan On Sun, 2006-11-12 at 02:41 -0800, david83 wrote:

Re: What must I do to get this to work?

2006-10-18 Thread Nathan R. Yergler
I don't think I've ever seen something like that work in a standard browser. Are you using Django for this? Nathan On Wed, 2006-10-18 at 14:11 -0700, carlwenrich wrote: > I have a python file (hello.py) with the tkinter demo code in it. I > found an example of someone doing something like this

Re: import models doesn't work in a script

2006-08-25 Thread Nathan R. Yergler
Because the environment variable (DJANGO_SETTINGS_MODULE) needs to point to the Python module in Python package syntax (ie, dotted path syntax). So the package ("mysite" in the example below) must be on the Python path (which is what sys.path.append does below). On Fri, 2006-08-25 at 11:52 -0700,

Connecting FCKeditor's Image Browser to Django

2006-08-23 Thread Nathan R. Yergler
/svn/trunk/fckeditor_connector/__init__.py. It still needs some work -- in particular support for the quick upload interface, but this release is in a usable state for the image browser, uploader, etc. Suggestions, patches, bug reports all welcome. Nathan

Re: libraries for common tasks, tinymce, mochikit

2006-08-20 Thread Nathan R. Yergler
> > I'm personally also a java programmer :) and I like such prefixes :), but I > had truely the problem on installation all off those libs (I do it on linux > with rpm-packages) that in the libs-folder an empty __init__.py clashs with > the __init__.py from the other packages. So I will rem

Re: Upload images to rich-editor in admin interface

2006-08-20 Thread Nathan R. Yergler
FCKeditor has an XML API that can be implemented on the server side to support the upload/browse functionality for images, etc. (see http://fckeditor.wikiwikiweb.de/Developer's_Guide/Participating/Server_Side_Integration#Browser). I was working on this yesterday and have a working Django applicat

Re: How do I parse XML in a Django view?

2006-08-18 Thread Nathan R. Yergler
Are you sure your url configuration is correct? Sounds like your problem isn't in the catalog function at all. Mike wrote: > Please bear with me as I continue to learn and struggle. We installed > ElementTree and started tinkering around with it, but we are still > having problems when we try to

Re: How do I parse XML in a Django view?

2006-08-18 Thread Nathan R. Yergler
I haven't tried this in particular, but I can tell you that the ElementTree API for doing XML processing in Python is going to be considerably simpler for something like this. ElementTree is available at http://effbot.org/zone/element-index.htm, and will be in the standard library starting with 2