Re: What is the best way to manually create an HTML form from a ModelForm

2010-08-23 Thread orokusaki
Ahh, thanks Scott. That's very helpful. On Aug 23, 6:18 am, Scott Gould wrote: > You can refer to individual fields by name, for example: > > > > >     {% form.first_name %} > > > > Looping through them works fine for simple forms but as you say, if > you want something

Re: the structure of a registration app

2010-08-23 Thread Kenneth Gonsalves
On Mon, 2010-08-23 at 18:29 -0700, John Yeukhon Wong wrote: > I want to understand something... > Let say I want to do a low-level registration handling myself, using > the User class that comes with Django. > > I started an app called accounts in my project > > So what should I put in model?

the structure of a registration app

2010-08-23 Thread John Yeukhon Wong
I want to understand something... Let say I want to do a low-level registration handling myself, using the User class that comes with Django. I started an app called accounts in my project So what should I put in model? Some examples would create an additional file called forms.py to put the

Re: stream (large) files from the back-end via Django to the user?

2010-08-23 Thread Eric Chamberlain
On Aug 23, 2010, at 4:25 PM, Markus wrote: > > Surely the whole point of a content delivery network is to act as a > proxy for the data source. Buffering it through Django means it's no > longer a CDN, it's just a data store. > > Yes. The problem is that currently our CDN is based on Hadoop

Re: stream (large) files from the back-end via Django to the user?

2010-08-23 Thread Markus
> Surely the whole point of a content delivery network is to act as a > proxy for the data source. Buffering it through Django means it's no > longer a CDN, it's just a data store. > Yes. The problem is that currently our CDN is based on Hadoop which serves us really well for internal purpose. We

Re: stream (large) files from the back-end via Django to the user?

2010-08-23 Thread Steve Holden
On 8/23/2010 6:44 PM, Markus wrote: > Hi, > > sorry for the delay of my answer. > > On Thu, Aug 12, 2010 at 5:21 PM, vjimw > wrote: > > When we upload files to the CDN, we store that path with the object. > Then we

Re: stream (large) files from the back-end via Django to the user?

2010-08-23 Thread Markus
Hi, sorry for the delay of my answer. On Thu, Aug 12, 2010 at 5:21 PM, vjimw wrote: > When we upload files to the CDN, we store that path with the object. > Then we override the widget for the file so we can server the file > directly from the CDN using that field.

Start up company is looking for an experianced Django web developer .

2010-08-23 Thread empwanted
Hi Everyone, Our company is looking for an experienced full time Django programmer to work with our development team on a contract basis. We are a start up that is developing a large web application with extensive database interfaces. We are based in the US so living in the US is a plus. The

Re: virtualenv and standalone scripts

2010-08-23 Thread Oivvio Polite
On Mon, Aug 23, 2010 at 10:54:21PM +0200, Oivvio Polite wrote: > > What's the right way to go about it? > Ok, just did some more googling and found out about custom management commands, that clearly are the django way of solving my problem. oivvio -- http://pipedreams.polite.se/about/ --

virtualenv and standalone scripts

2010-08-23 Thread Oivvio Polite
Following advice on this list I've moved to virtualenv+pip to manage my django stack, which so far is working out nicely. But what should I do about standalone scripts? Say I have a project called mysite. If I'm in a virtualenv and execute a standalone script, mysite won't be on my pythonpath

Re: Please wait page

2010-08-23 Thread Gerard Flanagan
Bradley Hintze wrote: Hi all, My webpage has a process that takes about 10-15 seconds. Is there a way I can have an intermediate 'Please wait' page, preferably with blinking shapes (dots) so that the user knows that the process is still working. As an example try finding a flight at

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread rafael.nu...@gmail.com
http://www.42topics.com/dumps/django/docs.html On Mon, Aug 23, 2010 at 9:53 AM, Subhranath Chunder wrote: > You should try django non-rel project. > > Thanks, > Subhranath Chunder. > > On Aug 23, 2010 3:08 PM, "nobosh" wrote: > > I'm very interested in

'QuerySet' object has no attribute 'get_payload'

2010-08-23 Thread Cole743
"AttributeError at _ 'QuerySet' object has no attribute 'get_payload' Request Method: POST Request URL: Exception Type: AttributeError Exception Value: 'QuerySet' object has no attribute 'get_payload' Exception Location:

Please wait page

2010-08-23 Thread Bradley Hintze
Hi all, My webpage has a process that takes about 10-15 seconds. Is there a way I can have an intermediate 'Please wait' page, preferably with blinking shapes (dots) so that the user knows that the process is still working. As an example try finding a flight at orbitz.com, there is an

Re: How to troubleshoot path and permission problems?

2010-08-23 Thread ringemup
Your server's error logs can also be informative. On Aug 23, 2:02 pm, Antoni Aloy wrote: > 2010/8/23 vishy : > > > Hi, > > > I am having issues with production server.Everything is running fine > > on my local development server.On production

Re: How to troubleshoot path and permission problems?

2010-08-23 Thread Antoni Aloy
2010/8/23 vishy : > Hi, > > I am having issues with production server.Everything is running fine > on my local development server.On production site(using apache), CSS > files related to admin section are not being loaded.I have a feature > where admin can add products and

How to troubleshoot path and permission problems?

2010-08-23 Thread vishy
Hi, I am having issues with production server.Everything is running fine on my local development server.On production site(using apache), CSS files related to admin section are not being loaded.I have a feature where admin can add products and upload images for the product.But,when admin hits

Connecting a django-registration signal to a function

2010-08-23 Thread Kai Timmer
Hello, this may sound stupid, but all I want to do is to connect the user_activated signal from django-registration to a simple function. And I think that I missed an important part. I have a signals.py file in my django app with a function create_db which is defined like this: def

Re: Loop over a form's choices (radio button) and render it

2010-08-23 Thread Bill Freeman
Andreas, I'll give it a try, but it won't be soon. Other projects are hot. Bill On Sun, Aug 22, 2010 at 9:07 AM, Andreas Pfrengle wrote: > Hello Bill, > > thanks for the code. It took half the weekend, but finally I built > upon this to get a radiobutton-iterator. This

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread Subhranath Chunder
You should try django non-rel project. Thanks, Subhranath Chunder. On Aug 23, 2010 3:08 PM, "nobosh" wrote: I'm very interested in finding a up-to-date tutorial that shows steps for getting DJANGO running on Google App Engine, anyone know of any such tutorials?

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Steve Holden
On 8/23/2010 8:08 AM, Russell Keith-Magee wrote: > On Mon, Aug 23, 2010 at 7:53 PM, Steve Holden wrote: >> On 8/23/2010 7:48 AM, Russell Keith-Magee wrote: >>> On Mon, Aug 23, 2010 at 7:32 PM, Andy wrote: >> [...] Also how random is random -

Re: ANN: nosedjango 0.8.1

2010-08-23 Thread Jyrki Pulliainen
On Aug 23, 2:26 pm, Reinout van Rees wrote: > On 08/23/2010 08:54 AM, Jyrki Pulliainen wrote: > > > Hi there, > > > I'm pleased to announce new version of Django testing plugin for nose: > > nosedjango version 0.8.1. > > What are the differences

Re: What's the best way to custom the add page (in django admin site)

2010-08-23 Thread Yangmin Li
sorry for the previous incomplete message. Here is what I want to ask, thanks in advanced. I have a model called request, after registered in admin backend, user can add new request object in admin pages. I want to modify the request-add page to this: only some of the model fields will be shown

What's the best way to custom the add page (in django admin site)

2010-08-23 Thread Yangmin Li
Hi All , -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this

Re: Prepopulate some fields in a admin add form

2010-08-23 Thread Scott Gould
First, just to make absolutely clear you understand, the "user's name" isn't the foreign key itself -- that would be the user's ID. The user's name is what would be displayed to help you *select* the correct ID, under the hood. To the question at hand, it's quite simple to add a method to your

Re: What is the best way to manually create an HTML form from a ModelForm

2010-08-23 Thread Scott Gould
You can refer to individual fields by name, for example: > >     {% form.first_name %} > Looping through them works fine for simple forms but as you say, if you want something more elaborate in your template, you sometimes need to go field-by-field. What I do is write an inclusion tag with

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Russell Keith-Magee
On Mon, Aug 23, 2010 at 7:53 PM, Steve Holden wrote: > On 8/23/2010 7:48 AM, Russell Keith-Magee wrote: >> On Mon, Aug 23, 2010 at 7:32 PM, Andy wrote: > [...] >>> Also how random is random - would I get a uniform distribution of >>> records among

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Steve Holden
On 8/23/2010 7:48 AM, Russell Keith-Magee wrote: > On Mon, Aug 23, 2010 at 7:32 PM, Andy wrote: [...] >> Also how random is random - would I get a uniform distribution of >> records among the shards? > > Depending on your level of mathematical rigor, that's not a simple

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Russell Keith-Magee
On Mon, Aug 23, 2010 at 7:32 PM, Andy wrote: > On Aug 20, 10:04 pm, Russell Keith-Magee > wrote: > >>Of course, given that you know your sharding scheme, you could use the >>router directly. >> >>Tweet.objects.using(router.db_for_read(Tweet,

Re: Best practice for auth.User/UserProfile division?

2010-08-23 Thread Steve Holden
On 8/23/2010 1:52 AM, adambossy wrote: > I'm helping build a social networking site which makes heavy use of > django built-in User model and its relationship to other Users on the > site. We created a UserProfile per the django documentation [http:// >

Re: How does Django handle auto-increment PK when a model is sharded horizontally into multiple databases?

2010-08-23 Thread Andy
On Aug 20, 10:04 pm, Russell Keith-Magee wrote: >Of course, given that you know your sharding scheme, you could use the >router directly. > >Tweet.objects.using(router.db_for_read(Tweet, author=a)).filter(author_id=a) Ah Thanks. This is what I need. > You won't get

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread Steve Holden
On 8/23/2010 7:29 AM, Russell Keith-Magee wrote: > On Mon, Aug 23, 2010 at 1:01 PM, nobosh wrote: >> I'm very interested in finding a up-to-date tutorial that shows steps >> for getting DJANGO running on Google App Engine, anyone know of any >> such tutorials? >> >>

Re: DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread Russell Keith-Magee
On Mon, Aug 23, 2010 at 1:01 PM, nobosh wrote: > I'm very interested in finding a up-to-date tutorial that shows steps > for getting DJANGO running on Google App Engine, anyone know of any > such tutorials? > > Surprisingly, Google's App Engine DJANGO docs are almost a year

Re: ANN: nosedjango 0.8.1

2010-08-23 Thread Reinout van Rees
On 08/23/2010 08:54 AM, Jyrki Pulliainen wrote: Hi there, I'm pleased to announce new version of Django testing plugin for nose: nosedjango version 0.8.1. What are the differences with http://pypi.python.org/pypi/django-nose? I just got my test + hudson setup more or less working, so I'm

Re: Come on, share your django powered sites with others.//Fwd: A tornado powered site to show any project powered sites(open source)

2010-08-23 Thread Stone Puzzle
It's official online now after two weeks beta testing. A bunch of sites already been submitted, come on and enjoy it. Below list some popular projects' sub-sites: http://django.poweredsites.org Django poweredsites http://mongodb.poweredsites.org MongoDB powered sites.

Re: FileField empty after form validation

2010-08-23 Thread Karen Tracey
On Mon, Aug 23, 2010 at 4:14 AM, josephi wrote: > Hi, I have a suspicion that my problem might not be Django specific, > but I'm not entirely sure, and would appreciate any pointers to > information on the subject. > > I have a Form with several fields, one of which is a

Re: first time app - admin site importerror

2010-08-23 Thread Alexandre González
I think that you must write models, not model On Mon, Aug 23, 2010 at 11:50, maclin kallat wrote: > Try and check if all the imports in your models.py file are OK. > > -- > *From:* burnsr77 > *To:* Django users

Re: first time app - admin site importerror

2010-08-23 Thread maclin kallat
Try and check if all the imports in your models.py file are OK. From: burnsr77 To: Django users Sent: Mon, 23 August, 2010 5:09:02 Subject: first time app - admin site importerror Hi everyone, I have begun my

Re: django-admin.py cleanup large scale

2010-08-23 Thread bfrederi
It turned out that the easiest and most effective way to handle it was to run this script at an off peak time: http://djangosnippets.org/snippets/1273/ Not really sure how long it actually took to ran (I should have timed it...), but it was less than 2 and a half hours on 40+ million records.

FileField empty after form validation

2010-08-23 Thread josephi
Hi, I have a suspicion that my problem might not be Django specific, but I'm not entirely sure, and would appreciate any pointers to information on the subject. I have a Form with several fields, one of which is a FileField. This field is required. If I fill in the FileField but the form doesn't

DJANGO + Google App Engine, Getting Started Tutorial

2010-08-23 Thread nobosh
I'm very interested in finding a up-to-date tutorial that shows steps for getting DJANGO running on Google App Engine, anyone know of any such tutorials? Surprisingly, Google's App Engine DJANGO docs are almost a year old. What gives? thanks! -- You received this message because you are

first time app - admin site importerror

2010-08-23 Thread burnsr77
Hi everyone, I have begun my first Django app according to the instructions on the site (http://docs.djangoproject.com/en/1.2/intro/ tutorial02/). I've followed the instructions to activate the admin site, but the site doesn't seem to load correctly. This is the error I'm getting: "ImportError at

ANN: nosedjango 0.8.1

2010-08-23 Thread Jyrki Pulliainen
Hi there, I'm pleased to announce new version of Django testing plugin for nose: nosedjango version 0.8.1. With this plugin you can write standard Nose unit tests for a Django application. The plugin takes care of finding your applications settings.py file and creating/tearing down test