Re: Form processing using bash script

2009-10-06 Thread Kevin Teague
Use the os.subprocess module in the python standard library to invoke the bash script from your django view code: http://docs.python.org/library/subprocess.html Although in my experience, when there is a bash script wrapping a number of calls to other programs, I tend to find it easier to work

Re: Designing django projects.

2009-10-05 Thread Kevin Teague
On Oct 5, 3:53 pm, nbv4 wrote: > Also, once I do find a designer, how are they going to submit their > work? The django template was designed to be ultra simple and designer > friendly, but that whole philosophy is underminded by the fact that in > order to get the system

Re: How do I create project independent apps.

2009-10-05 Thread Kevin Teague
On Oct 5, 6:45 am, Johan wrote: > Actually the TEMPLATE_DIRS does nothing. In order to get my apps to > work outside of the project directory I edited the manage.py file and > added : > > import sys > sys.path.append('..\\..\\..\\django-apps\\trunk') > > This allows me to

Re: are django applications portable?

2009-09-25 Thread Kevin Teague
On Sep 25, 9:59 am, dijxtra wrote: > Hi everybody, > > Django applications, as I understood them should be pluginable on > project basis. That is, I should be able to install them to my > *project*, not to my django installation. So I downloaded django- > tagging and run the

Re: where to place import statements

2009-09-24 Thread Kevin Teague
imports don't usually take up too much memory. I'd guess that even importing a very large number of modules isn't going to grow your process size by more than 10 MB. imports are only evaluated once. So if you nest the import into a view, your process will be smaller until the first time that

Confirming GeoDjango OSMAdmin Bug

2009-09-22 Thread Kevin Systrom
Hey all, I've been having an issue using the filter on a GeoQuerySet with Django 1.1. I have a "Locations" table that looks more or less like this: class Location(models.Model): pnt = models.PointField() name = models.CharField(max_length=255) To query, I look for an object like this:

Re: Breakpoints in NetBeans

2009-09-21 Thread Kevin Bache
. This seems like a problem that most developers must hit from time to time. How has the community approached it in the past? Thanks again, everyone, Kevin On Mon, Sep 21, 2009 at 5:18 AM, Joshua Russo <josh.r.ru...@gmail.com>wrote: > On Mon, Sep 21, 2009 at 10:15 AM, Joshua Russo &

Breakpoints in NetBeans

2009-09-21 Thread Kevin Bache
nd again without having to splice my code with print statements. Thanks in advance for the help. Best, Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

TypeError: execute() takes at most 3 arguments (4 given)

2009-08-22 Thread kevin
cursor.execute("SELECT a,b,c FROM Table_Name WHERE a = %s AND b = %s ", [string1],[string2]) gives me the following error: TypeError: execute() takes at most 3 arguments (4 given) Where did i go wrong? --~--~-~--~~~---~--~~ You received this message because you

Re: I need to get psycopg2 installed on Mac OS X 10.5

2009-07-28 Thread Kevin
I have gotten psycopg2 to compile though in a roundabout way. I have tried to compile Python from source and got other errors. Although I already had Xcode installed, I decided that it couldn't hurt to reinstall it and see what happens. After doing so, I was able to compile Python without any

Re: I need to get psycopg2 installed on Mac OS X 10.5

2009-07-14 Thread Kevin
cOS X 10.5.7, and PostgreSQL 8.3. > > Regards, > >   Juan Pablo > > 2009/7/14 Kevin <hekevint...@gmail.com>: > > > > > > > I need to get psycopg2 installed on Mac OS X 10.5 > > > I have read every install guide I could find and I still do not have > &

I need to get psycopg2 installed on Mac OS X 10.5

2009-07-14 Thread Kevin
I need to get psycopg2 installed on Mac OS X 10.5 I have read every install guide I could find and I still do not have it working. I have developer tools installed. I am running MacPython 2.6.2 and PostgreSQL 8.4 downloaded from http://www.enterprisedb.com/products/pgdownload.do On my

Re: Automated Functional Testing

2009-07-10 Thread Kevin Teague
Yes, how many times have you followed the practice of: 1. write some new code 2. (re)start dev server and/or update dev database 3. tab over to your browser and click away 4. tab back to terminal to see the traceback when you hit an error With a functional test suite, it becomes sooo

Re: Hard linking an image

2009-06-25 Thread Kevin Teague
Presumably you already have all of the data required to generate a chart on the server? If so, then store the chart data in a model, and just reference it by id. e.g. (or w/ a pretty URL: ) And create a Chart object and store it before sending out the HTML response. Then update your chart

Re: Error trying to add a new user in the admin site

2009-06-21 Thread Kevin Audleman
is simply blank, the page will work. If, however the name of the variable is printed it won't work. See this ticket for more info: http://code.djangoproject.com/ticket/3579 The solution was to comment out those two settings and like magic it works. Kevin On Jun 8, 6:32 pm, Kevin Audleman

Re: Update an object with a dictionary

2009-06-10 Thread Kevin Teague
__dict__ is an attribute of every Python object. It's typically only an internal detail, and generally not accessed directly. One area where __dict__ modification would differ from attribute access is with an attribute that's a property. Modifying the __dict__ would ignore the property

Re: Update an object with a dictionary

2009-06-10 Thread Kevin Teague
On Jun 10, 9:27 am, Paolo Corti wrote: > Hi > is it possible to update an object with a dictionary? > > I tried something like this: > myobject.save(force_update=True, **my_dict) > > getting an error, though: > TypeError at ... > save() got an unexpected keyword argument

Error trying to add a new user in the admin site

2009-06-08 Thread Kevin Audleman
/form_url' I wondered if it might have to do with any of the changes I had made though defining an admin.py in my app, so I removed it and went back to the stock admin site. The error persists. The full trace is below. Any help greatly appreciated! Kevin

Bug in admin related to django.root

2009-06-03 Thread Kevin Audleman
pages. I can click on a model to see a list of its records, I can click on a record to edit it, but when I click Save it takes me to a URL that is missing the django.root (of course the page doesn't exist on the server so I get a 404). This seems like a django bug to me; does anybody know what I c

Re: Need help with URL rewrites

2009-06-01 Thread Kevin Audleman
ath" SetEnv DJANGO_SETTINGS_MODULE CasaCasa.settings SetHandler python-program PythonOption SCRIPT_NAME PythonOption django.root "/directory" On May 25, 1:02 pm, Kevin Audleman <kevin.audle...@gmail.com> wrote: > Hi Alex, > > I did exactly as you suggested w

Re: How to use next with comments?

2009-05-28 Thread Kevin Fullerton
ng to submit the comment looks similar to {% get_comment_form for object as form %} http://blog.kenwa-solutions.co.uk/; method="POST"> So I'm not sure why the default preview form isn't picking it up Many thanks Kevin --~--~-~--~~~---~--~

Re: How to use next with comments?

2009-05-28 Thread Kevin Fullerton
On Thu, May 28, 2009 01:50, Eric Abrahamsen wrote: > > On May 28, 2009, at 4:02 AM, Kevin Fullerton wrote: > >> >> I'm working with django.contrib.comments at the moment, and so far >> most >> things are working as expected. > > It's a known problem and

How to use next with comments?

2009-05-27 Thread Kevin Fullerton
a correctly formed comment, it brings up the "Thank you for your comment" template but doesn't redirect back to the original object. I've tried removing the hidden field and doing and have the same problem - is this a known problem, or is it developer error (me)? Many tha

Re: Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
Hi Alex, I did exactly as you suggested with no luck. Any other suggestions? Kevin On May 25, 12:27 pm, Alex Koshelev <daeva...@gmail.com> wrote: > Hi, Kevin. > > You can try to set FORCE_SCRIPT_NAME = '/directory' [1] settings > variable. Or setup your web server to provide

Need help with URL rewrites

2009-05-25 Thread Kevin Audleman
/directory/ to the beginning of each url it creates? Kevin --~--~-~--~~~---~--~~ 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 unsubsc

Re: User Profile in Admin

2009-05-01 Thread Kevin Audleman
-users Kevin On May 1, 8:20 am, CrabbyPete <pete.do...@gmail.com> wrote: > I created the following: > > class Profile(models.Model): >     user        = models.ForeignKey(User, unique=True) >     phone       = models.CharField(max_length=15,  blank = True, null > = True, u

Re: url template tag help

2009-05-01 Thread Kevin Audleman
all the pieces together myself. Kevin On May 1, 11:28 am, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > On Fri, 2009-05-01 at 11:13 -0700, Kevin Audleman wrote: > > > > I can't explain any of this, but I've been thinking about your > > > question sin

Re: url template tag help

2009-05-01 Thread Kevin Audleman
l no longer plague me. Cheers, Kevin --~--~-~--~~~---~--~~ 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: Configuration help. Multiple projects.

2009-04-30 Thread Kevin Audleman
correctly). This way the logic for each "project" would be contained in its own directory complete with views, models, etc. They will live in the same Django project and share a settings.py file, urls.py file and can easily talk to each other. Kevin On Apr 30, 7:47 am, "eric.frederic

Re: url template tag help

2009-04-30 Thread Kevin Audleman
is somewhere else. Kevin --~--~-~--~~~---~--~~ 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 dj

Re: Forms vs Formsets vs Sessions vs FormWizard ??

2009-04-29 Thread Kevin Audleman
buttons on each page, which you might find more difficult if you are trying to pass form data (I think you'd have to write extra code to pass the form backwards). Cheers, Kevin On Apr 28, 5:40 pm, TheCorp <jjos...@keystreams.com> wrote: > As a note, I found this post which basically des

Re: FileField uploading into an user-specific path

2009-04-29 Thread Kevin Audleman
to MEDIA_ROOT; you might want to rename that. Then in your model, define your image field as so: photo_1 = models.ImageField(upload_to=upload_location, blank=True) Cheers, Kevin On Apr 29, 8:12 am, Julián C. Pérez <jcp...@gmail.com> wrote: > thanks... > but... > how can i make that attri

Re: Dynamic form and template rendering

2009-04-29 Thread Kevin Audleman
As is often the case in django, they have already provided a mechanism for what you are trying to do the hard way: Formsets. http://docs.djangoproject.com/en/dev/topics/forms/formsets/ Cheers, Kevin On Apr 29, 7:18 am, MarcoS <marc.se...@gmail.com> wrote: > Hi all, >    I post a pro

Re: url template tag help

2009-04-29 Thread Kevin Audleman
: "Reverse for 'proyName.view_aboutPage' with arguments '()' and keyword arguments '{}' not found." I have solved most of my URL problems this way. Cheers, Kevin --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Can I use the django test server for this?

2009-04-21 Thread Kevin Audleman
a solution, I'll look into lighthttpd. Cheers, Kevin On Apr 21, 12:46 pm, Oli Warner <o...@thepcspy.com> wrote: > You could, but as you say you would have to script it to daemonise. > > If resources are what's putting you off running something like Apache, you > should kno

Re: conventions for adding pluggable apps to Django

2009-04-21 Thread Kevin Teague
To answer the question in terms of Python packaging (typically consuming Django apps isn't going to differ from consuming any other python package) ... On Apr 21, 11:44 am, Bryan Wheelock wrote: > I have a question about using Pluggable apps with Django. > > My

Can I use the django test server for this?

2009-04-21 Thread Kevin Audleman
drawbacks to this approach -- greatly appreciated! Cheers, Kevin --~--~-~--~~~---~--~~ 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: Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-15 Thread Kevin Cole
On Apr 14, 6:32 pm, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Apr 14, 6:11 pm, Kevin Cole <dc.l...@gmail.com> wrote: > > Hi, > > > First let me say I've looked at documentation, but feel a bit dyslexic > > when it comes to this stuff. >

Re: Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-14 Thread Kevin Cole
And... Never mind. Not sure how I missed it before, but it appears select_related() gets me what I want. I think... --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Trying to wrap my head around nested regroups or other ways to handle ordered ForeignKey stuff

2009-04-14 Thread Kevin Cole
Hi, First let me say I've looked at documentation, but feel a bit dyslexic when it comes to this stuff. The situation: I have three tables: a service provider table with city, state abbreviation and country abbreviation (among other other info), a states table with state names, abbreviations,

SQL Admin & Email app?

2009-03-25 Thread Kevin Ar18
in Python as I need)? like a CMS? Would it help if I explained the concept in more detail or if I asked this in a different Python mailing list? Thanks, Kevin _ Windows Live™ SkyDrive: Get 25 GB of free online storage. ht

Re: Three Physical Tiers

2009-03-05 Thread Kevin Teague
On Mar 4, 12:21 pm, ruffeo wrote: > Does anyone know how to develop a complex django project in a 3 tiered > network environment, still using the MCV architecture? > > I.E. Web Server (view and control code), App Server (model code), and > Database Server You have to

Re: Location of files that are part of my application

2009-03-03 Thread Kevin Teague
The __file__ attribute of a module can be used as a starting point for getting at data files within a python package. However, packages can be installed in zipped format, so if you need to account for this you can use the pkg_resources module in setuptools:

Re: Versioning/revisioning content (a la Mediawiki)

2009-02-25 Thread Kevin Teague
On Feb 25, 3:33 pm, Horst Gutmann wrote: > Or you could leave the versioning to dedicated tools like bzr and git > and use django-rcsfield :-) > > http://code.google.com/p/django-rcsfield/ > I'm not sure what you gain from using a VCS for storing versions? They're

Re: Searching a list of Q

2009-02-25 Thread Kevin Audleman
Ah, gotcha. Maybe django should include a iin function =) Kevin On Feb 25, 10:37 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Wed, Feb 25, 2009 at 1:34 PM, Kevin Audleman > <kevin.audle...@gmail.com>wrote: > > > > > > > What about the following? &

Re: Searching a list of Q

2009-02-25 Thread Kevin Audleman
What about the following? qset = Q(author__in=[u"Foo", u"Bar"]) Kevin On Feb 25, 10:03 am, Peter Bengtsson <pete...@gmail.com> wrote: > This works: > >  >>> from django.db.models import Q >  >>> qset = Q(author__iexact=u"Foo&

Re: optional parameter url

2009-02-25 Thread Kevin Audleman
if this will fix anything... Kevin On Feb 25, 4:26 am, Adonis <achrysoch...@hotmail.com> wrote: > Hello, > I am having some trouble serving static files when i try to pass an > optional parameter. > For url: appname.mainpage/, the static files work fine > For url: appname.mainpage/

Re: InlineModelAdmin objects question

2009-02-25 Thread Kevin Audleman
not. This is preferrable over rolling your own as django will automatically populate request.user with the fields from your profile module. The previous response identifies how to get it to show up in the admin. Namely, you overwrite the User object to display the related record. Cheers, Kevin On Feb 24, 5:12 pm

InlineModelAdmin objects question

2009-02-24 Thread Kevin Coyner
= models.OneToOneField(User, parent_link=False) address = ... etc -- Any pointers would be appreciated. Thanks. -- Kevin Coyner GnuPG key: 1024D/8CE11941 --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: Simplest way to do this?

2009-02-23 Thread Kevin Audleman
Great idea, I'll do that. Thanks! Kevin On Feb 23, 11:30 am, Daniel Roseman <roseman.dan...@googlemail.com> wrote: > On Feb 23, 7:19 pm, Kevin Audleman <kevin.audle...@gmail.com> wrote: > > > > > Hello, > > > I am using the excellent django-profiles m

Simplest way to do this?

2009-02-23 Thread Kevin Audleman
. Is there another, simpler way of doing it? Thanks, Kevin Audleman --~--~-~--~~~---~--~~ 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: login in django via plone

2009-02-19 Thread Kevin Audleman
in Django. Hopefully somebody out there has a more flushed out idea. Kevin On Feb 19, 2:20 am, Alan <alanwil...@gmail.com> wrote: > Hi There, > > We have Plone/Zope site for CMS and users registration. It came before > django for us. But now we are developing portal applicaton

Re: Query that grabs objects before and after object

2009-02-18 Thread Kevin Audleman
this in your request show_range = (current_show - 4, current_show + 4) shows = Show.objects.filter(show_order__range=show_range) FYI I haven't tested this and my Python is not good enough that I can guarantee my syntax. Kevin Audleman On Feb 18, 4:06 pm, Sean Brant <brant.s...@gmail.com> wrot

Re: Any way to show progress during a short process job?

2009-02-18 Thread Kevin Audleman
document.getElementById("pleasewait").style.display = "block"; } } //--> And your HTML code looks like this: Please wait while your request is being processed... Cheers, Kevin Audleman On Feb 18, 2:52 pm, Malcolm Tredinnick <m

Re: Extract values from form fields in templates

2009-02-18 Thread Kevin Audleman
Passing both the form and the object is the solution I use. It may not be completely DRY, but I can't see how it's bad. You need access to the data in an object so you pass the object. Much more sensible than trying to extract those values from a more complicated data structure. Kevin On Feb 18

Re: Access extra parameters in forms.py

2009-02-17 Thread Kevin Audleman
You should probably change the order of operations in the __init__function to call the super classes __init__ function first. Kevin On Feb 16, 8:49 am, peterandall <pet...@gmail.com> wrote: > Hi all, > > I'm trying to access a list of users in forms.py I'm creating two > list

Re: Can I overwrite the ModelAdmin for User

2009-02-17 Thread Kevin Audleman
Hey, that's great! I did indeed discover that the change password page didn't work but didn't know what to do about it. Thanks for your excellent and thorough help =) Kevin On Feb 16, 6:30 pm, Karen Tracey <kmtra...@gmail.com> wrote: > On Mon, Feb 16, 2009 at 8:19 PM, Kevin

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Feb 16, 2009 at 7:13 PM, Kevin Audleman > <kevin.audle...@gmail.com>wrote: > > > > > > > Alex, > > > I feel like I'm one step closer to getting this to work. From the > > documentation you sent my w

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
self.myprofile_set.all()[0].payment_status However I am working with the core User object which I didn't write. Am I SOL, or is there some way I can do this. Thanks, Kevin On Feb 16, 4:02 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Feb 16, 2009 at 6:59 PM, Kevin Audleman > <kevin.aud

Re: Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
to the list_display or list_filter sets for the User object? Cheers, Kevin On Feb 16, 3:45 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Mon, Feb 16, 2009 at 6:27 PM, Kevin Audleman > <kevin.audle...@gmail.com>wrote: > > > > > > > I've created a custom

Can I overwrite the ModelAdmin for User

2009-02-16 Thread Kevin Audleman
] admin.site.register(User, UserAdmin) Is there a way to do this? Thanks, Kevin Audleman --~--~-~--~~~---~--~~ 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

Re: Trying to retrieve dynamically generated session key in template

2009-02-11 Thread Kevin Audleman
I have the same session. Django has been so slick so far I would imagine it has a way to access session variables from a template. Have you found the solution? Kevin On Jan 17, 1:15 pm, dahpgjgamgan <dahpgjgam...@gmail.com> wrote: > Hi, > > A simple scenario: >    - A generic

Re: How do I display the human readable name of a choice?

2009-02-11 Thread Kevin Audleman
I could've swore I tried that before posting my question and it didn't work, but I tried it this time and it did. Anyhow, a long winded way of apologizing for asking a simple question. Thank you for taking the time to answer! Kevin On Feb 10, 3:41 pm, Alex Gaynor <alex.gay...@gmail.com>

Re: How do I display the human readable name of a choice?

2009-02-10 Thread Kevin Audleman
Thanks Alex, however this is a solution at the View level, and I'm using a view that I didn't write. Is there also a way to do this at the template level? Thanks again, Kevin On Feb 10, 1:24 pm, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Tue, Feb 10, 2009 at 4:23 PM, Kevin

How do I display the human readable name of a choice?

2009-02-10 Thread Kevin Audleman
it, I see AL. How do I get django to display the human readable name? I would prefer to do this on the template level, as I'm using a view from a contributed app that I can't modify. Thanks, Kevin --~--~-~--~~~---~--~~ You received this message because you

Re: Can I do this with django?

2009-02-06 Thread Kevin Audleman
Wow, that is very cool. I implemented it and it works! Django is definitely a very impressive framework. Thanks for your help! Kevin On Feb 6, 10:31 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Fri, Feb 6, 2009 at 12:58 PM, Kevin Audleman > <kevin.audle...@

Re: Can I do this with django?

2009-02-06 Thread Kevin Audleman
across the relationship? Cheers, Kevin On Feb 6, 9:46 am, Alex Gaynor <alex.gay...@gmail.com> wrote: > On Fri, Feb 6, 2009 at 12:43 PM, Kevin Audleman > <kevin.audle...@gmail.com>wrote: > > > > > > > I'm building a simple time tracker. It has a

Can I do this with django?

2009-02-06 Thread Kevin Audleman
where I have the ability to auto-populate fields on creation through relationships, but django is a new world unto me. Thanks for your help, Kevin Audleman --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
I found the solution in the archives: I changed DATABASE_HOST to 127.0.0.1 from '' Kevin On Feb 4, 9:41 am, Kevin Audleman <kevin.audle...@gmail.com> wrote: > Hello everyone, > > I am running through the tutorial and setting up my first django > project. Quite exciting!

Newbie question: first project can't connect to MySQL

2009-02-04 Thread Kevin Audleman
my machine using XAMPP, which puts everything in the /Applications/xampp directory. Poking around, I managed to find a mysql.sock file here: /Applications/xampp/xamppfiles/var/mysql/mysql.sock Assuming this is the correct socket, how do I tell django where to find it? Thanks, Kevin --~--~-~--

Re: front facing poll form issues

2008-12-27 Thread Kevin
No one has offered any help. That's fine, so let me ask my question differently. Can anyone point me to an example of form processing for formsets? Let's say can_delete=True, how do I process that in my code? I have scoured google and can find no examples, so any examples/links would be

front facing poll form issues

2008-12-26 Thread Kevin
I'd like to create a front facing poll creation form that can automatically handle deletion, reordering of choices. I believe formsets are the easiest way to accomplish this. I start with 3 choices and want to allow the user to add more. Check the following code: def create(request):

best way to design poll and choice form for multiple choice entries

2008-11-24 Thread Kevin
Starting from the tutorial, I figured a good first exercise would be to create a front-facing form for creating a poll question and choices. I've successfully done it, but I'd like the implementation of it to be closer to the functionality of the admin interface for adding and removing choices.

Re: Questions on packaging a project and naming conventions

2008-10-18 Thread Kevin Teague
I think there are two issues at play here: 1. Separate your site or application into multiple Python projects to promote re-usability, maintainability, extensibility. 2. Place your packages within a top-level package to prevent namespace collisions to increase re-usability. Note there is a

ensuring a string does not get escaped in views.py

2008-10-17 Thread Kevin
All, I am new to Python and Django. I'm quickly catching on but have finally run in to my first issue. I'm building a simple app that will work with Google's Picasa. The idea is to copy an album from one account to another, something that Picasa won't let you do in its interface. Here's the

Upload to ImageField from PIL?

2008-10-13 Thread Kevin Leung
Hey everyone, Quick summary of what I'm trying to do: There are images stored in an ImageField. I need to be able to edit this image (I'm using ImageDraw from the PIL), put it into a separate ImageField in the same entry, so that it's also accessible from the front-end. I, however, am having

Re: Help: Running 1.0 and 0.96 side by side?

2008-09-12 Thread Kevin Teague
On Sep 12, 10:06 am, "Matt Conrad" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 12, 2008 at 11:15 AM, Jeff Anderson > > <[EMAIL PROTECTED]> wrote: > > You can influence what this list is, by setting the PYTHONPATH > > environmental variable. All you need to do is set your PYTHONPATH > >

Re: What do you use as a build tool (like Ant or make)

2008-09-09 Thread Kevin Teague
There is a list of all Python-based build tools on the python.org wiki: http://wiki.python.org/moin/ConfigurationAndBuildTools I haven't used any of them with Django, but for managing Zope, Plone and Grok based web apps, zc.buildout is the current preferred tool. It's a configuration-based

Re: hanging os.system() when doing pdf generation

2008-05-27 Thread Kevin Teague
Milan Andric wrote: > > Furthermore I just did > > import sys > sys.stderr.write(os.system(cmd)) > sys.stderr.flush() > > to see what the error message from the command is in the production > server log. > > Try using the subprocess module (Python 2.4+) to call your program instead of

Re: Django and Linux distros

2008-05-19 Thread Kevin Monceaux
little better." In the end, I finally settled on Debian and I think I've finally stopped distro hopping. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!

Re: Django and Linux distros

2008-05-16 Thread Kevin Monceaux
anagers or editors. I use vim for editing and Ion for desktop management. I have also used emacs off and on in the past. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta

Re: tutorial DB touble

2008-05-07 Thread Kevin Monceaux
ist but the database file itself, test.db in the example above, shouldn't. It will get created when you run syncdb. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exem

Re: Custom Widget with jQuery?

2008-05-07 Thread Kevin Monceaux
ehind the scenes" so that I could just set up the field in the model to use the custom widget without having to also add the javascript to the template myself. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimi

Custom Widget with jQuery?

2008-05-07 Thread Kevin Monceaux
ts included multiple times. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!!! --~--~-~--~~~---~--~~ You received this

Re: Should I set up Django locally or on a web server?

2008-05-01 Thread Kevin Monceaux
kages/ Once Python is squared away, you can follow the install instruction for Django on the Django site and use it's built-in test web server for testing. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per

Re: Queryset-refactor branch has been merged into trunk

2008-04-29 Thread Kevin Monceaux
ranch. I just updated to pull in the qs-rf changes. I only had to make a couple of minor code changes to my site in cases where I was ordering by fields from another model. I like the new syntax much better than having to use the underlying table names. Congratulations to all involved!!

Re: Enhancing the Admin Interface

2008-04-28 Thread Kevin Monceaux
m/wiki/NewformsHOWTO Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et efficax per exempla!!! --~--~-~--~~~---~--~~ You received this message becau

Re: order_by for related tables

2008-04-24 Thread Kevin Monceaux
es were I've used it I had to also include a select_related() in the mix. For example, one place I use it looks like: brags = event.Brags.select_related().order_by('events_dog.Name') Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium erudi

Re: exclude with ForeignKey

2008-04-24 Thread Kevin L
, 11:43 pm, Kenneth Gonsalves <[EMAIL PROTECTED]> wrote: > On 24-Apr-08, at 11:47 AM, Kevin L wrote: > > > Hello Django users, I'm having trouble with an exclude statement and > > was hoping some kind soul could help me out. My models are simple, > > it's basically jus

exclude with ForeignKey

2008-04-24 Thread Kevin L
Hello Django users, I'm having trouble with an exclude statement and was hoping some kind soul could help me out. My models are simple, it's basically just two models with a ForeignKey relationship. class Parent(models.Model): pass class Child(models.Model): name =

FileField filename validation examples?

2008-04-22 Thread Kevin Monceaux
e uploaded. Also, I'd probably also want to prevent files with spaces in their names from being uploaded. Any examples/suggestions are welcomed. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per

Re: How do I escape a single quote in a Django template?

2008-04-21 Thread Kevin Monceaux
ike: {% trans "Bob's administration" %} or {% blocktrans %}Bob's administration{% endblocktrans %} might work. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et effica

Re: Fwd: custom form on admin interface page

2008-04-21 Thread Kevin Monceaux
nd out more about newforms-admin, there's some info at: http://code.djangoproject.com/wiki/NewformsAdminBranch And also on the HowTo page I mentioned in my previous reply. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes.

Re: custom form on admin interface page

2008-04-19 Thread Kevin Monceaux
nge_list.html and customize that copy. And, using this approach you can leave out the ifequal block since the customized template will only be used for the polls/poll app/model. P.S. I'm just starting to explore admin customization myself, so hopefully more experienced Djang

Newbie Question: Is "ordering" a list or a tuple or both / either?

2008-04-14 Thread Kevin Cole
Hi, I'm following along in the book, and noticed that when "ordering" is used in the Meta class (Chapter 5, page 77) it is a list. However, later, when used in the Admin class (Chapter 6, page 91), it's a tuple. Testing it out, it seems to work okay either way, but I wondered if there was a

Re: newforms-admin questions

2008-04-09 Thread Kevin Monceaux
ake for a new project. I've already decided to go with trunk over the latest release because of some of the new features, such as the new pagination functionality. Now I'm wondering if I should choose the newforms-admin branch over trunk. Kevin http://www.RawFedDogs.net http://www.WacoAgilityG

Re: Set Index (Home) Page

2008-04-07 Thread Kevin Monceaux
/(?P.*)$', 'WAG.agility.views.index'), etc., etc.) And, the to_home_page function, and needed imports, in the view looks like: from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse def to_home_page(request): return HttpResponseRedirect(reverse('WAG.wag.v

Re: Set Index (Home) Page

2008-04-07 Thread Kevin Monceaux
On Mon, 7 Apr 2008, ichbindev wrote: > In short, is there such a thing as 'default' in urlpatterns so that it > calls a view when none of the other patterns match? Is something like: http://www.DjangoProject.com/documentation/url_dispatch/#handler404 what you're looking for? Kevi

Re: Another Cycle Tag Question

2008-04-07 Thread Kevin Monceaux
was acting like it was being called on each iteration through the loop even though it wasn't. Kevin http://www.RawFedDogs.net http://www.WacoAgilityGroup.org Bruceville, TX Si hoc legere scis nimium eruditionis habes. Longum iter est per praecepta, breve et eff

Re: Another Cycle Tag Question

2008-04-07 Thread Kevin Monceaux
patch and added a {% resetcycle rowcolors %} tag to the end of my include tag's template but it's not resetting the cycle var. I deleted the defaulttags.pyc file to make sure it got recompiled and also stopped/started apache, but I'm still seeing the same behavior as before I added the resetcycle ta

<    1   2   3   4   5   >