Re: Test response context & template always as lists?

2007-07-14 Thread oggie rob
Right! Meant to but hit the wrong list. Please ignore this thread... On Jul 14, 9:42 pm, theju <[EMAIL PROTECTED]> wrote: > Probably this post would be best answered on the Django-developers > list. > > Cheers > Thejaswi Puthraya --~--~-~--~~~---~--~~ You

Re: SQL VIEWs as Django Models for aggregation --- delete() issues with django.db.models.query: delete_objects

2007-07-14 Thread Russell Keith-Magee
On 7/13/07, JeffH <[EMAIL PROTECTED]> wrote: > > This post relates to two separate Django issues that intertwined for > me: > 1. Lack of aggregation support in Django's ORM > (I am delighted to see > http://groups.google.com/group/django-developers/browse_thread/thread/f433edf7b0ebdbcb/ > ) For

Re: python.py deserialization and handling foreign key fields ?

2007-07-14 Thread Russell Keith-Magee
On 7/14/07, Etienne Robillard <[EMAIL PROTECTED]> wrote: > > Hi Russell, > > Thanks for responding to this thread. You were right > for the data not matching the model. The assumption that > some_model_instance.__dict__.keys() would return the fields names > is simply wrong. :) You can get the

Re: URL design for security?

2007-07-14 Thread John Shaffer
On 7/14/07, Rogelio <[EMAIL PROTECTED]> wrote: > yet. I guess I was > thinking that even if the user was logged in, the URL still would be > showing potentially > sensitive info. I was thinking maybe I needed to create some random > sequence of > letters/numbers, store that in a model field and

Re: Test response context & template always as lists?

2007-07-14 Thread theju
Probably this post would be best answered on the Django-developers list. Cheers Thejaswi Puthraya --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Test response context & template always as lists?

2007-07-14 Thread oggie rob
Hi all, Playing around with the test client I found it frustrating that "context" can either be a single context or a list, depending on how the template is rendered. My feeling is they should always return lists. Likewise for the "template" field. I can see that no matter what there is a chance

Re: Usernames with spaces?

2007-07-14 Thread [EMAIL PROTECTED]
I was more hoping for a solution that didn't require modifying the Django codebase. Perhaps I'll tinker and submit a patch if this is the only viable solution. On Jul 14, 1:38 pm, Tim Chase <[EMAIL PROTECTED]> wrote: > > I've noticed that within the admin interface, if you try to > > edit or add

newforms-admin: admin related field options

2007-07-14 Thread David S.
I am using the newforms-admin branch, which is really great. But I realized I still have admin specific fields options in my model, e.g. blank, choices. I am wondering where they really belong. Thanks, David S. --~--~-~--~~~---~--~~ You received this message

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread David S.
> Webfaction django hosting rocks. I second that. Truly professional, responsive, and helpful. Peace, David S. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: URL design for security?

2007-07-14 Thread Rogelio
Thanks for the replies. No, I haven't incorporated authentication yet. I guess I was thinking that even if the user was logged in, the URL still would be showing potentially sensitive info. I was thinking maybe I needed to create some random sequence of letters/numbers, store that in a model

www.OutpatientSurgicare.com/video/

2007-07-14 Thread dvd_km
www.OutpatientSurgicare.com/video/ Outpatient Doctors Surgery Center is committed to offering the healthcare the community needs. We offer patients a meaningful alternative to traditional surgery. This state-of-the-art outpatient surgery center, located in the heart of Orange County, at 10900

Re: Updating multiple rows with Django DB API?

2007-07-14 Thread Miguel Filho
On 7/14/07, Steven Hilton <[EMAIL PROTECTED]> wrote: > > I'm working on a web app where if a particular conditions is met in > particular object, a number of objects in another class/table need to > be altered. Basically a trigger, but I'm trying to keep all my logic > in the app for the time

Re: JavaScript in template

2007-07-14 Thread skam
On 14 Lug, 23:20, Nathan Ostgard <[EMAIL PROTECTED]> wrote: > If you're using an SVN copy (not 0.96), there is already a context > processor for this. Add 'django.core.context_processors.media' to > TEMPLATE_CONTEXT_PROCESSORS in settings.py and you will be able to use > {{ MEDIA_URL }} in your

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread Nathan Ostgard
It's a question of value to the customer. Of course they don't necessarily care about Django -- they care about the product. It's up to you to illustrate to them, using Django, that you can deliver a better product to them than the competition, and that the costs are worth it. I've found that the

Re: JavaScript in template

2007-07-14 Thread Nathan Ostgard
If you're using an SVN copy (not 0.96), there is already a context processor for this. Add 'django.core.context_processors.media' to TEMPLATE_CONTEXT_PROCESSORS in settings.py and you will be able to use {{ MEDIA_URL }} in your templates. On Jul 14, 6:43 am, skam <[EMAIL PROTECTED]> wrote: >

Re: About create a database table dynamicly

2007-07-14 Thread Ned Batchelder
Generally, creating a table dynamically is the wrong thing to do. How will these tables differ from each other? For example, what user information is used to create the table? If each of the tables has the same structure, then you should create one table with an extra column to distinguish

Re: Email processing

2007-07-14 Thread skam
On 14 Lug, 21:43, Joe Beharriell <[EMAIL PROTECTED]> wrote: > Has anyone worked with processing inbound email messages through > Django? If so, can you offer any tips, tricks, or examples that may > help me with developing this further? Hello Joe, The email module of the python standard library

Email processing

2007-07-14 Thread Joe Beharriell
I'm currently working on custom-built CMS that will be used to power a local community website. Two of the biggest requests we've had for the new system are API support (quite a ways down our upcoming features list, but coming nonetheless) to allow posting from third-party applications and

Re: Avoiding HTTP 301 code using mod_python [SOLVED]

2007-07-14 Thread Miguel Filho
Well folks, with webfaction's support huge help, problem solved. The responsible for adding the port to the URL is: mod_dir! http://httpd.apache.org/docs/2.0/mod/mod_dir.html Quoting the documentation: "Provides for "trailing slash" redirects and serving directory index files" So mod_dir was

Re: Usernames with spaces?

2007-07-14 Thread Tim Chase
> I've noticed that within the admin interface, if you try to > edit or add a username that has spaces in it, you get a > validation error stating that there can be no spaces in > usernames. However, if I edit the actual table data manually > and try to login or perform other actions, everything

Re: model subclassing

2007-07-14 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Fri, 2007-07-13 at 21:31 -0500, Carl Karsten wrote: >> I am experimenting with subclassing a model. The parent class will be an >> abstract class that does not get 'managed' by django. Only the subclass >> will, >> and the table the subclass works with will

Usernames with spaces?

2007-07-14 Thread [EMAIL PROTECTED]
I've noticed that within the admin interface, if you try to edit or add a username that has spaces in it, you get a validation error stating that there can be no spaces in usernames. However, if I edit the actual table data manually and try to login or perform other actions, everything seems to

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread Michael
> > what i do is host on my own server until they are hooked on django > and then they either twist their provider's arms or get a new provider] but how I can convince them to change provider? I mean, they could hire some PHP programmer instead... they don't really care about the Django

Python Developer Position in LA

2007-07-14 Thread [EMAIL PROTECTED]
DigiSynd is an experienced team of Los Angeles-based digital pioneers with a unique vision: to create, produce, syndicate, and market online entertainment. DigiSynd uses time-honored storytelling techniques and valuable lessons from traditional media, but applies them in a medium of online

Re: About create a database table dynamicly

2007-07-14 Thread nick feng
Hi Carl, Thank you, I have resended the mail again, thanks . best wishes, nick - Original Message - From: "Carl Karsten" <[EMAIL PROTECTED]> To: Sent: Sunday, July 15, 2007 12:33 AM Subject: Re: About create a database table dynamicly > > > nick feng

Re: Database setup

2007-07-14 Thread Carl Karsten
surfwizz wrote: > I'm trying to do the django tutorial at > http://www.djangoproject.com/documentation/tutorial01/, > but I don't know how to set up a database. I do not have a dedicated > server or web hosting at this time, and I want to do some work on > setting up a website with database

Best Practice for translating db-stored values

2007-07-14 Thread Panos Laganakos
Using gettext_lazy, is the way to go, for marking models and fields for translation. Is there some general suggestion we're to follow, for translating values stored in the db? ie, let's say it's a model: class Furniture(models.Model): name = models.CharField(_('name'), maxlength=25) If

newforms: bound forms and prefix parameters

2007-07-14 Thread arthur debert
Hi Folks, While implementing a form with edit inline like functionality, I've hit a wall. In order to tell apart each inline model, I am using the "prefix" parameter to instantiate the form. It works, but if it's a bound form (whether from instance or getting values from a dict), if I pass it a

Re: using middleware vs. context_processors: best practice?

2007-07-14 Thread Jeremy Dunck
On 7/14/07, Amit Ramon <[EMAIL PROTECTED]> wrote: > 1. The language must be set before creating the menu (so the menu will be in > the correct language). I assume that middleware gets called before context > processors. Am I right here? Yes. > 2. I noticed that the middleware is called for

Re: URL design for security?

2007-07-14 Thread Tim Chase
> So my newbie question is: Is there a way a better way to design/ > obfuscate the URL scheme when dealing with sensitive information? I > know once I get some sort of authentication in place that will help, > but the idea of showing sensitive info in a URL still has me > concerned. The

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread Kenneth Gonsalves
On 14-Jul-07, at 6:10 PM, Michael wrote: > for costumers that already have some of hosting service, the chance > that they use a hosting service from that list is very low, almost > zero. > > That's means that I can't use Django or any other python-based > framework for my job ? > I'm asking

About create a database table dynamicly

2007-07-14 Thread nick feng
Hi, I had to create a table in the database according to the users' input imformation. Django seems has no topic about this, anyone has any idea on it?Thank you Best wishes, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

About create a database table dynamicly

2007-07-14 Thread nick feng
Hi, I had to create a table in the database according to the users' input imformation. Django seems has no topic about this, anyone has any idea on it?Thank you Best wishes, Nick --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: Database setup

2007-07-14 Thread Tim Chase
> Sure you can. You might want to look at sqlite, as it's the > easiest to set up. You can painlessly switch to a "better" > database engine when going to production, though sqlite does > quite well the job, even in production. I second Christian's suggestion of using sqlite for its minimal-fuss

Re: Database setup

2007-07-14 Thread Christian Hoeppner
Sure you can. You might want to look at sqlite, as it's the easiest to set up. You can painlessly switch to a "better" database engine when going to production, though sqlite does quite well the job, even in production. surfwizz escribió: > I'm trying to do the django tutorial at >

Updating multiple rows with Django DB API?

2007-07-14 Thread Steven Hilton
I'm working on a web app where if a particular conditions is met in particular object, a number of objects in another class/table need to be altered. Basically a trigger, but I'm trying to keep all my logic in the app for the time being. I'm wondering if there's a way to do this with the Django

Database setup

2007-07-14 Thread surfwizz
I'm trying to do the django tutorial at http://www.djangoproject.com/documentation/tutorial01/, but I don't know how to set up a database. I do not have a dedicated server or web hosting at this time, and I want to do some work on setting up a website with database systems before I get web

Re: URL design for security?

2007-07-14 Thread skam
Are you using authentication? It's better to handle security policies in your application instead of hiding informations in URLs Have a look at http://www.djangoproject.com/documentation/authentication Bye, Massimo --~--~-~--~~~---~--~~ You received this message

Re: JavaScript in template

2007-07-14 Thread skam
It's better to have the MEDIA_URL settings available in the request context. Write your own template context processor, so you could have {{ media_url }}/js/foo.js instead of hardcoding urls in templates. If you need to serve admin media from a separate server or change media directory you'll be

Re: installation issues

2007-07-14 Thread surfwizz
I think that the install from the website instructions worked. Your code helped me understand what I needed to do. thanks! On Jul 14, 6:04 am, Carl Karsten <[EMAIL PROTECTED]> wrote: > Ok, getting somewhere. That is the dir that needs to know about django. > > Next we need to know where

URL design for security?

2007-07-14 Thread Rogelio
Hi, I'm starting to write a grade book type application. There will be many teachers that will be logging in to access their student records. The student record will contain student grades and sensitive info such as student ID number. In the model each teacher will have a primary key (pk) and

Re: Django + newforms + jQuery

2007-07-14 Thread skam
On 12 Lug, 08:42, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > Hi, any one willing to share some examples of django newforms with > jQuery? Few months ago I posted on djangosnippets.org a widget that uses the jquery autocomplete plugin written by Jörn Zaefferer, have a look at

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread James Bennett
On 7/14/07, Michael <[EMAIL PROTECTED]> wrote: > That's means that I can't use Django or any other python-based > framework for my job ? If the host does not offer Python, you cannot use a Python-based framework. > I'm asking all the programmers that work for other people, how do you > work

Re: installation issues

2007-07-14 Thread Carl Karsten
Ok, getting somewhere. That is the dir that needs to know about django. Next we need to know where django is, and 'install' that into the site-packages dir. 'install' is just a link, .pth file or putting django directly in that dir. I recommend the link. more details are here:

using middleware vs. context_processors: best practice?

2007-07-14 Thread Amit Ramon
Hello, I'm working in a multilingual site, for which I have the following two requirements: 1. The language to use for content and ui is derived from the url. 2. All pages (rendered by different views) have a "constant" part - menu, title, etc. The menu is stored in the database (it's simply

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread Michael
On Jul 14, 2:24 pm, theju <[EMAIL PROTECTED]> wrote: > Hi Michael, > Quite a few hosting services support Django (and also mod_python). > Here is the list of Hosting Providers from the Django > Websitehttp://code.djangoproject.com/wiki/DjangoFriendlyWebHosts Thanks, I already saw that list,

Re: Django + newforms + jQuery

2007-07-14 Thread Gary Doades
Przemek Gawronski wrote: > > What I'm looking for now is, how to redirect to a different page with > the button, and sending to the page (django view) the id number. > > Przemek If you don't want to use ajax you can either use a form as normal to submit it and then issue a redirect at the

Re: Django + newforms + jQuery

2007-07-14 Thread Przemek Gawronski
> I'm assuming that you want to use some form a AJAX type request/response > for this? Well, once I'll feel comfortable with django and js, then probably, but not at the moment. > As an outline you might want to do something like this: > Display your list as a table > Use your workorder id

Re: is there any host servers that supports Django based sites?

2007-07-14 Thread theju
Hi Michael, Quite a few hosting services support Django (and also mod_python). Here is the list of Hosting Providers from the Django Website http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts On Jul 14, 4:09 pm, Michael <[EMAIL PROTECTED]> wrote: > I've been searching for free hosting

is there any host servers that supports Django based sites?

2007-07-14 Thread Michael
I've been searching for free hosting services that supports Mod_Python, I never find one. In addition, there are few non-free hosting services that supports it. so, let's say I'm building a Django based site for my costumer, the costumer knows nothing about computers so he don't care about the

Re: JavaScript in template

2007-07-14 Thread Przemek Gawronski
Now that was quick! Big thanks! Przemek -- AIKIDO TANREN DOJO - Poland - Warsaw - Mokotow - Ursynow - Natolin info: http://www.tanren.pl/ phone: +4850151 email: [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this message because you are subscribed

Re: JavaScript in template

2007-07-14 Thread theju
It is better you refer to the Django Documentation on serving static files http://www.djangoproject.com/documentation/static_files/ for greater clarity. Anyways here is the solution below: On Jul 14, 2:47 pm, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > Hi, how do I specify the source of JS

JavaScript in template

2007-07-14 Thread Przemek Gawronski
Hi, how do I specify the source of JS scripts in my templates? In my settings.py I've got: MEDIA_ROOT = '/home/django/work/fw/media/' MEDIA_URL = 'http://192.168.1.1' ADMIN_MEDIA_PREFIX = '/media/' In the template (base.html):

Re: Difference between a model's field and it's translated version - admin

2007-07-14 Thread Panos Laganakos
Thanks for pointing this out for me mate. I can't afford to switch to the trunk right now, but it's good to know that it has been taken care of. On Jul 14, 6:44 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-07-13 at 16:19 +, Panos Laganakos wrote: > > If I have the model

Re: confused about the order of the CacheMiddleware in MIDDLEWARE_CLASSES

2007-07-14 Thread Mesh007
Can any body give me some help information? Thanks very much On 7月13日, 下午3时06分, Mesh007 <[EMAIL PROTECTED]> wrote: > Hi, all: > > I touch django not long before, and am learning it, when i touch the > CacheMiddleware, i am confused confused about the order of the > CacheMiddleware in

Re: django on FreeBDS

2007-07-14 Thread [EMAIL PROTECTED]
Hi, On Jul 14, 8:52 am, Przemek Gawronski <[EMAIL PROTECTED]> wrote: > Hi, a hosting company has installed django for me on their system > (FreeBSD 6.2-RELEASE-p5). When I try to run (ssh under jailshell): > bytes += read(_urandomfd, n - len(bytes)) > OSError: [Errno 6] Device not