hasNoProfanities validator - no longer exists?

2011-10-06 Thread robinne
I've finally managed to get a basic validator to work on a model (I used validate_slug on a model field and was able to catch it as a ValidationError). After getting that to work I tried to then get the validator that I actually want to work, hasNoProfanities. I have found that the validator no lon

@transaction.commit_on_success, not getting expected results

2011-10-05 Thread robinne
Based on Django 1.3 documentation for transactions, it seems you can have all or nothing updates of database calls within a view. I am not getting the expected behavior and it seems there must be an "autocommit" global setting somewhere that I need to set to false. Does anyone know of such a settin

Django 1.3 logging, how to log INFO to file1.log and ERROR to file2.log

2011-10-02 Thread robinne
I want to log ERRORs to an error log and INFO to an info log file. I have it setup like this, but the info log files gets both INFO and ERROR logging (because it allows INFO and above severity). How do I only run a handler for INFO and not higher items such as ERROR. LOGGING = { 'version': 1,

Django 1.3 logging, django.request logger not processed

2011-10-02 Thread robinne
I have setup my application to use the settings from the django documentation on logging, with a few items removed for simplicity. I have found that the logger django.request is not running even though I am trying to log an error from within a view. If I add '' logger (thanks to some other posts f

Extend User model, want additional inline editing for the extended model

2011-06-13 Thread robinne
I have extended the django user model with a "Member" model. I would like to be able to administer (on admin site) the user - all data from both models. I need the email and name from User, but everything else is from "Member". I have set it up so that I can get all the data on one form, but I cann

Re: Template inheritance, how to render dynamic content in base templates

2011-05-13 Thread robinne
Ok, thanks everyone for the replies. I will take a look at these suggestions. On May 13, 6:06 am, Michal Petrucha wrote: > On Thu, May 12, 2011 at 08:15:59PM -0700, robinne wrote: > > How can I render dynamic content in a base template if I only call a > > view on my child templat

Template inheritance, how to render dynamic content in base templates

2011-05-12 Thread robinne
How can I render dynamic content in a base template if I only call a view on my child template? What I am trying to do is setup a base template that will include "Profile" information for the user who is logged in, for example: "Welcome John", instead of "login here", on every page. But if I call

Re: Would django affect where or how I set ServerAdmin (apache) environment variable?

2010-10-23 Thread robinne
Contacted my VPS host. They must change this environment variable. Sorry. Thanks. On Oct 23, 7:37 pm, robinne wrote: > Hi, > > I am posting an apache question to the django users groups since I > have django installed using wsgi and wondering if it might be > affecting how or whe

Would django affect where or how I set ServerAdmin (apache) environment variable?

2010-10-23 Thread robinne
Hi, I am posting an apache question to the django users groups since I have django installed using wsgi and wondering if it might be affecting how or where I should set this environment variable. I am trying to update the email address in the 500 Internal Server Error message: "Please contact the

trying to do console testing of my models, "no module named X"

2010-06-23 Thread robinne
I have a django project running on local linux machine with apache. I run this at localhost:8081 and I use import statements to import my models in my views (e.g. "from DjangoSite.ManageProducts.models import Member"). For testing, I want to be able to import my models into python console and run

Re: Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-19 Thread robinne
k > for you if you are just wanting to generate alternate versions of > uploaded images. > > Alex > > On Mar 18, 12:10 am, robinne wrote: > > > I can save an uploaded image to a FileField like this (where > > "ProductFile" is a model) and "Tem

Upload image file, resize using PIL, then save into ImageField - what to save to ImageField?

2010-03-17 Thread robinne
I can save an uploaded image to a FileField like this (where "ProductFile" is a model) and "TempFile" is an ImageField: uploadedfile = request.FILES['uploadfile'] ProductFile.objects.create(FileName=UploadDate=datetime.datetime.now(), TempFile=uploadedfile) But, how do I manipulate the image size

Re: Returning array of integers as part of json dump, how to access in Javascript

2010-02-14 Thread robinne
7;t understand why you want to do this - why not just > obj.PythonList[0] which should be 3? > -- > DR. > > On Feb 13, 7:04 pm, robinne wrote: > > > I put in wrong variable name: > > > > var PIDS = obj.PackageIDS; //this brings back 3,2 for example, an > >

Re: Returning array of integers as part of json dump, how to access in Javascript

2010-02-13 Thread robinne
I put in wrong variable name: > var PIDS = obj.PackageIDS; //this brings back 3,2 for example, an > array of integers. should be... var PIDS = obj.PythonList; On Feb 13, 10:10 am, robinne wrote: > I am trying to pass an array of integers from a view to javascript in > an ajax

Returning array of integers as part of json dump, how to access in Javascript

2010-02-13 Thread robinne
I am trying to pass an array of integers from a view to javascript in an ajax call. I know how to return json dump from a View so that javascript can access it as an object like this: VIEW response_dict = {"PythonList": MyList, "EditType": edittype} return HttpResponse(simplejson.dumps(response_d

Re: request.POST['value'] cannot get value, 500 error

2009-11-11 Thread robinne
. > > You might also consider using Firebug (or something similar) to inspect the > http requests and responses when you are developing. > > Regards, > > Tamas > > On Wed, Nov 11, 2009 at 2:38 PM, robinne wrote: > > > > > I am posting data from a form to a

request.POST['value'] cannot get value, 500 error

2009-11-10 Thread robinne
I am posting data from a form to a django view. The form is created using inputEx (a YUI-like interface). The form gets created much like you create a YUI form and you include names for all your fields in javascript. It is javascript that creates the form on the page. I am able to load database d

Can't use ModelForm, basic template and ajax to submit a form, over and over...can I?

2009-11-01 Thread robinne
I'm giving up on something I was so close to getting to work...just want to make sure there isn't a simple solution. I have ModelForm and I have a simple template that iterates and creates the form fields. I update the form using YUI.io ajax submit. It works great. I am able to post the data to t

Re: ModelForm - how to post primary key to update existing record?

2009-10-26 Thread robinne
niel Roseman wrote: > On Oct 26, 5:19 am, robinne wrote: > > > > > I am noticing that when I load an existing ModelForm into a template, > > and I save (POST), I can't seem to get the primary key back in order > > to update that specific record. I am starting to

ModelForm - how to post primary key to update existing record?

2009-10-25 Thread robinne
I am noticing that when I load an existing ModelForm into a template, and I save (POST), I can't seem to get the primary key back in order to update that specific record. I am starting to head down the path of formsets...but that is not what I need. I am updating one record only. Any help is appre

Re: One to Many on Template UI

2009-10-07 Thread robinne
Wow, that worked, thank you! I thought I had tried everything. I was able to loop child items on the UI template with {% for item in mymembers.products_set.all %} ... On Oct 6, 9:54 pm, hcarvalhoalves wrote: > On 7 out, 01:23, robinne wrote: > > > I have my model setup with

One to Many on Template UI

2009-10-06 Thread robinne
I have my model setup with foreign key relationships. I can read one table's data to the UI. But I cannot figure out how to read child records onto template. I know it is (in the case of Blog, Author, and Entry) b.entry_set.all(). But I don't know where this code goes. It won't work in the templat

Re: Cannot display images - need help with settings for development environment

2009-08-22 Thread robinne
I figured it out: #MEDIA_URL = 'http://localhost:8000/testproject/site_media/' MEDIA_URL = '/site_media/' On Aug 22, 8:57 am, robinne wrote: > I'm new to Django and I cannot seem to get all the settings correct to > allow me to view images in the development env

Cannot display images - need help with settings for development environment

2009-08-22 Thread robinne
I'm new to Django and I cannot seem to get all the settings correct to allow me to view images in the development environment. Here is what I know (I'm developing on Vista): For internal server to serve images, you have to configure django settings, so here is what I've done. [My actual path to i