Re: Accessing User Object From Template

2008-07-12 Thread Chris
On Jul 12, 11:30 pm, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > Are you using RequestContext, not Context, as mentioned here: Nope, thanks for the clarification. I guess I misinterpreted the technicality note that says that's the default. Chris

Re: Left Outer Join

2008-07-12 Thread Kenneth Gonsalves
On 13-Jul-08, at 11:07 AM, Chris wrote: > record along with the article in SQL, this would just be a simple left > outer join. How would this be done with Django's ORM? I've reviewed > http://www.djangoproject.com/documentation/model-api/#relationships > but I don't think it covers this case.

Left Outer Join

2008-07-12 Thread Chris
I'm reasonably fluent in SQL, and while I've found Django's ORM is great for basic CRUD operations, I'm having trouble creating joins. For example, I have a three tables, Article, Rating, and User. Rating stores a user's rating of a particular article. I'm trying to create a view that lists

Re: Root Access

2008-07-12 Thread Tim Johnson
Hi: Just wanted to thank all of you for the responses. Good data set! "Not bad for two fingers" cheers tim --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email

Re: Accessing User Object From Template

2008-07-12 Thread Karen Tracey
On Sat, Jul 12, 2008 at 11:12 PM, Chris <[EMAIL PROTECTED]> wrote: > > According to http://www.djangoproject.com/documentation/authentication/ > each template should have access to the variable "user" by default. > However, after I login, this variable doesn't seem to be defined. Is > there any

Re: Accessing User Object From Template

2008-07-12 Thread Peter Rowell
> The only weird thing I imagine I could be doing is using > render_to_response in my view. Would that be blocking the context from > being populated correctly? Nothing weird about that. Try reading the following section:

Accessing User Object From Template

2008-07-12 Thread Chris
According to http://www.djangoproject.com/documentation/authentication/ each template should have access to the variable "user" by default. However, after I login, this variable doesn't seem to be defined. Is there any special configuration required to have access to this? The only weird thing I

Re: Root Access

2008-07-12 Thread Dan Ellis
The only thing you really /need/ root for is having some web server process (usually Apache or lighttpd, for example) bind to port 80. Everything else can be done without it. In fact, in any typical set up, once port 80 has been bound to you're not running as root any more anyway.

Re: Root Access

2008-07-12 Thread Tim Johnson
On Saturday 12 July 2008, [EMAIL PROTECTED] wrote: > I don't think that is true, the only time I needed root was when I was > symlinking django into /usr/lib/python2.5/site-packages/ but since you > can put it anywhere on your python path, you just need to symlink it > somewhere that's on your

Re: Root Access

2008-07-12 Thread Kenneth Gonsalves
On 13-Jul-08, at 6:44 AM, [EMAIL PROTECTED] wrote: > I don't think that is true, the only time I needed root was when I was > symlinking django into /usr/lib/python2.5/site-packages/ but since you > can put it anywhere on your python path, you just need to symlink it > somewhere that's on your

Re: Root Access

2008-07-12 Thread Andrew Ingram
Tim, It is possible to get django running without root access but you will need certain levels of permissions to do things like adding libraries to the python path, there are guides to installing Django on shared hosting environments like dreamhost where they don't give you root - though they

Re: Root Access

2008-07-12 Thread [EMAIL PROTECTED]
I don't think that is true, the only time I needed root was when I was symlinking django into /usr/lib/python2.5/site-packages/ but since you can put it anywhere on your python path, you just need to symlink it somewhere that's on your path and doesn't require root, since you need a location like

Root Access

2008-07-12 Thread Tim Johnson
I'm a long-time python web programmer. My company is interested in Django. I note from the following Amazon URL: http://www.amazon.com/gp/product/1590597257/ref=s9subs_c4_img2-rfc_p?pf_rd_m=ATVPDKIKX0DER_rd_s=center-2_rd_r=060JP6WRHSEJAMPJ51S2_rd_t=101_rd_p=278240301_rd_i=507846 Caution: The URL

ANN: django-oauth, a generic OAuth provider implementation

2008-07-12 Thread David Larlet
Hello, At mixin[0], we are both interested in Semantic Web and Django[1], that's why we decided to release a generic application which implements the provider part of the OAuth protocol[2]. The code and examples are available at my mercurial repository[3] and the documentation[4] (which

Re: Updating Database Schema

2008-07-12 Thread Chris
On Jul 12, 3:31 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote: > Chris wrote: > > What's the best way to update database schema? If I add a column to a > > table in my models.py and then run "manage.py syncdb", it doesn't add > > the new column in the database. > > syncdb will never issue an alter

Problem retrieving objects

2008-07-12 Thread Benjamin Buch
I'm trying to find my way round the django 'basic apps' to get to know django a little better. http://playgroundblues.com/posts/2007/dec/2/django-basic-apps/ Installation of basic/blog went all right, I could save posts to the database (sqlite in this case) through the admin. But if I try to

Re: Updating Database Schema

2008-07-12 Thread Jeff Anderson
Chris wrote: What's the best way to update database schema? If I add a column to a table in my models.py and then run "manage.py syncdb", it doesn't add the new column in the database. syncdb will never issue an alter statement-- this could be devastating on a production server with lots of

Updating Database Schema

2008-07-12 Thread Chris
What's the best way to update database schema? If I add a column to a table in my models.py and then run "manage.py syncdb", it doesn't add the new column in the database. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: default value for filter in admin pages

2008-07-12 Thread xlty
implement FilterSpec class, you can got it lee wrote: > Guys, > > Is there a way of setting the default value for a filter in the admin > site? > > Class Account(models.model): > isClosed = models.BooleanField(blank=True) > name = models.CharField(core=True, max_length=255,unique=True) >

Re: Visualization of databases

2008-07-12 Thread Oscar Carlsson
There are a number of different toolkits that could do this for you, here are three that looks usable: http://code.google.com/apis/chart/ http://developer.yahoo.com/yui/charts/ http://matplotlib.sourceforge.net/ With (at least) matplotlib you could make your charts automatically in your model,

Visualization of databases

2008-07-12 Thread Xan
Hi, Is there any tool for visualizing database data? I mean for example, to build graphics like piechart, linechart, classification of database data in a frequency table (for example creating preaty diagrams like piwik [http://piwik.org/), or with R [http://www.r-project.org/], or gnuplot, )

Re: Autoupdate field?

2008-07-12 Thread Xan
Yes, but if mary is a Person and Smith is a Family, and mary belongs to Smith Family (that is mary.family = Smith), how to change mary.hometelephone if Smith.hometelephone change? Thanks a lot, Xan. On Jul 6, 10:02 pm, Juanjo Conti <[EMAIL PROTECTED]> wrote: > I you want your data to be

Re: USAepay cc payment processor

2008-07-12 Thread Chris Moffitt
I'm not familiar with this particular processor but on the surface it looks like a similar process to what you would use for Authorize.net. You can see how we use this particular processor in Satchmo - http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/payment/modules/authorizenet

USAepay cc payment processor

2008-07-12 Thread Bobby Roberts
Hi group. I'm now successfully dinging credit cards using https posting over to USAepay.com. It's working great. I've got a question though that i'm not sure how to handle and general guidance is greatly appreciated. I pass two parameters to them called UMredirAccept and UMredirDecline for

Re: Creating a Scheduled Task

2008-07-12 Thread Peter Rowell
> I can do > this "outside" Django with Cron and a script that uses the standalone > ORM, but is there any way to incorporate this into admin so I can see > what tasks are run and when? Well, you are probably still going to have cron (or equivalent) in there somewhere because you need something

Re: Creating a Scheduled Task

2008-07-12 Thread John M
I've seen previous posts which tell you to setup the CRON job with the correct settings, so you can just call django from the CRON job, since django is just python, as long as it finds the settings file you should be ok. J On Jul 12, 7:53 am, Chris <[EMAIL PROTECTED]> wrote: > Hi, > > I'm a

modify select widget

2008-07-12 Thread Nenillo
Hi, I'm doing an app with a category model. That category model has an autoreference field, to do multiple category levels. I'm using models.ForeignKey('self', null=True, blank=True) for that. The problem is that the select is shown in a plain way and I wan to do something like: Cat1 -

Re: encoding and escaping of form values

2008-07-12 Thread commander_coder
Thank you *very* much. > What happens when you try it? Your computer won't catch on fire when you > make a mistake, so experimentation is a good way to learn. :-) I left out a lot of fumblings, including these ones. I find that when I'm beginning trying to understand a system with lots of parts

Re: Automatic Image Resizing upon Upload

2008-07-12 Thread TheBoff
I've actually realised I've been an idiot: seen as models are subclasses of models.Model, I should be able to just call model.Model.save() from within the custom save method! And my other idea wouldn't work if the image were changed. On Jul 12, 12:37 pm, TheBoff <[EMAIL PROTECTED]> wrote: > Wow:

Re: determining model subclass

2008-07-12 Thread Andre Meyer
hi Dave finally, i have tried what you suggested. indeed, this is what is described here. and it works! thanks a lot! cheers André On Tue, Jul 8, 2008 at 3:13 PM, Chester <[EMAIL PROTECTED]> wrote: > > André, > I'm