Re: Visualization of databases

2008-07-12 Thread jdelacueva
Also take a look at Python Google Chart: http://pygooglechart.slowchop.com/ On Jul 12, 7:36 pm, "Oscar Carlsson" <[EMAIL PROTECTED]> wrote: > 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://develop

Re: Root Access

2008-07-12 Thread James Matthews
I have used dreamhost and hosted Django. While root is the best Django ran smoothly! On Sat, Jul 12, 2008 at 10:22 PM, Tim Johnson <[EMAIL PROTECTED]> wrote: > > Hi: > Just wanted to thank all of you for the responses. > Good data set! > "Not bad for two fingers" > cheers > tim > > > > --

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. u

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 artic

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 t

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 sp

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: http://www.djangoproject.com/documentation/templates_python/#subclassing-co

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 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 pat

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 p

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&pf_rd_s=center-2&pf_rd_r=060JP6WRHSEJAMPJ51S2&pf_rd_t=101&pf_rd_p=278240301&pf_rd_i=507846 Ca

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 co

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 s

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 d

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 Group

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, sin

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 normaliz

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 Li

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 url

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 t

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 newb

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 - Subcat1-

Re: Two edit_inlines between the same two models?

2008-07-12 Thread Aaron
I now see that my problem is discussed in tickets #1939 and #4126. However, the diffs are for a different version and annoying to apply. I will try... On Jul 12, 4:25 pm, Aaron <[EMAIL PROTECTED]> wrote: > Ok, thanks, but I want to be able to add QMs to trips when creating > new trips. Is that po

Creating a Scheduled Task

2008-07-12 Thread Chris
Hi, I'm a newbie to Django, and I'm trying to find the best way to create a recurring scheduled task. I'd like to run a script that periodically downloads an RSS feed and updates records in the database. I can do this "outside" Django with Cron and a script that uses the standalone ORM, but is th

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: Two edit_inlines between the same two models?

2008-07-12 Thread Aaron
Ok, thanks, but I want to be able to add QMs to trips when creating new trips. Is that possible in the admin interface? Or should I be using a form? On Jul 12, 1:35 am, J Meier <[EMAIL PROTECTED]> wrote: > I might try setting up Trip without direct reference to the QMs, and > QMs with two referen

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: encoding and escaping of form values

2008-07-12 Thread Malcolm Tredinnick
On Sat, 2008-07-12 at 07:03 -0700, commander_coder wrote: > I'm trying to write some of my first custom Django widgets, fields, > and forms. I'm having some trouble making out what the source code > does. > > I have radio buttons that end in html something like this. > string > Here "key" and

Re: Two edit_inlines between the same two models?

2008-07-12 Thread Aaron
Ok, sorry for being stupid, I see that it is a decorator. On Jul 12, 1:35 am, J Meier <[EMAIL PROTECTED]> wrote: > I might try setting up Trip without direct reference to the QMs, and > QMs with two references to Trip: > > class Trip(models.Model): >    ... trip stuff ... > > class QM(models.Mode

encoding and escaping of form values

2008-07-12 Thread commander_coder
I'm trying to write some of my first custom Django widgets, fields, and forms. I'm having some trouble making out what the source code does. I have radio buttons that end in html something like this. string Here "key" and "string" come from the db and could be non-ascii, or any string at all.

Re: Two edit_inlines between the same two models?

2008-07-12 Thread Aaron
Sorry for the stupid question, but what's an @property? By the way, what I have now is below (there are also several other models). I will try doing it your way now, although I don't understand the @property. class Trip(models.Model): title = models.CharField(maxlength="500", blank=True)

Re: ForeignKey with 0 meaning Null

2008-07-12 Thread Nick Craig-Wood
Nick Craig-Wood <[EMAIL PROTECTED]> wrote: > > I'm adapting a legacy database for use with Django and I've come > across a problem I haven't been able to solve! > > The database has ForeignKey fields which are sometimes 0, meaning > there is no related row in the other table. If this databa

Re: Did r7798 break comments?

2008-07-12 Thread wolan
hi, > I'm using the comments engine [0] provided by the framework, but after > updating to the revision 7798 [1] or later I get the error: > u'get_comment_count' tag has invalid content-type. As you can tell by > the error message, the exception is raised at the get_comment_count > [2] function,

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: signals sent twice

2008-07-12 Thread Malcolm Tredinnick
On Sat, 2008-07-12 at 13:49 +0100, bayo opadeyi wrote: > are there any conditions where signals are sent twice? It's possible that signal handler is registered twice, due to some particulars about how Python import paths work and the fact that Django imports your models in a slightly unpredictab

signals sent twice

2008-07-12 Thread bayo opadeyi
are there any conditions where signals are sent twice? i have these models (among others) #sales.models.py class Sale(models.Model): customer = models.ForeignKey(Customer) stock = models.ForeignKey(Stock) quantity = models.IntegerField() price = models.DecimalField(max_digits=10,de

Re: Automatic Image Resizing upon Upload

2008-07-12 Thread TheBoff
Wow: thanks for all the replies guys! Photologue is perhaps a bit heavyweight for my current purposes, although it looks like an extremely impressive bit of kit, and were I to make a dedicated photo gallery etc app with django, I would certainly use it. Embedding something in the save method see

Re: Validations and error messages

2008-07-12 Thread Jason S. Friedman
> Hi, > > This is my second hour with django. I have been working Rails but now > I am learnign some django too. > > I wonder how do you validate numeric, alphabetic, mix, special > characters data before calling save() ? > > And do you get any return after calling save()? I didnt get any on >

Re: urllib https post and parsing question

2008-07-12 Thread Bobby Roberts
ok it turns out they are just passing the variables back to me in a url so i have to figure out how to parse that with django nice and neatly. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Validations and error messages

2008-07-12 Thread Will Rocisky
Hi, This is my second hour with django. I have been working Rails but now I am learnign some django too. I wonder how do you validate numeric, alphabetic, mix, special characters data before calling save() ? And do you get any return after calling save()? I didnt get any on Shell. I actually wa

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