Re: Should I use Django?

2009-03-28 Thread Wiiboy
I thought I'd tell you: I decided to switch to Django/App Engine. :) --~--~-~--~~~---~--~~ 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

Re: Design Issue / forward referencing

2009-03-28 Thread Alex Gaynor
On Sat, Mar 28, 2009 at 10:14 PM, mahesh wrote: > > Hi Alex, > > Solution given by by as worked :) However I wonder how come 'self' > worked against self (without quotes) > > Thank You > -Mahesh/ > > On Mar 28, 8:57 pm, Alex Gaynor wrote: > > On Sat,

Re: Design Issue / forward referencing

2009-03-28 Thread mahesh
Hi Alex, Solution given by by as worked :) However I wonder how come 'self' worked against self (without quotes) Thank You -Mahesh/ On Mar 28, 8:57 pm, Alex Gaynor wrote: > On Sat, Mar 28, 2009 at 10:55 AM, mahesh wrote: > > > I am working on a

Re: Generic View for create , update and delete !

2009-03-28 Thread Dr.Hamza Mousa
Thanks a lot André , already tried it , somehow the problem was not in my tries or code , but in the server , its somehow stuck at certain pages . so i could not see the effects . Also now the post_save_redirect and post_delete_redirect don't redirect me to the specific page i assigned :( also

Re: Generic View for create , update and delete !

2009-03-28 Thread André Santos
Try this one: http://www.b-list.org/weblog/2006/nov/16/django-tips-get-most-out-generic-views/ 2009/3/28 Hamza : > > Hello , > > am trying to use Generic view instead of using the old view way , > however am a django newbie , i tried several tutorials , documentation >

Testing form posting

2009-03-28 Thread tsmets
I was wondering how I could test / unittest form posting ? class TestSomeRequest(TestCase): def testCallDefaultDpasteURL(self): response = self.client.get('/my_app/') self.failUnlessEqual(response.status_code, 200) def testCallDpasteAboutURL(self): postedData = {

Re: Installing Django

2009-03-28 Thread Mike Ramirez
On Saturday 28 March 2009 12:43:26 pm stars wrote: > I'm totally new at Python and Django and I'm having trouble with the > installation. I'm running windows vista and I have downloaded pyhton > 2.6. So basically, I went through the install directions a millon > times, and nothing worked.. > > I

Re: Installing Django

2009-03-28 Thread Srik
I hope below link helps. http://www.djangoapp.com/blog/2008/11/18/installing-django-on-windows/ On Mar 28, 7:43 pm, stars wrote: > I'm totally new at Python and Django and I'm having trouble with the > installation. I'm running windows vista and I have

Curious Error

2009-03-28 Thread Ramdas S
Can someone advise? I have the same code working in several web sites. But since moving to 10177, I am getting this error. It sometimes works in Dev server, in Apache its been a problem http://dpaste.com/20529/ -- Ramdas S +91 9342 583 065 --~--~-~--~~~---~--~~

Re: Installing Django

2009-03-28 Thread Y
Why not try Instant Django for Windows and avoid the installation process altogether? http://www.instantdjango.com/ Y On Mar 28, 12:43 pm, stars wrote: > I'm totally new at Python and Django and I'm having trouble with the > installation. I'm running windows

Pass a queryset to the admin and display using existing app/model admin?

2009-03-28 Thread Rob Hudson
I have a use case where we want a search form to search across almost all columns of this particular model. Upon submit, I thought it would be a nice feature (since this is already in the admin) to use the already existing settings for my particular app/model instance. Is it possible to build

Re: localhost:8000 problem

2009-03-28 Thread nick
Right after I click "post" to that problem, I realized that "Work Offline" was checked. It works now. Thank you Karen for prompt reply, I appreciate it. I am sure there are more to come :-) On Mar 28, 4:50 pm, Karen Tracey wrote: > On Sat, Mar 28, 2009 at 5:44 PM, nick

Re: File upload: how to validate file type

2009-03-28 Thread P M
yes you can, because signature of pdf is in the starting of 1st chunk of stream... rest of the things are of hardly interest for libmagic identification... what ever method you are using to handle the chunks/streams is still the same, regardless of type of data user is uploading, one more

Re: Dynamic on-action update form

2009-03-28 Thread Nizan Freedman
can you supply an example of adding JS to a widget? On Mar 28, 5:46 pm, Daniel Roseman wrote: > On Mar 28, 1:44 pm, Nizan Freedman wrote: > > > is it possible to make a Django form that hides\shows different fields > > by other fields changing?

share info on 2 systems

2009-03-28 Thread Leonel Nunez
Hello I have 2 applications on different servers and I need to share any selected record on the ADMIN on the 2 applications Is there a Django way to do it Thank you Leonel --~--~-~--~~~---~--~~ You received this message because you are subscribed to the

Re: localhost:8000 problem

2009-03-28 Thread Karen Tracey
On Sat, Mar 28, 2009 at 5:44 PM, nick wrote: > > I am a django newbie. > The first example I tried from django's tutorial "mysite", ran python > manage.py runserver. > Server runs with no errors but my web browser (firefox) get "Firefox > offline mode error" and not

Re: Installing Django

2009-03-28 Thread stars
Yes I tried to follow those instructions and I know I didnt di it right, basically as far as I got would be..I unzipped Django and attempted the install..which did nothing. I didnt get an errors, I have no idea how to install it. Thats what I'm not understanding, thats why I would like someone to

localhost:8000 problem

2009-03-28 Thread nick
I am a django newbie. The first example I tried from django's tutorial "mysite", ran python manage.py runserver. Server runs with no errors but my web browser (firefox) get "Firefox offline mode error" and not django 404 errors. I tried different localhost ports, but same error. My browser

Re: help with form's cleaned_data

2009-03-28 Thread ihomest...@gmail.com
i have found it. just use form.error. On Mar 28, 5:18 pm, ihome wrote: > Hi, > > My form always gets is_valid() as False. Some validation is wrong. > > Is there any error message I could dump from form or form.cleaned_data > to understand why is_valid() is always false? >

Re: File upload: how to validate file type

2009-03-28 Thread Torsten Bronger
Hallöchen! P M writes: > there are various ways to check, but best will be to use > Python-libmagic interface... it did worked well for me .. Thank for the hint, however, the interesting part is whether I can safely tamper with the file object in the clean method, so that the actual download

Re: File upload: how to validate file type

2009-03-28 Thread P M
servus, there are various ways to check, but best will be to use Python-libmagic interface... it did worked well for me .. mit freundliche Grüß On Sat, Mar 28, 2009 at 10:16 PM, Torsten Bronger < bron...@physik.rwth-aachen.de> wrote: > > Hallöchen! > > I'd like to ensure that people only

help with form's cleaned_data

2009-03-28 Thread ihome
Hi, My form always gets is_valid() as False. Some validation is wrong. Is there any error message I could dump from form or form.cleaned_data to understand why is_valid() is always false? thanks. --~--~-~--~~~---~--~~ You received this message because you are

File upload: how to validate file type

2009-03-28 Thread Torsten Bronger
Hallöchen! I'd like to ensure that people only upload PDF files, so the file must start with "%PDF". If the file starts with something else, the form must not validate. How do I do that? I though about a clean_... method which reads the start of the file and then re-opens it. Is this a good

Re: Installing Django

2009-03-28 Thread Dr.Hamza Mousa
You need to define " Environment Variables " parameter in windows , In User Variable : PATH : C:\Python26\Lib\site-packages\django\bin ( add the path to your django binary directory ) . - and also in System Variable , make sure you have the Python path as well On Sat, Mar

Re: Installing Django

2009-03-28 Thread Dougal Matthews
Your not giving us anything to go on here. How far do you get? do you get any errors? I am assuming you followed the very detailed instructions here; http://docs.djangoproject.com/en/dev/topics/install/#topics-install Dougal --- Dougal Matthews - @d0ugal http://www.dougalmatthews.com/

Installing Django

2009-03-28 Thread stars
I'm totally new at Python and Django and I'm having trouble with the installation. I'm running windows vista and I have downloaded pyhton 2.6. So basically, I went through the install directions a millon times, and nothing worked.. I need someone to walk me through it, step by step so I know

Re: Fulltext searching

2009-03-28 Thread Petite Abeille
On Mar 26, 2009, at 10:37 PM, TheIvIaxx wrote: > Is there a major benefit to go with one of these other > packages or write something else beyond mysql-fulltext? As always, it all depends on your requirements. For basic full text search, what comes bundled with most databases is Good Enough

Generic View for create , update and delete !

2009-03-28 Thread Hamza
Hello , am trying to use Generic view instead of using the old view way , however am a django newbie , i tried several tutorials , documentation and non seems works with me yet . can anyone point me an example ( full working good example ) of using generic view Regards

Re: django.contrib.auth.models.User User model can't be saved

2009-03-28 Thread Brian Neal
On Mar 28, 7:02 am, Joshua Partogi wrote: > Yes you're right. In my template I only have username, first_name, > last_name, email and password. I also print out the errors too. Probably what is happening is that some of the other fields you are excluding are required

Re: Problem with Field errors

2009-03-28 Thread Jack Orenstein
On Mar 28, 2009, at 12:26 PM, Daniel Roseman wrote: > > On Mar 28, 4:14 pm, Jack Orenstein wrote: >> My application needs to validate data from a from beyond the >> validation of Fields done by django. So in my form handler, I check >> Form.is_valid, and if that returns true,

Re: Problem with Field errors

2009-03-28 Thread Daniel Roseman
On Mar 28, 4:14 pm, Jack Orenstein wrote: > My application needs to validate data from a from beyond the   > validation of Fields done by django. So in my form handler, I check   > Form.is_valid, and if that returns true, then I do my own validation.   > In case of errors, I

Problem with Field errors

2009-03-28 Thread Jack Orenstein
My application needs to validate data from a from beyond the validation of Fields done by django. So in my form handler, I check Form.is_valid, and if that returns true, then I do my own validation. In case of errors, I attach an error message to the field, e.g.

Re: Design Issue / forward referencing

2009-03-28 Thread David Zhou
Also see: http://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ManyToManyField.symmetrical -- dz On Sat, Mar 28, 2009 at 11:57 AM, Alex Gaynor wrote: > > > On Sat, Mar 28, 2009 at 10:55 AM, mahesh wrote: >> >> I am working on

Re: Design Issue / forward referencing

2009-03-28 Thread Alex Gaynor
On Sat, Mar 28, 2009 at 10:55 AM, mahesh wrote: > > I am working on a (College) course manager project. Here is a > situation where any course have 0 (Zero) or More Prerequisites, anyone > who register for a course should satisfy dependency. > > /course_modue/model.py hash

Design Issue / forward referencing

2009-03-28 Thread mahesh
I am working on a (College) course manager project. Here is a situation where any course have 0 (Zero) or More Prerequisites, anyone who register for a course should satisfy dependency. /course_modue/model.py hash this.. Here how my model looks like .. class CourseRelation(models.Model):

Re: Mysterious "=32" for all strings extracted from list showing up via send_mail

2009-03-28 Thread Peter Herndon
The answer is here: http://www.faqs.org/rfcs/rfc2045.html Specifically, section 6.7, "Quoted-Printable Content-Transfer-Encoding". If you take a tour through Python's email module in the standard library, you'll find some bits for handling decoding. On Thu, Mar 26, 2009 at 4:11 PM,

Re: No admin-url match when DEBUG=False

2009-03-28 Thread Stephan John
Am Freitag, 27. März 2009 21:05:09 schrieb Karen Tracey: > On Fri, Mar 27, 2009 at 9:44 AM, Stephan John wrote: > > Your calls to admin.site.register should not be in your models.py file. > They should be in a file named admin.py and a call to admin.autodiscover() > ought

Re: Dynamic on-action update form

2009-03-28 Thread Daniel Roseman
On Mar 28, 1:44 pm, Nizan Freedman wrote: > is it possible to make a Django form that hides\shows different fields > by other fields changing? If you write some Javascript, yes. -- DR. --~--~-~--~~~---~--~~ You received this message because you

Dynamic on-action update form

2009-03-28 Thread Nizan Freedman
is it possible to make a Django form that hides\shows different fields by other fields changing? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: redirect back after save

2009-03-28 Thread Eric Abrahamsen
On Mar 28, 2009, at 8:04 PM, Paddy Joy wrote: > > I have a form that can be called from multiple places. What's the best > way to redirect back to the original page after the form has been > saved. I think the standard way to do this is to include a hidden form element (usually called

redirect back after save

2009-03-28 Thread Paddy Joy
I have a form that can be called from multiple places. What's the best way to redirect back to the original page after the form has been saved. Do I need to extract the HTTP referrer or is there a better way? Paddy --~--~-~--~~~---~--~~ You received this message

Re: django.contrib.auth.models.User User model can't be saved

2009-03-28 Thread Joshua Partogi
On Mar 28, 9:31 pm, Matthew Somerville wrote: > Joshua Partogi wrote: > > That is exactly the problem. No exception is thrown. But I guess it > > didn't pass the validation because it wasn't redirecting to another > > page. Which is funny because all the required

Re: send_mail and cc

2009-03-28 Thread drakkan
ok for the records subclassing EmailMessage this way work: class MyEmailMessage(EmailMessage): def __init__(self, subject='', body='', from_email=None, to=None, cc=None, bcc=None, connection=None, attachments=None, headers=None):

Re: Fulltext searching

2009-03-28 Thread Peter Herndon
In addition, full text indexing with Sphinx has been shown to be faster than the same using MySql'ls fulltext search. Django-NYC recently had some talks on search, and the gentleman who presented on David Cramer's django-sphinx module had run some rough timing tests. On 3/27/09, Antoni Aloy

Overriding get_form to customize admin forms based on request

2009-03-28 Thread AndyB
I've tried various methods to achieve this. I decided against overriding formfield_for_dbfield as it's doesn't get a copy of the request object and I was hoping to avoid the thread_locals hack. I settled on overriding get_form in my ModelAdmin class and tried the following: class

Re: Django wont display images on my CSS file

2009-03-28 Thread Nathan Reynolds
On Sat, Mar 28, 2009 at 7:17 AM, Ayaz Ahmed Khan wrote: > Furthermore, it stipulates that if the given URL path is > relative, the absolute path is derived at by combining that relative > path with a base URL which, for CSS style sheets, is the base URL for > the style sheet.

Re: django.contrib.auth.models.User User model can't be saved

2009-03-28 Thread Matthew Somerville
Joshua Partogi wrote: > That is exactly the problem. No exception is thrown. But I guess it > didn't pass the validation because it wasn't redirecting to another > page. Which is funny because all the required field in > django.contrib.auth.models.User object is filled in. How are you printing

Re: django.contrib.auth.models.User User model can't be saved

2009-03-28 Thread Joshua Partogi
On Mar 28, 2:17 pm, Malcolm Tredinnick wrote: > On Sat, 2009-03-28 at 13:45 +1100, Joshua Partogi wrote: > > Dear all, > > > I currently want to have a registration system. For that matter I will > > be using the existing django.contrib.auth.models.User. > > > So I

Re: Django wont display images on my CSS file

2009-03-28 Thread Ayaz Ahmed Khan
On 28-Mar-09, at 3:14 AM, Dougal Matthews wrote: > > 2009/3/27 Brian Neal : >> >> I seem to recall that when you put references to files in your >> CSS, they are relative to that CSS file, not to the document >> root. So if that graphic file is in the same directory as your >>