The Biggest Webpage In The World...Holy Moly !

2008-02-17 Thread corky
www.thebiggestwebpageintheworld.com --~--~-~--~~~---~--~~ 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 from this group, send e

How to use filefield, and specify custom, dynamic upload_to

2008-02-17 Thread shabda
I have a model like class File(models.Model): file = models.FileField(upload_to = 'files') project = models.ForeignKey(Project) class Project(models.Model): name = models.CharField(max_length = 100) I want to have each file go a specific directory corresponding to its project_name So I w

how to get related foreign key when using values in query

2008-02-17 Thread [EMAIL PROTECTED]
i have 2 Models(for example): one is Category, have 2 fields: title and slug, the other is Entry with 4 fields: title, time,category(foreign key),content. now i just want show entry title and category slug, so i use this queryset: e = Entry.objects.all().values('title','category') the benefit is

Re: costumizing admin

2008-02-17 Thread Almir Karic
it seems that the name of the template is hardcoded in the code def result_list(cl): return {'cl': cl, 'result_headers': list(result_headers(cl)), 'results': list(results(cl))} result_list = register.inclusion_tag("admin/change_list_results.html")(result_list) :( c

Re: is_secure() behind reverse proxy

2008-02-17 Thread Graham Dumpleton
On Feb 18, 2:14 pm, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Does anyone have suggestions on how to make request.is_secure() work > from behind a reverse proxy? I have nginx proxying to apache but since > nginx (and not apache) is handling SSL the HTTPS environment variable > that is_secur

Re: Admin section 404 error

2008-02-17 Thread Karen Tracey
On Feb 15, 2008 11:26 PM, Shadow <[EMAIL PROTECTED]> wrote: > > Error message: > > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > > 1. ^admin/ > > The current URL, my-site.com/admin, didn't match any of these. > The ^ at the beginning of the urlpat

is_secure() behind reverse proxy

2008-02-17 Thread [EMAIL PROTECTED]
Does anyone have suggestions on how to make request.is_secure() work from behind a reverse proxy? I have nginx proxying to apache but since nginx (and not apache) is handling SSL the HTTPS environment variable that is_secure() reads from never gets set. This is easily solvable for standard redire

Re: Admin section 404 error

2008-02-17 Thread Shadow
Anyone? :P On Feb 16, 3:26 pm, Shadow <[EMAIL PROTECTED]> wrote: > Error message: > > Using the URLconf defined in mysite.urls, Django tried these URL > patterns, in this order: > >1. ^admin/ > > The current URL, my-site.com/admin, didn't match any of these. > > On Feb 16, 3:23 pm,Shadow<[EMA

Re: Error messages during save() process

2008-02-17 Thread Eric Abrahamsen
> No idea what's going on. However, you should be able to test this. You > now the queryset that is causing the problem, so run it manually (e.g. > via "manage.py shell") on your dev system and see what happens. Make > sure to replace one of the inputs with something that cannot > possibly be >

Re: Django hosting service running Os C

2008-02-17 Thread Jeff Anderson
Hello, I was reading about OS X in virtualized environments, and it appears that the technology is still catching up with the new license that allows OS X server to run in a virtualized environment. Your best bet is probably to find a shared host, but I don't know of any off hand. Jeff Ander

Django hosting service running Os C

2008-02-17 Thread Flavio Curella
Hi, I developed a small application using django and CoreGraphics library as a school project. I'm wondering to put it online and I googled around looking for a web hosting solution (shared or VPS) running on Os X and that supports Django. Does anybody know one? Thanks, Flavio Curella. --~--~--

Re: backtrace trying to get django deployed with apache and mod_python

2008-02-17 Thread msoulier
On Feb 16, 8:37 pm, Graham Dumpleton <[EMAIL PROTECTED]> wrote: > Are you trying to use mod_python 2.7.X on Apache 1.3 by chance? Indeed I am. > From memory ap_auth_type attribute may only be in Apache 2.X and thus > you need to be using mod_python 3.X, preferably 3.3.1, on Apache 2.X. Ok, than

Re: Problem with django.db.transaction.commit_manually

2008-02-17 Thread Brot
Hello again, here is a code example. Hope someone could help me - from otherfile import test @transaction.commit_manually def view(request, secid): result = {'status': 'OK', 'msg': None} try: res

Re: Is queryset.model._meta.verbose_name_plural broken

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 13:15 -0800, meppum wrote: > thanks. semantics just got the best of me unicode object == unicode > string. > > you said before that it "Looks like it's been marked up with > ugettext_lazy()". Is this something I've done without realizing it or > was this just a change that

Re: Is queryset.model._meta.verbose_name_plural broken

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 12:58 -0800, meppum wrote: > Okay thanks. I can figure out how to pass it through smart_str() but > how would i convert it to a unicode object? The documentation is your friend: http://www.djangoproject.com/documentation/unicode/#translated-strings Malcolm -- Many are ca

Re: nqotd: django-registration and using a different form class

2008-02-17 Thread [EMAIL PROTECTED]
I seem to have fixed my problem but I'm not entirely sure what I did to fix it. I must have had a typo somewhere in my urls.py file as once I re-added the second entry for /accounts/register/ to include the new form_class, everything worked fine. On Feb 16, 2:51 pm, "[EMAIL PROTECTED]" <[EMAIL

Re: Head swimming - JavaScript libraries

2008-02-17 Thread Peter Rowell
Yet another vote for jQuery. It completely changed the way I look at using JS on pages. BTW, ext works with jQuery. See http://docs.jquery.com/Tutorials:Using_Ext_With_jQuery --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Is queryset.model._meta.verbose_name_plural broken

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 11:57 -0800, meppum wrote: > I decided to take the plunge last night and upgrade from 0.96 to the > svn version of django, everything seems to work fine, except the > following code snipped no longer works. Instead of getting the plural > name i get the following as a string

Weighted Random Sample

2008-02-17 Thread ringemup
How would you go about taking a weighted random sample of a dataset? I.E. I have a table with value and frequency columns, and will be taking random samples of 20 unique rows. A row with a frequency of 10 should appear in 10 times as many sample sets as a row with a frequency of 1. Denormalizat

How/where do you add middleware (was: empty PATH_INFO with LiteSpeed / FastCGI)

2008-02-17 Thread Austin Govella
On Jan 22, 9:39 pm, Dan Conner <[EMAIL PROTECTED]> wrote: > well, one way to do this is through a middleware class, like this: > class SetEmptyPathInfo(object): >     def process_request(self, request): >         if not request.path: >             request.META['PATH_INFO'] = '/' >             requ

Re: Deploying Django - can't get past the welcome screen

2008-02-17 Thread Brian Luft
Your code is apparently in a project called "thumbslap": >If you plan to use a database, edit the DATABASE_* settings in >thumbslap/settings.py. >Start your first app by running python thumbslap/manage.py startapp >[appname]. But your settings file is ROOT_URL_CONF set to "mysite.urls". Is that

Re: Filter ModelField content

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 18:39 +0100, Florian Lindner wrote: > Hello, > I need to modify the date of one model field (TextField) each time > before it is displayed. The modifications depend on one other field in > the same Model. > I think the best way to do this is to subclass TextField and ove

Filter ModelField content

2008-02-17 Thread Florian Lindner
Hello, I need to modify the date of one model field (TextField) each time before it is displayed. The modifications depend on one other field in the same Model. I think the best way to do this is to subclass TextField and override the method to get contents. My questions: 1) How is this met

Re: Error messages during save() process

2008-02-17 Thread Malcolm Tredinnick
On Mon, 2008-02-18 at 00:54 +0800, Eric Abrahamsen wrote: > > > > So it seems like there's something else going wrong. Does the same > > error > > occur if you try to pull an image from the database that is guaranteed > > not to exist (so there's no question of it being a race condition)? If >

Re: Error messages during save() process

2008-02-17 Thread Eric Abrahamsen
> > So it seems like there's something else going wrong. Does the same > error > occur if you try to pull an image from the database that is guaranteed > not to exist (so there's no question of it being a race condition)? If > so, that just means your error handling for missing items needs > imp

Re: Error messages during save() process

2008-02-17 Thread Malcolm Tredinnick
On Mon, 2008-02-18 at 00:21 +0800, Eric Abrahamsen wrote: > On Feb 18, 2008, at 12:10 AM, Malcolm Tredinnick wrote: > >> > > How are you doing your image saving? In the normal course of things, > > the > > image data is saved to disk *before* the corresponding object is saved > > to the databas

Re: Error messages during save() process

2008-02-17 Thread Eric Abrahamsen
On Feb 18, 2008, at 12:10 AM, Malcolm Tredinnick wrote: >> > How are you doing your image saving? In the normal course of things, > the > image data is saved to disk *before* the corresponding object is saved > to the database. So that would mean it wasn't visible before saving > was > complet

Re: Head swimming - JavaScript libraries

2008-02-17 Thread AmanKow
My $0.02: jquery is the way to go. The interface is very simple and clean, it is very simple to extend, the ui is limited but getting better and there are a lot of third party plugins for it from a very active and helpful community. A real bonus is the dom manipulation. Sooner or later we all

Problem with django.db.transaction.commit_manually

2008-02-17 Thread Brot
Hello, If I have a view and use the 'django.db.transaction.commit_manually' decorators. All worked well, but than I inserted a function call into the view. In this function I don't touch the database If I call the view I get following error message: Transaction managed block ended with pending C

Re: Error messages during save() process

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 06:54 -0800, Eric Abrahamsen wrote: > I've got a Picture model which has a rather lengthy/resource-intensive > custom save() method, with lots of PIL operations and whatnot. I've > noticed that if I access a view that would call a Picture from the > database while it's still

Re: Cleaning sessions that expire at browser close

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 06:33 -0800, char101 wrote: > On Feb 17, 9:15 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> > wrote: > > This is all documented. > > > > Look at the SESSION_EXPIRE_AT_BROWSER_CLOSE setting and the > > SESSION_COOKIE_AGE setting. You don't need a last modified column, since > >

Re: Error messages during save() process

2008-02-17 Thread char101
On Feb 17, 10:24 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > > > Have you tried to increase the proxy timeout for reading from the > > remote server? > > I have not, and would not, to my embarrassment, even know how to go   > about twiddling such a setting. Is that an Apache configuration thi

Re: Error messages during save() process

2008-02-17 Thread Eric Abrahamsen
On Feb 17, 2008, at 10:58 PM, char101 wrote: > > On Feb 17, 9:54 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: >> Proxy Error >> >> The proxy server received an invalid response from an upstream >> server. >> The proxy server could not handle the request GET /wangfujing/. >> >> Reason: Error r

Invitation for new IT Forum.

2008-02-17 Thread Sankar R
Hi Gays I am Sankar, I created a new forum to share the technical Knowledge, Please Join with me to this forum. ! Welcome you ! www.sankar.co.in Thanks & Regards Sankar R --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google G

Re: Error messages during save() process

2008-02-17 Thread char101
On Feb 17, 9:54 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote: > Proxy Error > > The proxy server received an invalid response from an upstream server. > The proxy server could not handle the request GET /wangfujing/. > > Reason: Error reading from remote server Hi, Have you tried to increase th

Error messages during save() process

2008-02-17 Thread Eric Abrahamsen
I've got a Picture model which has a rather lengthy/resource-intensive custom save() method, with lots of PIL operations and whatnot. I've noticed that if I access a view that would call a Picture from the database while it's still in its save phase (it can take a good thirty seconds), I get the f

Re: Problem with interactive shell.

2008-02-17 Thread char101
On Feb 17, 8:50 pm, PB <[EMAIL PROTECTED]> wrote: >   File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ > python2.3/site-packages/django/core/management.py", line 1284, in > run_shell >     code.interact() > AttributeError: 'module' object has no attribute 'interact' Hi, Python

Re: Cleaning sessions that expire at browser close

2008-02-17 Thread char101
On Feb 17, 9:15 pm, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > This is all documented. > > Look at the SESSION_EXPIRE_AT_BROWSER_CLOSE setting and the > SESSION_COOKIE_AGE setting. You don't need a last modified column, since > the expiry time is last modified + SESSION_COOKIE_AGE. Hi, Than

Re: Introductory Django Screencasts

2008-02-17 Thread Siddhi
Hi Matt, Thanks! Glad you found it useful. -- Siddharta Govindaraj http://siddhi.blogspot.com http://www.silverstripesoftware.com/blog/ On Feb 14, 9:55 pm, "Matthew Miller" <[EMAIL PROTECTED]> wrote: > this rocks. i especially like the #2 of the series as this helps my web > development team; wh

Re: Cleaning sessions that expire at browser close

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 06:05 -0800, char101 wrote: > Hi, > > I set my sessions lifetime to expire when the browser is closed. My > application do not use login, the session is used to hold temporary > data. Since there is no login, there is no logout, and the session is > never deleted from the d

Cleaning sessions that expire at browser close

2008-02-17 Thread char101
Hi, I set my sessions lifetime to expire when the browser is closed. My application do not use login, the session is used to hold temporary data. Since there is no login, there is no logout, and the session is never deleted from the database. My question is how am I going to clean the unused ses

Problem with interactive shell.

2008-02-17 Thread PB
When I try to run the interactive shell I get the following error: File "manage.py", line 11, in ? execute_manager(settings) File "/System/Library/Frameworks/Python.framework/Versions/2.3/lib/ python2.3/site-packages/django/core/management.py", line 1672, in execute_manager execute_from

Re: "Presales" questions

2008-02-17 Thread Ariel Mauricio Nunez Gomez
Phoenix, I suggest you take a look at Jeff Croft's post [1], it is supposed to be for non-programmers, but I guess it also applies to "I don't want to learn another language"-progammer. That said, I am pretty sure you'll start loving python once you go start walking the django path. [1] http://

Re: relate data forms

2008-02-17 Thread zeev
Hello Rajesh Thanks for the quick answer. Zeev On Feb 15, 10:04 pm, Rajesh Dhawan <[EMAIL PROTECTED]> wrote: > On Feb 15, 2:29 pm,zeev<[EMAIL PROTECTED]> wrote: > > > Hello > > > I am new in Django > > > This is the code Iwrote > > >u = User.objects.get(username = "zeev") > > fo

[geodjango] Informix

2008-02-17 Thread Mateusz Loskot
Hi, First, I'd like to wave to all and say hello! I'm mainly interested in geodjango and I'm looking for a dedicated mailing list, is there any? I've read in the archives that it's valid to ask geodjango questions here, so I'll try. I'm looking for recommendations about using (geo)django with I

Re: Head swimming - JavaScript libraries

2008-02-17 Thread Horst Gutmann
Well, it really depends on what you want. For instance if you plan to mess around a lot with JSON, you will have to extend jQuery quite a bit, since it only comes with the bare minimum of what you need to handle AJAX-JSON responses. Please correct me, if I'm wrong here, but I couldn't find a seria

Re: Head swimming - JavaScript libraries

2008-02-17 Thread Hraban
Another vote for jQuery - if you don't need UI widgets. jQuery UI crashes or stalls Safari all the time - at least when I tried it some time ago. For being rather new I hope it's getting better. ExtJS (aka YUI-Ext) has the best UI widgets, but I didn't understand how to use it with my (c)lean HTM

Re: Deploying Django - can't get past the welcome screen

2008-02-17 Thread Darthmahon
== File: urls.py == from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), (r'^$', 'mysite.views.index'), (r'^settings/', 'mysite.people.v

Re: Deploying Django - can't get past the welcome screen

2008-02-17 Thread Darthmahon
== File: urls.py == from django.conf.urls.defaults import * urlpatterns = patterns('', (r'^admin/', include('django.contrib.admin.urls')), (r'^$', 'thumbslap.views.index'), (r'^settings/', 'thumbslap.

Re: Tumblelog - Generic table or combine queries or...?

2008-02-17 Thread Malcolm Tredinnick
On Sun, 2008-02-17 at 00:50 -0800, Jamie Pittock wrote: > Hi, > > I'm wanting to create a "tumblelog" of sorts made up of content from > several different models within my site and I'm looking for > suggestions on the best way of accomplishing it. The two ideas I have > so far are: > > 1. Comb

Tumblelog - Generic table or combine queries or...?

2008-02-17 Thread Jamie Pittock
Hi, I'm wanting to create a "tumblelog" of sorts made up of content from several different models within my site and I'm looking for suggestions on the best way of accomplishing it. The two ideas I have so far are: 1. Combine the results from different queries into one (as already discussed her

Re: Django scope

2008-02-17 Thread Malcolm Tredinnick
Hi Jean-Christophe, Before I set out (on something that has turned out longer than I intended, as usual), I want to say that although these answers don't seem very specific and almost certainly aren't addressing things in the language -- using a direct comparison to Java -- you would like. Howev