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
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
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,
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
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
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
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
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
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
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
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
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
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
> >
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
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
.
>
> 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
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
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
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
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
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
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
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
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
24 matches
Mail list logo