Re: Unable to Login To Admin Interface

2007-11-02 Thread [EMAIL PROTECTED]
On Nov 2, 9:04 pm, Thejaswi Puthraya <[EMAIL PROTECTED]> wrote: > added pass as part of my model. > > Did you try uncommenting the admin URL in the urls.py file? If you > have done this step, let us know if you are getting any error and > please paste a traceback of the error to help you better.

Re: Query problem

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 13:42 -0400, Karen Tracey wrote: > On 11/2/07, Goutham D L <[EMAIL PROTECTED]> wrote: > Hi, > Iam having a problem in querying. > > i have a string called search_by which stores the name of one > of my models. > I want to call

Re: Unable to Login To Admin Interface

2007-11-02 Thread Thejaswi Puthraya
On Nov 3, 3:23 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Hey guys I whipped up a quick model to test Django's functionality, > added it to my apps list, added the path for the admin interface, and > added pass as part of my model. Did you try uncommenting the admin URL in the urls.py

Re: djangoAMF authentication, requests aren't carrying user credential

2007-11-02 Thread Tiger Uppercut
> Is the login mechanism relying on web application form based > submission, or relying on web server HTTP Basic authentication. If the > latter, you must enable the directive: > > WSGIPassAuthorization On > > in Apache configuration for mod_wsgi, else the HTTP Basic auth > information isn't

Unable to Login To Admin Interface

2007-11-02 Thread [EMAIL PROTECTED]
Hey guys I whipped up a quick model to test Django's functionality, added it to my apps list, added the path for the admin interface, and added pass as part of my model. Unfortunately the superuser that Django automatically created when I ran syncdb will not allow me to login to my administrative

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread Brian Rosner
What you really need is to use the formfield_callback argument to form_for_instance. This allows you to override the default fields that are returned for a given field in the model [1]. There is an open bug, [2], that will allow for an easier way of overriding the queryset that is ultimately

Re: How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Manoj Govindan
> Django demonstrates at least one example of an alternative in its own > test framework, through the way that email is handled during testing. > Perfect! Thanks, Manoj --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google

Re: Is there a simpler solution?

2007-11-02 Thread RajeshD
Disregard the overflow:hidden piece in my CSS above. It's not needed: .article {width:32%;float:left;} .clear_all {clear:both;} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to

Re: Is there a simpler solution?

2007-11-02 Thread RajeshD
On Nov 2, 4:05 pm, "Ramdas S" <[EMAIL PROTECTED]> wrote: > Hi, > > I am sure there is something absolutely simple, but I guess I am missing it. > I need to display some content/ news articles over 3 columns on a home page, > where the order is latest stories coming in top rows from left to

Re: Limiting Foreign Key choices to members of a certain group using generic views

2007-11-02 Thread RajeshD
> > # run with this form following the examples in the newforms > documentations. You can also change the domain "choices" after the form class is created for you by modifying the form class's base_fields as I see you have done in your post in another thread here:

Re: Limiting Foreign Key choices to members of a certain group using generic views

2007-11-02 Thread RajeshD
On Nov 2, 4:02 pm, rm <[EMAIL PROTECTED]> wrote: > On Nov 2, 3:54 pm, RajeshD <[EMAIL PROTECTED]> wrote: > > > When you acquire a Customer newform instance in your view, you will be > > able to modify the choices attribute of its domain field so that these > > choices only contain the relevant

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread rm
OK, I think I finally got it. (Thanks to Python's introspection and interactive shell!) Here is how I got it to work in my view: def away_edit(request, away_id): aw = get_object_or_404(away, id=away_id) aw_form = forms.form_for_instance(aw) filtered_choices =

Re: Limiting Foreign Key choices to members of a certain group using generic views

2007-11-02 Thread rm
On Nov 2, 3:54 pm, RajeshD <[EMAIL PROTECTED]> wrote: > When you acquire a Customer newform instance in your view, you will be > able to modify the choices attribute of its domain field so that these > choices only contain the relevant domains that you mentioned you can > trivially derive

Is there a simpler solution?

2007-11-02 Thread Ramdas S
Hi, I am sure there is something absolutely simple, but I guess I am missing it. I need to display some content/ news articles over 3 columns on a home page, where the order is latest stories coming in top rows from left to right. If you've seen web sites like theinquirer.net or theregister.co.uk

Re: KeyError, Submit Empty Field and Form Validation

2007-11-02 Thread Karen Tracey
On 11/2/07, crybaby <[EMAIL PROTECTED]> wrote: > > > I have @login_required decorator for the view function that handles > this form and I am already logged in. > I commented out the "def clean" from the form and when I submit the > form field reason without a value, I get this error: > >

Re: Displaying error messages if form data not valid

2007-11-02 Thread RajeshD
On Nov 2, 12:08 pm, jim <[EMAIL PROTECTED]> wrote: > OK. This approach works. Thanks. > > Would you have any link to a best practice where such a approach is > detailed? The very first simple view example in the New forms documentation shows what Malcolm recommended to you.

Re: KeyError, Submit Empty Field and Form Validation

2007-11-02 Thread crybaby
I have @login_required decorator for the view function that handles this form and I am already logged in. I commented out the "def clean" from the form and when I submit the form field reason without a value, I get this error: Exception Type: ValueError Exception Value:The view

Re: template question

2007-11-02 Thread RajeshD
On Nov 1, 9:56 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have this code in my view, for example: > > a=['a','b','c'] # a list of row labels > b=[1,2,3] # a list of col label > c=tab # an array (list of list) with len(a) rows and len(b) cols. If c[i, j] previously had a value of x,

Re: MS SQL and Django - Any current info?

2007-11-02 Thread Peter Bailey
Thanks Carl. I'll give it a go. Cheers, Peter On Nov 1, 7:11 pm, Carl Karsten <[EMAIL PROTECTED]> wrote: > Peter Bailey wrote: > > Can anyone tell me if there is any current news about MS SQL support? > > I am looking at frameworks for a client, and my preference is really > > to go the

Freelancer

2007-11-02 Thread chetan
Hi, I Am A Freelancer.I Am A Web Designer And A 3d Animator.I Am Doing Job In Ahmadabad In India.http://www.ewebarea.com Is The Name OF My Site.If You Have Any Project related To Web Please Contact Me On [EMAIL PROTECTED] --~--~-~--~~~---~--~~ You received this

Re: Standard place for signal processing code?

2007-11-02 Thread RajeshD
> I'm looking for a hint as to where put signal processing code. Various > objects in many apps in my project emit one signal, that has to be > processed in single place and is not directly related to any particular > app nor object. I do not want it in any app, since apps can be turned on > and

Re: Query problem

2007-11-02 Thread Karen Tracey
On 11/2/07, Goutham D L <[EMAIL PROTECTED]> wrote: > > Hi, > Iam having a problem in querying. > > i have a string called search_by which stores the name of one of my > models. > I want to call search_by.objects.all() > But it is giving an error since search_by is a string and cannot be > directly

Re: KeyError, Submit Empty Field and Form Validation

2007-11-02 Thread Karen Tracey
On 11/2/07, crybaby <[EMAIL PROTECTED]> wrote: > > > I have a form and trying to do validation. When I submit a form > without any values into the field, "reason", I get this error. > > Exception Type: KeyError > Exception Value:'reason' > > at this line of ReasonForm: > >

Query problem

2007-11-02 Thread Goutham D L
Hi, Iam having a problem in querying. i have a string called search_by which stores the name of one of my models. I want to call search_by.objects.all() But it is giving an error since search_by is a string and cannot be directly concatenated. Can someone help me get the query right? Goutham

KeyError, Submit Empty Field and Form Validation

2007-11-02 Thread crybaby
I have a form and trying to do validation. When I submit a form without any values into the field, "reason", I get this error. Exception Type: KeyError Exception Value:'reason' at this line of ReasonForm: if(self.cleaned_data['reason']==''): here is my ReasonForm: class

Re: form: required field

2007-11-02 Thread [EMAIL PROTECTED]
thank you ! the solution is: {% for field in form %} {% if field.field.required %} blablabla {% endif %} {% endfor %} On 2 nov, 16:58, "Karen Tracey" <[EMAIL PROTECTED]> wrote: > On 11/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > how to know if a field is required on template side ?

Re: Displaying error messages if form data not valid

2007-11-02 Thread jim
OK. This approach works. Thanks. Would you have any link to a best practice where such a approach is detailed? Thx.. Jim On Nov 2, 10:01 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Fri, 2007-11-02 at 06:26 -0700, jim wrote: > > Hello, > > I have a form that accepts some data. If

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread rm
> Actually I don't think your expectations were unreasonable, I think they > were natural given the unfortunately tight coupling between this admin > option and model definition, plus the fact that the option has nothing in > its name to indicate it is admin-specific. Well, I still think that

Re: form: required field

2007-11-02 Thread Karen Tracey
On 11/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > > how to know if a field is required on template side ? > > Search this list for "required field" and one of the first hits is this recent thread:

form: required field

2007-11-02 Thread [EMAIL PROTECTED]
how to know if a field is required on template side ? --~--~-~--~~~---~--~~ 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

Re: keeping SECRET_KEY secret

2007-11-02 Thread Carl Karsten
Malcolm Tredinnick wrote: > On Thu, 2007-11-01 at 23:02 -0500, Carl Karsten wrote: > [...] >> Support for the local_settings file is there, I just think it should be >> changed >> from an "If it exists" to assuming it exists, and seed it with the values >> that >> have been singled out as

BISNES GLOBAL YANG HEBAT MELEDAK!

2007-11-02 Thread usahawanveteran
--~--~-~--~~~---~--~~ 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 PROTECTED] For more

Re: keeping SECRET_KEY secret

2007-11-02 Thread Carl Karsten
James Bennett wrote: > On 11/1/07, Carl Karsten <[EMAIL PROTECTED]> wrote: >> The generated settings.py contains things that are perfectly normal "source >> code" like things that should be treated as such. How does one only commit >> part >> of a file to svn? > > Why do you need to commit

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread Karen Tracey
On 11/2/07, rm <[EMAIL PROTECTED]> wrote: > OK, so my expectations were unreasonable. (Too bad because it would > seem to be a very user friendly and elegant way of limiting choices in > forms.) So, what do you suggest as the reasonable method to limit > choices on a form_from_instance or

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread rm
OK, so my expectations were unreasonable. (Too bad because it would seem to be a very user friendly and elegant way of limiting choices in forms.) So, what do you suggest as the reasonable method to limit choices on a form_from_instance or form_from_model? Maybe I misunderstood the part of the

Re: keeping SECRET_KEY secret

2007-11-02 Thread Tim Chase
> Personally I wonder if this is due to a conception that the *project* > is somehow the deliverable; I think James touches here on one of the key factors in this whole issue. If I have a project that I'm making publicly available, there are many project related settings that need to be

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread Karen Tracey
On 11/2/07, rm <[EMAIL PROTECTED]> wrote:[snip] > However, even that is not intuitive since one would assume that since > the form is reading the field definition from the model it would know > to use any filters specified there. So, I think this is a design flaw > in the current implementation,

Re: template question

2007-11-02 Thread [EMAIL PROTECTED]
Nobody can help me ? On 1 nov, 14:56, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > I have this code in my view, for example: > > a=['a','b','c'] # a list of row labels > b=[1,2,3] # a list of col label > c=tab # an array (list of list) with len(a) rows and len(b) cols. > return

Re: Displaying error messages if form data not valid

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 06:26 -0700, jim wrote: > Hello, > I have a form that accepts some data. If the data is invalid, the > server side validation should detect this, redirect to the original > url and display error messages. I think your design is a bit backwards here. try to avoid using a

Re: How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Russell Keith-Magee
On 11/2/07, Manoj Govindan <[EMAIL PROTECTED]> wrote: > > One of my applications has a view that uses a random number generator. > I am having some trouble passing a mock random generator to the view > for testing purposes. > I am relying on the mock object to get predictable results for testing

Displaying error messages if form data not valid

2007-11-02 Thread jim
Hello, I have a form that accepts some data. If the data is invalid, the server side validation should detect this, redirect to the original url and display error messages. I have got this working but the problem is that I had to pollute the request.sessions object with a lot of error

for internet addvertisement contact us on [EMAIL PROTECTED] or call us 00923007530720

2007-11-02 Thread net expert
[EMAIL PROTECTED] 000923007530720 --~--~-~--~~~---~--~~ 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

Re: keeping SECRET_KEY secret

2007-11-02 Thread Marty Alchin
On 11/2/07, Marty Alchin <[EMAIL PROTECTED]> wrote: > Sure, there are some exceptions for huge projects (like > Satchmo), but that's exactly the point: those are exceptions, not the > rule. And I should also add this: I'm a seasoned developer, and have been hacking Django for quite a while now.

Re: keeping SECRET_KEY secret

2007-11-02 Thread Marty Alchin
Honestly, I'm surprised this is such a big deal. The expectation (as I understand it), is that Django projects are made up of applications. If anything's assumed to be distributed, it's an application, not a project. Sure, there are some exceptions for huge projects (like Satchmo), but that's

Re: keeping SECRET_KEY secret

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 08:04 -0400, Ned Batchelder wrote: > Sometimes, when a topic comes up over and over, it means something is > wrong. Maybe not the original decision; it could be the > documentation, or the perception of the user base, or whatever. *sigh* I knew somebody was going to

Re: keeping SECRET_KEY secret

2007-11-02 Thread James Bennett
On 11/2/07, Ned Batchelder <[EMAIL PROTECTED]> wrote: > Sometimes, when a topic comes up over and over, it means something is > wrong. Maybe not the original decision; it could be the documentation, or > the perception of the user base, or whatever. I understand the need to not > revisit old

Re: New Forms Foreign key field Filtered choices

2007-11-02 Thread rm
Using standard forms this is how this is accomplished: class away_form(forms.Form): contact = forms.ModelChoiceField(queryset=Contact.objects.filter(is_staff=True), label="Person away") However, even that is not intuitive since one would assume that since the form is reading the field

form submission -> @login_required -> get form submission data

2007-11-02 Thread crybaby
I want to display the form even when the user is not logged in, but want to allow them to do form submission. So when they post the data, @login_required decorator is called on one of the view functions. Now user logs in and I want the earlier post data (form submission) to be passed to the

Re: keeping SECRET_KEY secret

2007-11-02 Thread Ned Batchelder
Sometimes, when a topic comes up over and over, it means something is wrong. Maybe not the original decision; it could be the documentation, or the perception of the user base, or whatever. I understand the need to not revisit old decision ad nauseum, but Carl has an interesting point:

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: > Stripping down my app to what isn't working as expected I have : > > models : > > class Filter(models.Model): > name = models.CharField() > object = models.ManyToManyField(Object) > > class Object(models.Model): > name =

Limiting Foreign Key choices to members of a certain group using generic views

2007-11-02 Thread Darryl Ross
Hey All, I'm after a way of limiting what choices are populated into a drop-down box from a foreign key field when I'm using the generic create/update views: What I am trying to achieve is to be able to limit the list of domains that a reseller can apply to their customer objects to domains that

Re: MS SQLServer syncdb problem

2007-11-02 Thread lopes
On Nov 2, 11:40 am, MikeHowarth <[EMAIL PROTECTED]> wrote: > As far as I'm aware SQL Server isn't supported, there was a project > going a while ago but I think it has lost momentum. No, I think is supported right now: http://www.djangoproject.com/documentation/settings/#database-engine

Standard place for signal processing code?

2007-11-02 Thread Jarek Zgoda
I'm looking for a hint as to where put signal processing code. Various objects in many apps in my project emit one signal, that has to be processed in single place and is not directly related to any particular app nor object. I do not want it in any app, since apps can be turned on and off,

Re: MS SQLServer syncdb problem

2007-11-02 Thread MikeHowarth
As far as I'm aware SQL Server isn't supported, there was a project going a while ago but I think it has lost momentum. On Nov 2, 11:36 am, lopes <[EMAIL PROTECTED]> wrote: > Hi, > I'm trying to make a syncdb and I've got the following message on > creating "auth_user" table, i've already

MS SQLServer syncdb problem

2007-11-02 Thread lopes
Hi, I'm trying to make a syncdb and I've got the following message on creating "auth_user" table, i've already installed pywin32-210.win32- py2.5.exe and adodbapi. Any ideas? >python manage.py syncdb Creating table auth_message Creating table auth_group Creating table auth_user Traceback (most

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 12:07 +0100, Simone Cittadini wrote: > Malcolm Tredinnick ha scritto: > > On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: > >> > >> class FormFilters(forms.Form): > >> filter_name = forms.ChoiceField(choices = [(f.name, f.name) for f in > >>

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Jonathan Buchanan
On 11/2/07, Simone Cittadini <[EMAIL PROTECTED]> wrote: > I think I'm in need of a for dummy example here ... > > in the view code : > > def list_filters(request): > [...] > else: > form = FormFilters() > form.filter_name.choices = [(f.name, f.name) for f in >

Re: ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Simone Cittadini
Malcolm Tredinnick ha scritto: > On Fri, 2007-11-02 at 11:25 +0100, Simone Cittadini wrote: >> >> class FormFilters(forms.Form): >> filter_name = forms.ChoiceField(choices = [(f.name, f.name) for f in >> Filter.objects.all()]) >> >> >> One view lists all the objects given the POST of

Re: keeping SECRET_KEY secret

2007-11-02 Thread Malcolm Tredinnick
On Thu, 2007-11-01 at 23:02 -0500, Carl Karsten wrote: [...] > Support for the local_settings file is there, I just think it should be > changed > from an "If it exists" to assuming it exists, and seed it with the values > that > have been singled out as "secret." This is one of those cases

ChoiceField get choices from objects.all(), but isn't updated

2007-11-02 Thread Simone Cittadini
Stripping down my app to what isn't working as expected I have : models : class Filter(models.Model): name = models.CharField() object = models.ManyToManyField(Object) class Object(models.Model): name = models.CharField() [...] forms : class FormFilters(forms.Form):

Re: JSON enconding result of Model.validate()

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 10:02 +, grimborg wrote: > Hi, > I'm writing a simple ajax form and I'm having trouble JSON-encoding > the result of Model.validate(). I always get an error similar to > "'This field is required.' cannot be JSON-encoded" > > To verify the posted data i populate the

Re: Django and XML-Files

2007-11-02 Thread Malcolm Tredinnick
On Fri, 2007-11-02 at 02:32 -0700, johannes wrote: > > Malcolm Tredinnick schrieb: > > On Thu, 2007-11-01 at 09:56 -0700, johannes wrote: > > > Hello, > > > > > > I'm planning to alter an existing hobby-project-site from php and xml/ > > > xslt scripts into a python web-app. > > > I just played

Re: keeping SECRET_KEY secret

2007-11-02 Thread Jonathan Buchanan
On 11/1/07, Carl Karsten <[EMAIL PROTECTED]> wrote: > > So before I go hacking up a patch, any comments ? > > Carl K Don't put your production settings into version control if it's publicly accessible? Personally speaking, if my project's codebase is going to be publicly accessible, I either

Re: JSON enconding result of Model.validate()

2007-11-02 Thread Jarek Zgoda
grimborg napisał(a): > I'm writing a simple ajax form and I'm having trouble JSON-encoding > the result of Model.validate(). I always get an error similar to > "'This field is required.' cannot be JSON-encoded" > > To verify the posted data i populate the model I intend to save and > call

JSON enconding result of Model.validate()

2007-11-02 Thread grimborg
Hi, I'm writing a simple ajax form and I'm having trouble JSON-encoding the result of Model.validate(). I always get an error similar to "'This field is required.' cannot be JSON-encoded" To verify the posted data i populate the model I intend to save and call validate(). If there are any errors

Re: ascii decode error bites again

2007-11-02 Thread Kenneth Gonsalves
On 01-Nov-07, at 2:25 PM, Ivan Sagalaev wrote: > Ah... So this is what you called "ascii cannot decode etc" in your > original post? This is an absolutely different issue that has > nothing to > do with Python's default usage of ascii for decoding or even Django's > unicode internals. > >

Re: Django and XML-Files

2007-11-02 Thread johannes
Malcolm Tredinnick schrieb: > On Thu, 2007-11-01 at 09:56 -0700, johannes wrote: > > Hello, > > > > I'm planning to alter an existing hobby-project-site from php and xml/ > > xslt scripts into a python web-app. > > I just played around a little bit with django and must say I like it. > > First,

Re: IOError: Client read error (Timeout?)

2007-11-02 Thread Bjørn Stabell
On Oct 6, 11:20 pm, Trey <[EMAIL PROTECTED]> wrote: > There are other people that have brought this up a little bit some > time ago. I run a small to medium sized web application that takes > profile pictures. By far my largest customer service issue is people > not being able to upload their

Re: Django and memcached

2007-11-02 Thread saw2th
You probably worked this out already but the latest versions of python- memcached don't work with python2.3. I had to go back to version 1.34 before I found one that works. On 24 Sep, 14:13, Nianbig <[EMAIL PROTECTED]> wrote: > Hi > > I´m trying to get memcached up and running with Django. > I

Any Djangonauts in Berlin for the Web 2.0 Conference?

2007-11-02 Thread RKnobelspies
If there´s interest i could offer to arrange a Django meet-up next week alongside the conference schedule. Feel free to contact me off- list for details. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

How can I pass mock objects to views for testing purposes?

2007-11-02 Thread Manoj Govindan
One of my applications has a view that uses a random number generator. I am having some trouble passing a mock random generator to the view for testing purposes. I am relying on the mock object to get predictable results for testing the view's logic. After several attempts I came up with an URL