Re: Multiple Database Simple Example

2010-05-13 Thread GRoby
Russ Magee, Thanks for the quick response, your message explained what I was not understanding and I was able to get my code working. :) Gregory Roby On May 13, 10:44 am, Russell Keith-Magee wrote: > On Thu, May 13, 2010 at 10:27 PM, GRoby wrote: > > Hello, > > > I am u

Multiple Database Simple Example

2010-05-13 Thread GRoby
Hello, I am using Django 1.2 RC 1 and have setup multiple databases. I have everything working if I manually specify .using, for example: SomeObjects = ModelInDefaultDatabase.objects.all() #This Works SomeObjects = ModelInDatabase2Name.objects.using('Database2').all() #This also Works How ca

Re: Tricky Django tables setup

2009-12-10 Thread GRoby
It sounds like you just need a ProjectSpecs Table: class ProjectSpecs(models.Models): Project=models.ForeignKey(Project) Specs=models.ForeignKey(Specs) Values=models.CharField(max_length=200) That would let you assign as many specs to a project that you want, with additional fields (b

Re: GeoDjango, Convert List of Polygon Objects to a Single Polygon Object

2009-08-20 Thread GRoby
help you. > > 2009/8/20 GRoby > > > > > > > Hello, > > > How can I convert a list of Polygon objects into a Single Polygon > > Object utilizing GeoDjango?  I think I need to use the buffer feature, > > but am not sure how to.  Is there a way to use a bu

GeoDjango, Convert List of Polygon Objects to a Single Polygon Object

2009-08-20 Thread GRoby
Hello, How can I convert a list of Polygon objects into a Single Polygon Object utilizing GeoDjango? I think I need to use the buffer feature, but am not sure how to. Is there a way to use a buffer feature or do I need to code this out in Python. Gregory Roby --~--~-~--~~-

Re: Forms with dynamic *fields*

2009-03-02 Thread GRoby
Hello Martin, I had a similar need and did the following: Use the Dynamic Django form class from http://www.djangosnippets.org/snippets/714/ An Example of how the form is built in my view (just a cleaned up C&P snippet from my code): FormDictionary=BuildForm(NumberOfSpecialFields)

Re: GeoDjango - Distance between MultiPointFields?

2009-02-19 Thread GRoby
Alfonso, I ran into similar types of issues when I was importing data into my project. I ended up just converting all MultiLine and MultiPolygon fields into Regular Line and Polygon fields using through a GeoDjango script (using the 1st Line and Polygon of each feature as the input for creating

Re: Getting Django to generate a report automatically on a assigned date?

2009-02-18 Thread GRoby
Alfonso, One way would be to create a View that performs all of the Report Generating Tasks. You could then use cron (or another task scheduler) to run a command line browser that runs that view (using wget for example). So basically you would have a @monthly entry in cron that runs something l

Re: GeoDjango in Ubuntu 8.10, Segmentation Fault

2008-12-02 Thread GRoby
I can confirm that all of my seg faults were all on my 64 bit machine but could not be duplicated when I tried to on my 32 bit test virtual machines. On Dec 2, 7:40 pm, rcoup <[EMAIL PROTECTED]> wrote: > Posting to geos-devel, I got this reply from Paul > Ramsey:http://lists.osgeo.org/pipermail

Re: GeoDjango in Ubuntu 8.10, Segmentation Fault

2008-11-25 Thread GRoby
Justin, I reran my tests with the latest version of Apache on my 8.10 test machine. I am no longer getting the Segfaults with either worker or prefork. I am now getting an Invalid SRS type "wkt" error (that I assume you are now running into). I have tried several things (including downgrading

Re: Usage opinion wanted

2008-11-24 Thread GRoby
Hello, I have written a couple of mini applications that used Tkinter (simple toolkit for building Python GUI apps) and utilized the Django ORM with PostGreSQL. I imported Django using code like: PathDjangoRoot="/var/djangoroot/" if(not PathDjangoRoot in sys.path): sys.path.append(PathDjang

Re: GeoDjango in Ubuntu 8.10, Segmentation Fault

2008-11-18 Thread GRoby
Based on comments in a separate thread, GeoDango may have issues with > multithreaded configuration. Which Apache MPM was being used for each > Apache version, prefork or worker? The worker MPM uses threads and so > that could be the culprit. > > Graham > > On Nov 19, 10:43 am, G

Re: GeoDjango in Ubuntu 8.10, Segmentation Fault

2008-11-18 Thread GRoby
I replaced packages one at a time with ones from Ubuntu 8.04. The segmentation faults went away when I switched Apache from 2.2.9 to 2.2.8, so I can just lock the package with the Hardy version for now. On Nov 18, 4:34 pm, GRoby <[EMAIL PROTECTED]> wrote: > Hello, > > I crea

GeoDjango in Ubuntu 8.10, Segmentation Fault

2008-11-18 Thread GRoby
Hello, I created a GeoDjango application that I have been successfully using with Ubuntu 8.04. I would like to have as many packages as possible handled by the OS, so I am testing it with Ubuntu 8.10, with all packages installed through Synaptic (including PostGIS, PostGreSQL, Mod-Python, Psycop