Re: Setting up my application

2007-05-19 Thread Duc Nguyen
Why can't it just be a "catch-all" url like: (r'(?P\w+)/', 'theview') and then in your view: def theview(request, manufacturer): if manufacturer in my_manufacturers: do_something() else: # error out with unknown manufacturer msg? Greg wrote: > I'm working on creating

Setting up my application

2007-05-19 Thread Greg
I'm working on creating an e-commerce site in Django. I have a website that sells area rugs from 20 different manufacturers. I am wondering what the best way to configure my urls.py file. I've been thinking of a couple of different ways to accomplish this. 1) Contained all in one url line

Re: tests: one failure --> all test declared failed

2007-05-19 Thread Russell Keith-Magee
On 5/19/07, Sandro Dentella <[EMAIL PROTECTED]> wrote: > > Hi, > > I'm trying to create a simple TestCase that should test several different > urls via get. I have a strange behaviour in that test works correctly if I > don't have @login-required decorator on the views *or* if I require >

Re: Securing static files

2007-05-19 Thread Kyle Fox
Maybe I'm not understanding what the problem is, but why can't you just make a new directory for each user? > > user A uploads file 1 to /static_files//file1.jpg --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: mod_python without httpd.conf?

2007-05-19 Thread Graham Dumpleton
On May 19, 9:04 pm, Daniel Ellison <[EMAIL PROTECTED]> wrote: > On Friday 18 May 2007 21:32:33 Graham Dumpleton wrote: > > > This will all only work if the web site administrator has also set: > > > AllowOverride FileInfo > > > for the directory containing the .htaccess file you want to add the

newform and edit in line

2007-05-19 Thread yml
Hello, I am trying to create a form equivalent to the edit inline that is implemented in the admin interface. I have a models with "Survey", "Poll", "Choice" as describe below and I would like to have a single page to create my Survey with multiple questions (*n) and multiple (*n) choices.

Re: TypeError: save_file() got an unexpected keyword argument 'save'

2007-05-19 Thread derek
fixed it. i was using the custom image uploader available here: http://code.djangoproject.com/wiki/CustomUploadAndFilters i simply added "save=True" to the def and the super call, and it works fine. (updated the code on the wiki too) thanks, derek On May 19, 1:26 pm, Malcolm Tredinnick

RE: Django newcomer - model question

2007-05-19 Thread Franco Gasperino
That solves it. Thanks! - Franco -Original Message- From: django-users@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf Of Malcolm Tredinnick Sent: Saturday, May 19, 2007 12:17 PM To: django-users@googlegroups.com Subject: Re: Django newcomer - model question On Sat, 2007-05-19

Re: Django newcomer - model question

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 12:02 -0700, [EMAIL PROTECTED] wrote: > > Greetings. I'm trying to get my head wrapped around django, and the > ORM model. So far, I've been pleased with what I've experienced. > However, I'm having some trouble nailing down a couple relations. > > A container can hold

Django hosting

2007-05-19 Thread Christian M Hoeppner
Hi there! I was wondering what all of you are using to host django powered sites. I'm using a dedicated virtual at mediatemple, and am thinking of switching to a joyent accelerator. What do you think? Kind regards, Chris Hoeppner www.pixware.org

Django newcomer - model question

2007-05-19 Thread franco . gasperino
Greetings. I'm trying to get my head wrapped around django, and the ORM model. So far, I've been pleased with what I've experienced. However, I'm having some trouble nailing down a couple relations. A container can hold (reference) multiple items of the same primary key. I need a method of

Re: TypeError: save_file() got an unexpected keyword argument 'save'

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 11:02 -0700, derek wrote: > i also am seeing this error: > > TypeError at /do.upload_photo > save_file() got an unexpected keyword argument 'save' > Request Method: POST > Request URL: http://local.allurstuff.com:8000/do.upload_photo > Exception Type: TypeError

Re: TypeError: save_file() got an unexpected keyword argument 'save'

2007-05-19 Thread derek
i also am seeing this error: TypeError at /do.upload_photo save_file() got an unexpected keyword argument 'save' Request Method: POST Request URL:http://local.allurstuff.com:8000/do.upload_photo Exception Type: TypeError Exception Value:save_file() got an unexpected

Re: mod_python without httpd.conf?

2007-05-19 Thread [EMAIL PROTECTED]
Thanks, Graham. --~--~-~--~~~---~--~~ 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 email to [EMAIL

Re: mod_python without httpd.conf?

2007-05-19 Thread [EMAIL PROTECTED]
Thank You, Dan --~--~-~--~~~---~--~~ 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 email to [EMAIL

Re: One, maybe two small bugs.

2007-05-19 Thread Marc-Antoine Parent
> Known bug, unfortunately. Disjunctions involving a common field don't > have the correct SQL constructed. Will be fixed soon-ish (we have a > plan, the work isn't finished yet). Thanks a lot for both answers. That was swift! And kudos for the good work in general. Cheers, Marc-Antoine

Re: Authenticating w Apache

2007-05-19 Thread cwurld
Here is the answer I was looking for: http://www.djangosnippets.org/snippets/62/ I post it here to save others the time it took me to find this. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: One, maybe two small bugs.

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 15:37 +, Marc-Antoine Parent wrote: > Good day! > New to django, but familiar with the principles involved. Here is my > situation. (sorry if long winded...) [...snip...] > For example, I can do this and get an accurate answer: > > id=1 >

Re: The setup.py problem on windows in django 0.96

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 07:44 -0700, kernel1983 wrote: > There is a problem while installing django 0.96 on windows > > It's in the setup.py,line 24 > > package = dirpath[len_root_dir:].lstrip('/').replace('/', '.') > > I think it should also consider the '\\' > > package =

Re: loading data from fixtures

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 10:54 +, cesco wrote: > Hi, > > I'm experiencing a problem loading some data from fixtures. Some of > the object loaded have danish letters (ø, å, æ) in their fields. > > If I use the ANSI encoding for the JSON file I'm trying to load I get > the following error

Re: fixtures for generic relations?

2007-05-19 Thread Malcolm Tredinnick
On Sat, 2007-05-19 at 13:11 +0200, Bram - Smartelectronix wrote: > Russell Keith-Magee wrote: > >> how do I -in fixtures- explain a variable needs to come from another table? > >> I don't want to write "content_type: 15" as elsewhere! > > > > That's the way its done. GenericRelation is a

One, maybe two small bugs.

2007-05-19 Thread Marc-Antoine Parent
Good day! New to django, but familiar with the principles involved. Here is my situation. (sorry if long winded...) I have an entry and categories (called divisions) in a many-to-many relationship. However, each entry has a main division. So far the model looks like this: class

tests: one failure --> all test declared failed

2007-05-19 Thread Sandro Dentella
Hi, I'm trying to create a simple TestCase that should test several different urls via get. I have a strange behaviour in that test works correctly if I don't have @login-required decorator on the views *or* if I require authentication *and all* url are correct. Eg: all urls correct,

The setup.py problem on windows in django 0.96

2007-05-19 Thread kernel1983
There is a problem while installing django 0.96 on windows It's in the setup.py,line 24 package = dirpath[len_root_dir:].lstrip('/').replace('/', '.') I think it should also consider the '\\' package = dirpath[len_root_dir:].lstrip('/').replace('/', '.').lstrip('\\').replace('\\', '.')

Re: CentOS python rpm

2007-05-19 Thread Christian M Hoeppner
> Not quite, because the original poster said he was using CentOS 4.4. > That means he needs a specially built version of the Python rpm so that > it doesn't, for example replace the python->python2.3 symlink on install > (otherwise every rpm that depends on python in a binary API-compatible >

Re: My Learning Path

2007-05-19 Thread Todd O'Bryan
Check out How to Think Like a Computer Scientist (Python version). It's an intro CS text, so it may be a little basic, but it does a very good job of introducing all of the important Python concepts in a very easy-to-understand way. Dive Into Python is a terrific book, but it assumes considerable

Re: Where is newform admin in trunk?

2007-05-19 Thread James Bennett
On 5/19/07, ivan_d <[EMAIL PROTECTED]> wrote: > I read that newform admin was merged to trunk I don't see anything in that thread which says it's been merged, and it hasn't been merged; it's still a separate branch. If you want, you can look at the code here:

faster serving of static files with django/modpython

2007-05-19 Thread Paul Rudin
I know that serving static files isn't recommended, but for various reasons people do it sometimes anyway. I had a little poke around in the code and noticed that for mod_python at least it's pretty easy to improve the performance from the current situation. I simply subclassed HttpResponse

Re: fixtures for generic relations?

2007-05-19 Thread Bram - Smartelectronix
Russell Keith-Magee wrote: >> how do I -in fixtures- explain a variable needs to come from another table? >> I don't want to write "content_type: 15" as elsewhere! > > That's the way its done. GenericRelation is a convenience wrapper > around the content type and object id database entries; you

Re: mod_python without httpd.conf?

2007-05-19 Thread Daniel Ellison
On Friday 18 May 2007 21:32:33 Graham Dumpleton wrote: > This will all only work if the web site administrator has also set: > > AllowOverride FileInfo > > for the directory containing the .htaccess file you want to add the > the SetHandler directive to. Yes, that's true. Sorry, forgot to add

loading data from fixtures

2007-05-19 Thread cesco
Hi, I'm experiencing a problem loading some data from fixtures. Some of the object loaded have danish letters (ø, å, æ) in their fields. If I use the ANSI encoding for the JSON file I'm trying to load I get the following error message: "Problem installing fixture ...: 'utf8' codec can't decode

Re: nested dictionaries in templates

2007-05-19 Thread Sven Herzing
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Hi Aidas, thx for the fast help. I hope i get better with django soon, that I can help others too. greets Sven Aidas Bendoraitis wrote: > Hi Sven! > > To get a value from a dictionary by a variable key, you either need a > custom filter like {{

Where is newform admin in trunk?

2007-05-19 Thread ivan_d
I read that newform admin was merged to trunk (here http://groups.google.com/group/django-developers/browse_thread/thread/704546f4b30d5c86/a4ead31d11b8a79a), but I cant find it. Concrete: - I cant find django/contrib/admin/options.py - I cant find django/contrib/admin/sites.py What is current

Re: My Learning Path

2007-05-19 Thread Paul Rudin
chell <[EMAIL PROTECTED]> writes: > > Maybe you guys could point me to some ressources and provide the order > in which I should work through them in order to learn Django > properly. > I'd suggest working through the python tutorial first , and then the

Re: My Learning Path

2007-05-19 Thread Kelvin Nicholson
> > Does that sound good? > > Sounds good! I guess I should have added that my first project was re-doing my personal blog:) Good luck, Kelvin -- Kelvin Nicholson Voice: +886 9 52152 336 Voice: +1 503 715 5535 GPG Keyid: 27449C8C Data: [EMAIL PROTECTED] Skype: yj_kelvin Site:

Re: URLPattern - can't fetch a detail page

2007-05-19 Thread Tyson Tate
Can you post a stack trace and more details from your url.py file? -Tyson On May 18, 2007, at 1:05 PM, Panos Laganakos wrote: > Thanks for the reply mate, but that doesn't seem to be the issue. I > still can't figure out what's going wrong here :/

Re: My Learning Path

2007-05-19 Thread chell
Thanks for the reply. I think I'll do the following (as I can't afford books at the moment): 1. Dive into Python 2. Django Tutorial 3. Django Book 4. A first project (maybe a blog) using the Django documentation if I have to Does that sound good? On 19 Mai, 10:24, Kelvin Nicholson <[EMAIL

Re: My Learning Path

2007-05-19 Thread Kelvin Nicholson
chell wrote: > Hello, > > I'm a beginner to Python and Djano. I have some experience with PHP, > but that's all. > Be ready to be blown away with blissfulness:) To get your feet wet with python you can check out Dive Into Python, freely available online: http://www.diveintopython.org/ While

My Learning Path

2007-05-19 Thread chell
Hello, I'm a beginner to Python and Djano. I have some experience with PHP, but that's all. My ultimate goal is to be able to create web applications using the Django framework. I realise that I should probably learn Python first. The problem is that there are so many ressources out there, so

Django Developers for Online News Start Up

2007-05-19 Thread Hive9
Engineer for Online News Start Up Company Overview Hive9 is an early stage funded start up located in Kendall Square in Cambridge, MA. Hive9 is in the online news space specializing in technology involving machine learning, natural language processing, information retrieval and human computer