Re: RequiredIfOtherFieldDoesNotEqual + checkbox bug?

2006-09-10 Thread Don Arbow
On Sep 10, 2006, at 8:51 PM, Beau Hartshorne wrote: > > Do you know if all browsers just leave unchecked checkboxes out of > the POST? Yes, according to the HTML specs (written in the age of dinosaurs), only controls that are successful are sent as part of the form. Successful controls have

Re: to login or not to login, that is the question

2006-09-10 Thread Kenneth Gonsalves
On 11-Sep-06, at 4:46 AM, Tamara D. Snyder wrote: > Many of you have lots more experience at this sort of thing than I > do. What do you think? Should I use the django provided auth system > with my student database as a backend, or should I create my own > thing? create your own - generaly

Re: How about a Django apps public repository?

2006-09-10 Thread limodou
On 9/11/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > I've nearly got something together now. > I just need to add some basic templates for it. > > Give me a day or two to get it up ;-) > Wonderful! -- I like python! My Blog: http://www.donews.net/limodou UliPad Site: http://wiki.woodpecker.org

Re: RequiredIfOtherFieldDoesNotEqual + checkbox bug?

2006-09-10 Thread Beau Hartshorne
On 10-Sep-06, at 2:27 PM, Don Arbow wrote: >> My use case is to make a field required only if a checkbox is >> unchecked. If this is a bug, what can I do to help? > > Have you tried RequiredIfOtherFieldNotGiven()? Do you know if all browsers just leave unchecked checkboxes out of the POST? Th

Re: How about a Django apps public repository?

2006-09-10 Thread Ian Holsman
I've nearly got something together now. I just need to add some basic templates for it. Give me a day or two to get it up ;-) regards Ian On 11/09/2006, at 12:52 PM, Sean Schertell wrote: > > Okay then, let's do it :-) > > I can get started in October putting this together. I have servers, > ba

Re: How about a Django apps public repository?

2006-09-10 Thread Sean Schertell
Okay then, let's do it :-) I can get started in October putting this together. I have servers, bandwidth, and general webdev skills. I've registered djangoforge.net for us to use, and I can commit to maintaining the site. Any other volunteers for helping to develop the system? Any other ap

Re: override save for imagefield not working

2006-09-10 Thread Sandro
[530] from IRC worked with me to figure out what's going on. Apparently save() is getting called twice, the first time saves the object, the second time applies the the uploaded directory. We need to check to see if self.image exists before trying to create thumbnails. Here's a simple version of

Re: serving static images

2006-09-10 Thread Jay Parlar
On 9/10/06, Alfonso <[EMAIL PROTECTED]> wrote: > > Complete newbie problem here but i can't seem to get django to show > any images or stylesheets etc. > In urls.py: > > (r'^images/(?P.*)$', 'django.views.static.serve', > {'document_root': '/Users/whitebook/django/django_projects/mysite/ >

Sitemap Index with Cache gives a NoReverseMatch exception

2006-09-10 Thread Jay Klehr
Hello, Following the djangoproject.com Sitemap example and the documentation on Sitemaps I'm trying to implement a caching Sitemap Index that will link out to other Sitemaps for my site (one for each main model basically). I had the Sitemap Index working with the separate sitemaps just fine

Re: to login or not to login, that is the question

2006-09-10 Thread Tamara D. Snyder
The system I'm using now has a database table with the students' names, id numbers, majors, emails, etc. and it is very easy to import a text file with all that info right into the table. When the semester is over I just save the grades to another text file and then clear out the table an

Re: to login or not to login, that is the question

2006-09-10 Thread Ian Holsman
On 11/09/2006, at 9:16 AM, Tamara D. Snyder wrote: > > Hi All, > > There is a web application I would like to write for a class I teach > at the university. I would like my students to be able to log in and > do something ("homework" if you like). > > I'd like to reuse the application next seme

Re: to login or not to login, that is the question

2006-09-10 Thread James Bennett
On 9/10/06, Tamara D. Snyder <[EMAIL PROTECTED]> wrote: > I'd like to reuse the application next semester, with a different set > of students. And I naturally don't want my students to have any > access at all to the admin site. The included backend should be sufficient for what you've described

Re: to login or not to login, that is the question

2006-09-10 Thread Dean Nevins
You should just use the Django auth system. It's fairly easy to use and it provides mechanisms for protecting views that you would have to duplicate anyway. If the default User object is too skimpy for you, you can add to it using UserProfiles or just create a table and link to the User. BTW, I'm

to login or not to login, that is the question

2006-09-10 Thread Tamara D. Snyder
Hi All, There is a web application I would like to write for a class I teach at the university. I would like my students to be able to log in and do something ("homework" if you like). I'd like to reuse the application next semester, with a different set of students. And I naturally don'

Re: Handling data from multiple checkboxes for a single field

2006-09-10 Thread [EMAIL PROTECTED]
I have been struggling with this same problem and found little help with using prepare(). I will share my solution although I am still hoping that a more efficient method exists. I am using version 0.95 In my custom manipulator.save() --- temp = form_fields(..all the

override save for imagefield not working

2006-09-10 Thread Sandro
I am trying to override the save function for my Image class so that when I upload an image I can generate thumbnails in different folders. I think my thumbnail code is fine, the problem is that I can't get information about my image. def save(self): super(Image, self).save() im = Image.open(

Re: RequiredIfOtherFieldDoesNotEqual + checkbox bug?

2006-09-10 Thread Don Arbow
On Sep 10, 2006, at 1:35 PM, Beau Hartshorne wrote: > > My use case is to make a field required only if a checkbox is > unchecked. If this is a bug, what can I do to help? Have you tried RequiredIfOtherFieldNotGiven()? Don --~--~-~--~~~---~--~~ You received th

Re: Creating a project

2006-09-10 Thread brad
Well I finally stumbled upon a very useful documentation page on Python.org. Thanks again for all of the input that everybody gave becasue that input led me to find the right documentation. So...if anybody is having trouble with running python commands in Windows command prompt or having trouble w

RequiredIfOtherFieldDoesNotEqual + checkbox bug?

2006-09-10 Thread Beau Hartshorne
I tried using django.core.validators.RequiredIfOtherFieldDoesNotEqual to validate against a checkbox, and I think I ran into a bug. Browsers often don't include checkboxes in POST data, and it seems that RequiredIfOtherFieldDoesNotEqual assumes that they are: def __call__(self, field_data,

Re: Creating a project

2006-09-10 Thread brad
Great thanks. When I put the full path of the location of django-admin.py, then the command works. However, when I don't put the full path in and just type the command "python django-admin.py startproject mysite" then I get the error: 'python' is not recognized as an internal or external com

Re: Chain filters on ManyToManyField

2006-09-10 Thread cyberco
Just for the record: ANDing 2 Q-objects doesn't work either... --~--~-~--~~~---~--~~ 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

Re: Creating a project

2006-09-10 Thread James Bennett
On 9/10/06, brad <[EMAIL PROTECTED]> wrote: > However, when I try to run the command "django-admin.py startproject > mysite" on the windows command prompt I get the following error: Probably the file django-admin.py has not been placed in a directory which Windows recognizes as being a place that

Re: {{user}} & Inclusion Tags

2006-09-10 Thread peonleon
Thanks Rob, it works! this is what my tag ended up looking like which works: @register.inclusion_tag('sidebar/you.html') def module_you(user): return {'user': user,} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Gro

Re: Creating a project

2006-09-10 Thread Todd O'Bryan
Try typing either the whole path, to django-admin.py or using the command python django-admin.py ... HTH, Todd On Sep 10, 2006, at 4:03 PM, brad wrote: > > On Django's documentation website there is an article titled "Writing > your first Django app, part 1", which has the URL of > http://ww

Re: {{user}} & Inclusion Tags

2006-09-10 Thread nymbyl
I may be wrong but I think inclusion tags lose context values - unless you set 'takes_context=true' and even then you have to re-include the values from the context that you need Something like this: @register.inclusion_tag('sidebar/you.html', takes_context=True) def module_you(context): retur

Creating a project

2006-09-10 Thread brad
On Django's documentation website there is an article titled "Writing your first Django app, part 1", which has the URL of http://www.djangoproject.com/documentation/tutorial1/, there is a paragraph that says to start a new project we should run the command "django-admin.py startproject mysite" fr

Django and transactions

2006-09-10 Thread Andreas Eigenmann
Hi all, Im writing a financial web application with Django and postgresql. This application needs a lot of database transactions. The Django Transactions Documentation is a little bit unclear for me, so i have a some questions. 1. Using the transaction middleware, when is BEGIN TRANSACTION call

{{user}} & Inclusion Tags

2006-09-10 Thread peonleon
Hi, I think I might be missing something very simple, but I can't figure it out: {{user}} works fine in my templates unless the template was rendered by an inclusion tag. For example, # inclusion tag: @register.inclusion_tag('sidebar/you.html') def module_you(): return # template 'sidebar/

Re: Uploading Files

2006-09-10 Thread Andres Luga
Hi, relarted to this topic. When using generic views, how to achieve that the file doesn't get overwritten? For example a form for editing a person: the image file field has no default data and when I only change the name the image is blanked. It seems I missed something.. Regards, Andres > htt

serving static images

2006-09-10 Thread Alfonso
Complete newbie problem here but i can't seem to get django to show any images or stylesheets etc. In urls.py: (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/whitebook/django/django_projects/mysite/ media/images'}), In the template I have . So when opening u

serving static images

2006-09-10 Thread Allan Henderson
Complete newbie problem here but i can't seem to get django to show any images or stylesheets etc. In urls.py: (r'^images/(?P.*)$', 'django.views.static.serve', {'document_root': '/Users/whitebook/django/django_projects/mysite/ media/images'}), In the template I have . So when ope

Sites or custom hack to limit related fields in Admin

2006-09-10 Thread [EMAIL PROTECTED]
I have a "legacy database" filled with data for many customer's website content. In the admin I always want to filter the queries so that only the current customer's inventory, categories and subcategories are viewable. Can this be done with the "sites" framework? Do I need to hack the CurrentSi

Re: Database events?

2006-09-10 Thread David Blewett
On 9/10/06, cyberco <[EMAIL PROTECTED]> wrote: Is this solvable with Django, or am I using the wrong framework for myproblem?Have you looked at https://simon.bofh.ms/cgi-bin/trac-django-projects.cgi/wiki/JobControl ?David --~--~-~--~~~---~--~~ You received this mes

Re: Weblog app simple?

2006-09-10 Thread Guillermo Fernandez Castellanos
Cheers, > Is there somoeone that have already built > a "very very light weblog" app that I can studdy > (I mean see the source code) > to buld my personal weblog (django based). > I have a simple weak and cheap webserver. I found this to be a good example: http://www.rossp.org/blog/2006/jun/08/d

Weblog app simple?

2006-09-10 Thread Picio
Hello, maybe I pretend too much: Is there somoeone that have already built a "very very light weblog" app that I can studdy (I mean see the source code) to buld my personal weblog (django based). I have a simple weak and cheap webserver. Since I also need to see It with my PDA, It have to be simp

Re: Italian Documentation

2006-09-10 Thread Picio
"Mantua me genuit..." Many many thanks. Daniele --~--~-~--~~~---~--~~ 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,

Re: Database events?

2006-09-10 Thread cyberco
OK, thanks for your reply. Both possible solutions you propose are 'polling' solutions. The first is triggered by a in-memory object (a running process), the second by a user-request. I'm interested in the first solution since I can't wait for a user-request before checking for scheduled events. T

Re: Concurrency and data modification

2006-09-10 Thread Ned Batchelder
Russell Keith-Magee wrote: On 9/10/06, Hawkeye <[EMAIL PROTECTED]> wrote: I don't think that transactions are enough to solve this problem, but I could be wrong. Sorry - I oversimplified your problem in my head. You are correct that transactions wont solve this particula

Re: Django book...2...Apress

2006-09-10 Thread Kenneth Gonsalves
On 10-Sep-06, at 3:45 PM, Kenneth Gonsalves wrote: > On 09-Sep-06, at 8:23 PM, Picio wrote: > >> So It's only a matter of waiting until October? >> You think It's a reliable promise? > > no oops - that sounds rude - what i meant is that the book is afaik coming out after 1.0, and 1.0 is very

Re: Django book...2...Apress

2006-09-10 Thread Kenneth Gonsalves
On 09-Sep-06, at 8:23 PM, Picio wrote: > So It's only a matter of waiting until October? > You think It's a reliable promise? no -- regards kg http://lawgon.livejournal.com http://nrcfosshelpline.in/web/ --~--~-~--~~~---~--~~ You received this message becau

Re: Italian Documentation

2006-09-10 Thread paolo
> 2. In the page you mentioned I saw that tutorial part 1 italian is > already finished by you > so mine would be a "surplus". From now on I will check the page > before any translation start. Hmm rather than a "surplus" it is just another translation of the same document (and that was one of th