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.
On Fri, 2007-11-02 at 20:35 +, rm wrote:
> 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_in
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
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 f
> 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 pass
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
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 ren
> 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 Gr
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 this
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 right
>
> # 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:
http://groups.google.com/group/
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 d
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 = Contact.objects.filter(
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 knowin
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
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:
>
> Exception
>
> 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:
I would recommend not using the generic create/update views as those
views use old forms and manipulators which are going away in favor of
"n
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.
http://www.djangopr
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 dj
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,
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 Django
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
> 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 o
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
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:
>
> if(self.
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
--~
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 Reason
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 ?
>
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
> 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 ins
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:
http://groups.google.com/group/django-users/browse_thread/thread/7d52d52ce5945be6/36367d31
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 this
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 "sec
--~--~-~--~~~---~--~~
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 option
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 your
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 form_f
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
> 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 configu
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,
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 render_to_resp
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
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
>
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 messag
[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
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. B
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 exac
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 bring
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 de
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 defini
On Fri, 2007-11-02 at 11:47 +, lopes wrote:
> 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.django
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 view
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: whoeve
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 = m
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
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
--~--~
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, eventu
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 install
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
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
> >> Filter.objects.all
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
> Filter.object
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 FormFilt
Thanks, that solved it!
On Nov 2, 11:30 am, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> 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
> > "
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 w
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):
filter
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 model
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 a
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 onl
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 valida
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
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.
>
> What
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, h
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 phot
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 h
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 users
74 matches
Mail list logo