Re: Strange upload problem

2009-07-28 Thread Baxter
Oops. Looks like a file path problem. Not sure why it used to work. --~--~-~--~~~---~--~~ 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

Re: request.session in template tag?

2009-06-01 Thread Baxter
> Django doesn't have "generic templates" (only generic views), and if   > you don't provide the request to the template engine, it'll have a   > pretty hard time getting the session without using magic. > > Magic is bad. > > If you want the session in your template context, either use generic  

Re: request.session in template tag?

2009-06-01 Thread Baxter
On Jun 1, 1:25 pm, Gustavo Henrique wrote: > Using direct_to_template the request var is passed as param. > So, you can access in template: {{ request.session.myvar }} Thanks, but what I'm really after is a template tag I can drop in anywhere, whether the main template is

Re: Google website optimizer--A/B testing

2009-05-12 Thread Baxter
On May 12, 9:02 am, "bax...@gretschpages.com" wrote: > Does anyone know how one would do A/B testing a la Google Website > Optimizer with Django? Some sort of middleware, maybe? Disregard. After reading Google's docs a bit, all you have to do is create an alternate URL,

Re: Problem querying database

2009-04-15 Thread Baxter
On Apr 15, 10:44 am, google torp wrote: > What I meant was that you could do it like this > > import random > sa = Article.objects.filter(...).order_by('-id') > random_choice = sa[random.randrange(2, len(sa))] > Thanks Jakob. Is there an advantage to doing it that way

Re: Problem querying database

2009-04-15 Thread Baxter
On Apr 15, 9:39 am, Baxter <mail.bax...@gmail.com> wrote: > On Apr 15, 9:33 am, google torp <toppe...@gmail.com> wrote:> Hi. > > You can just use the python random function, I believe it's in math, > > and generate a random number in range of the number of articles

Re: Problem querying database

2009-04-15 Thread Baxter
On Apr 15, 9:33 am, google torp wrote: > Hi. > You can just use the python random function, I believe it's in math, > and generate a random number in range of the number of articles. > You could do that before the slice even, and just get a random > number with min value of

Re: Generating USER documentation?

2009-04-10 Thread Baxter
> On 10 Apr., 16:28, "bax...@gretschpages.com" > wrote: > > > What I'm after is documentation for the admin users, similar to the > > generated documentation, only less technical. A simple how-to for > > people who just want to know how to do things in the admin, but don't

Re: How to widen the text fields in the admin pages for editing records

2009-04-09 Thread Baxter
On Apr 7, 3:04 pm, Mac wrote: > Any pointers to the documentation for getting the text fields larger > for CharField data?  They're kinda puny for columns that are defined > to have up to 255 characters.  Thanks! I just modified the relevant fields in the admin css. Easy

Re: update facebook status

2009-03-19 Thread Baxter
On Mar 19, 1:34 pm, "Shantanoo Mahajan (शंतनू महाजन)" wrote: > you may > findhttp://wiki.developers.facebook.com/index.php/PythonPyFacebookTutorial >   useful. thanks. I'm not sure that's what I'm after, though. I don't really want to create a facebook app, just update

Re: Signals, sites and instances

2009-03-19 Thread Baxter
Talking with Andy more on IRC, it looks like I can't do what I want to do, unless maybe there's some way to pass the request on to the signal. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Signals, sites and instances

2009-03-19 Thread Baxter
On Mar 19, 11:28 am, Andy Mckay wrote: > Well I would have lots of questions there, some real code might help,   > not sure we have enough info. But lets start with what signal are you   > trying to catch (theres a few different ones)? Thanks Andy. In the model I've got:

Re: Need two response statements on same def

2009-03-19 Thread Baxter
Pass something in the request, like ?output=csv Then look for it in the view and feed the appopriate version. On Mar 19, 10:35 am, Jesse wrote: > My concern is that each view has 87 lines of duplicate code from the > "GET" data to get the appended list (shown here as: data

Re: Simple sites framework question

2009-03-16 Thread Baxter
D'oh. I knew I was missing something simple and obvious. Thanks. --~--~-~--~~~---~--~~ 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

Re: Cookie problem on multiple sites

2009-02-27 Thread Baxter
For each site, make sure you have SESSION_COOKIE_DOMAIN = 'whatever.com' in your settings. Otherwise your cookies will overwrite one another and cause no end of troubles. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: how to use django-profiles / Editing user properties (without admin interface)

2009-02-26 Thread Baxter
My suggestion would be don't. I think allowing users to edit their own emails will create more problems than it will solve, as I don't think you can trust users to put in valid info their email unless they have a motivating reason (like registering). Better to put a contact link to an admin to

Re: Problem tapping into Amazon web service

2009-02-26 Thread Baxter
Disregard. Change was due to some changes in Amazon and/or XMLtramp, coupled with inadequate error handling in my code. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: Categorize and List if Item Exists

2008-04-23 Thread andy baxter
andy baxter wrote: > you want a tag that would let you write an include file like: > > {% for category in categorybranch %} > sorry that should be {% for category in categorybranch.sub_cats %} > (print category name here) > {% include "self.html"

Re: Categorize and List if Item Exists

2008-04-22 Thread andy baxter
Michael Ellis wrote: > Hello all, > > I have the following models: > > class Category(models.Model): > name = models.CharField(core=True, max_length=100) > parent = models.ForeignKey('self', blank=True, null=True, > related_name='child') > > class Product(models.Model): > name =

Re: A modeling/implementation quiz

2008-04-19 Thread andy baxter
Juanjo Conti wrote: > Hi all, > > I am worried about how to model the next scene (this is an example, but > an appropriated one): In the model we have People, and there are > different kind of people, let's say: Professors, Students and Other. > Each People object has a 'type' attribute. Type

Re: users and profiles - model structure question

2008-04-18 Thread andy baxter
andy baxter wrote: > Alex Koshelev wrote: > >> I usually make link to User model not profile. And have no problems >> with usage. >> >> >> > I just tried switching to this way of doing it, and have come up against > a problem with gettin

Re: users and profiles - model structure question

2008-04-18 Thread andy baxter
Alex Koshelev wrote: > I usually make link to User model not profile. And have no problems > with usage. > > I just tried switching to this way of doing it, and have come up against a problem with getting the profile data into the template. If I create a list of all users in the view, then

users and profiles - model structure question

2008-04-18 Thread andy baxter
Hello, I have built a data model for a virtual library, which contains the following classes (among others): User - the built in user class from django.contrib.auth. Member - a profile for each user, containing extra information about each member. Item - a book, video, or music album

Re: Protecting static files

2008-04-17 Thread andy baxter
Nate wrote: > Hi all, > I've been googling for days and haven't really found a good solution > to my problem. > > I am building a site where a user can view photos and then choose > which of the photos they want to purchase. (Weddings/parties/HS > graduation etc...) My client doesn't want other

Re: python manage.py runserver

2008-04-16 Thread andy baxter
[EMAIL PROTECTED] wrote: > when i run the command above it shows this message , what is the > problem i have successful installed django and i want step to run the > server and > $ python manage.py runserver > Validating models... > Unhandled exception in thread started by 0xb7a7995c> >

Re: Search Frameworks

2008-04-15 Thread andy baxter
brydon wrote: > I'm curious what people are currently using for search frameworks on > django based projects. I've done a fair bit of research here and > elsewhere and I still haven't landed on a clear decision. What are > people successfully using with django to get robust search > capabilities

Re: Application Concepts

2008-04-15 Thread andy baxter
James Bennett wrote: > On Fri, Apr 11, 2008 at 1:09 PM, andy baxter > <[EMAIL PROTECTED]> wrote: > >> What /should/ be inside the project folder? >> > > I often get severely flamed for saying this, but: > > I very rarely have a "project folder&

Re: can i join your group

2008-04-13 Thread andy baxter
a.f wrote: > am intersting in web desgining & puplishing > e books & soft wear > seo & ather stuff > If you can read this, you're already subscribed to the group. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Images and Stylesheets

2008-04-12 Thread andy baxter
Greg Lindstrom wrote: > Hello Everyone- > > I started learning Django at PyCon in Chicago and have worked most of > the way through the "Django Book" and Sams "Teach Yourself Django", as > well as "Head First HTML with CSS and XHTML". It's been quite a lot > for this old dog, but I'd like to

Re: Django on plesk - Virtual Host

2008-04-11 Thread andy baxter
Tim wrote: > I've got a couple Django apps running on Plesk. It's not the greatest > but it works. > > First, after you set up your subdomain, you'll need to create the > file: > /var/www/vhosts/ domain.fr/subdomains/django/conf/vhost.conf > > Here's the contents of mine: > -- >

Re: Application Concepts

2008-04-11 Thread andy baxter
James Bennett wrote: > On Tue, Apr 8, 2008 at 1:38 AM, jurian <[EMAIL PROTECTED]> wrote: > >> Are django applications meant to be implemented in such a manner as to >> allow the entire application directory to be copied into another >> project and used without having to alter any of the

Re: unknown encoding: utf-8 error

2008-04-11 Thread andy baxter
Cephire wrote: > Thanks Karen. It helped. But I got another error. > > AttributeError: 'module' object has no attribute 'admin'. Searching > through the net, I found that __init.py__ should be present in the > directory. It does have __init.py__. > > Should all directories (like media, templates)

Re: middleware that works with Ajax

2008-04-10 Thread andy baxter
Jarek Zgoda wrote: > Chris Hoeppner napisał(a): > > >> This is new to me. Dojo will be the official js toolkit for django? >> Above jQuery? How come? >> > > No. It was stated many times: Django would not have any "official js > toolkit" and will not "be bound to" or "embrace" any single

Re: middleware that works with Ajax

2008-04-08 Thread andy baxter
Claudio Escudero wrote: > Hi, > > Someone knows there is any middleware that works with Ajax, similar to > RJS of Ruby on Rails? > Do you mean middleware specifically written for django? If so not sure, but it might be worth looking at dojo (http://www.dojotoolkit.org/). It is a javascript

Re: Whats wrong

2008-04-08 Thread andy baxter
Sarah Johns wrote: > Hello, im a newbie so sorry to bother anyone, but i have problems with > my site, i cant see the videos that i attached. whats wrong? Thanks > for the help, the site adress is this: http://www.videoriporter.hu > To be honest I thought your message was cleverly targetted

django security

2008-04-03 Thread andy baxter
hello, Is there any documentation online about security issues when using django? I'm assuming when writing code for my django app that I don't have to worry about things like quoting strings sent to the database because the django db api will already do that, but other things I'm not so

Re: Best practice for databases and distributed development with Django

2008-04-03 Thread andy baxter
andy baxter wrote: > > Not sure if it's quite an answer to your question, but I've been dealing > with a similar problem which is how to keep the test data I've added to > the system between (mostly minor) changes to the database. The approach > I've taken is as follows: >

Re: Best practice for databases and distributed development with Django

2008-04-03 Thread andy baxter
Julien wrote: > Hi, > > We're using SVN between several developers to work on the same project > and it's working quite well. But it's not as simple concerning the > database. > > Each of us has a local database to muck around with, and if one of us > makes a change in the models that implies

Re: compiling files when installing to a web server

2008-03-29 Thread andy baxter
Michael Wieher wrote: > I had an intermittent error when using just apache/mod_python, but > haven't had it happen since i started w/django > It looks like the speed issue is to do with memory - with just apache2, mysqld and django running, it was 72M into swap. So I guess I need to get a

Re: compiling files when installing to a web server

2008-03-29 Thread andy baxter
andy baxter wrote: > andy baxter wrote: > >> hello, >> >> I have just installed a demo of an app I'm writing to a web server. >> There seems to be an intermittent error, and I'm wondering if this is to >> do with the permissions on the directories - I've

Re: compiling files when installing to a web server

2008-03-29 Thread andy baxter
andy baxter wrote: > hello, > > I have just installed a demo of an app I'm writing to a web server. > There seems to be an intermittent error, and I'm wondering if this is to > do with the permissions on the directories - I've tried to set the > permissions so it can

compiling files when installing to a web server

2008-03-29 Thread andy baxter
. What is the right way to set this up? for example is there a python command you can run to force all the modules in a given path to compile? andy baxter. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "D

Re: Do I need two classes that are identical because I want to use two database tables?

2008-03-28 Thread andy baxter
Peter Rowell wrote: >> So should I just create two classes that are identical but name one >> CurrentElectionResults and the other PastElectionResults? >> Can't you just have a single class 'ElectionResults' and add a field called 'current'? I'm planning on doing something similar with my

not receiving email from the list

2008-03-28 Thread andy baxter
hello, I have subscribed successfully to the group, and can read it online, but I'm not receiving emails sent from the group, even though I have asked to when subscribing. Is this a known issue? Can any of you do anything about it or should I contact google? thanks, andy baxter

ImportError: No module named urls

2008-03-25 Thread andy baxter
works, so the problem seems to be with what I've done rather than the django installation. any help appreciated. thanks, andy baxter. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" grou

Re: dynamically assigning a field value

2008-01-08 Thread andy baxter
pinco wrote: > Hi, > > I'm trying to figure out how to solve the following issue without > succeed. > > I have a model like this: > > class Product(models.Model): >... >measure_cm = models.FloatField(...) >measure_in = models.FloatField(...) > ... > > The fields contain the same

Re: static on separate what?

2007-12-09 Thread andy baxter
James Bennett wrote: > On Dec 8, 2007 10:57 PM, Carl Karsten <[EMAIL PROTECTED]> wrote: > >> I this text, does "separate Web server" contingent on a 2nd box? If it is >> only >> one box, the same Apache instance would be preferred, right? >> > > No, and no. > > You don't have to have

Re: Problem with the django tutorial

2007-12-05 Thread andy baxter
On Dec 5, 3:36 pm, andy baxter <[EMAIL PROTECTED]> > wrote: > >> Hello, >> >> I've been working my way through the django tutorial. I'm really >> impressed with what django can do, but I've hit a problem - I'm now on >> the part of part 2 of the tutoria

Problem with the django tutorial

2007-12-05 Thread andy baxter
): # ... class Admin: pass This is supposed to bring the Poll class into the admin interface, but on my system it isn't working - nothing changes on the admin page, even when I refresh the page or restart the server. Can anyone help with this? andy baxter