On Apr 7, 4:05 am, Merrick wrote:
> I added a checkbox form field to my template, and I even tried to add
> it in my forms.py and then in my views.py I check for it like so:
>
> if form.cleaned_data['checkbox_field']:
> code to send email...
>
> But when I submit the form I get a KeyError. How s
On Apr 7, 8:05 am, Merrick wrote:
> How should I go about adding a field to a model form
> when the field is not part of the model?
Define a Custom ModelForm by specifying model in Meta and declare the
required addnl field there.
(check-box means boolean, right?). Now set form attribute of your
On Wed, Apr 7, 2010 at 12:08 PM, Brian Neal wrote:
> I am on trunk, somewhere around revision 127xx and just updated to
> 12936. A couple of my views render this one particular template, which
> used to take less than a second to see a response. Now it is taking
> almost a minute. The Django debug
I am on trunk, somewhere around revision 127xx and just updated to
12936. A couple of my views render this one particular template, which
used to take less than a second to see a response. Now it is taking
almost a minute. The Django debug toolbar reports nothing out of the
ordinary in terms of SQL
heya,
Hmm, I haven't thought about that. From what I can gather, the
"TaggedItem" model is what links "Tag" to your own model, via Generic
Relations - so it's basically the glue that binds the two.
I think adding another intermediary table between your model and
"TaggedItem" might break all the T
On Apr 6, 5:29 pm, Paweł Roman wrote:
> Hi all,
>
> Django has this DATETIME_FORMAT setting, which allows to format all
> datetime values, whenever they are displayed. But the problem is this
> is a _global_ setting, so whoever uses the application would see all
> the datetimes formatted exactly t
I added a checkbox form field to my template, and I even tried to add
it in my forms.py and then in my views.py I check for it like so:
if form.cleaned_data['checkbox_field']:
code to send email...
But when I submit the form I get a KeyError. How should I go about
adding a field to a model form
What exactly do you mean by, "Create a user and allow that user to
submit data such as messages"?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group,
Hi all i'm a beginner at django and was wondering if any one can help
me by being able to create a user and to allow that user to submit
data such as messages onto my website!
I'm struggling with learning the hard stuff in django.
Thanks in advance
--
You received this message because you are su
You can pass the competition instance to the for in the initialization. In
the form you change the form a little bit adding the init method to receive
the competition parameter. Then you can save it in a form attribute and then
use it in clean method.
I made a simple gist to show you haw it could
In your forms and modelforms, you can specify both the allowed input date
formats and the display format.
http://docs.djangoproject.com/en/1.1/ref/forms/fields/#datefield (see the
input_format option)
http://docs.djangoproject.com/en/1.1/ref/forms/widgets/ (see the 'format'
option)
As for col
Hi all,
Django has this DATETIME_FORMAT setting, which allows to format all
datetime values, whenever they are displayed. But the problem is this
is a _global_ setting, so whoever uses the application would see all
the datetimes formatted exactly the same way. I'd like to allow
individual users to
I have eventually made a MySQL view combining the two tables and then
used a simple Django queryset on it,
but I'd still be curios if there's a Django way of addressing this and
similar issues.
On Apr 6, 9:26 pm, "jani.mono...@gmail.com"
wrote:
> > The generated model from inspectdb is only a bes
hello, i have a clean method in my forms.py. I want this to check a
person is old enough to enter a competiton
The problem i have is that the minimum age changes and is a field in
the competition model(it is entered by the user).
My clean method is like this (pseudo code):
class personform(forms
it seems that inline-formsets will do the job.
something related to models.BaseInlineFormSet and
models.inlineformset_factory.
http://code.google.com/p/django-dynamic-formset/
I'm still studying the code. :P
regards.
-
On 6 abr, 16:09, Cesar Devera wrote:
> hi. imagine following scena
hi. imagine following scenario:
#--
from django.db import models
from django.forms.models import ModelForm
# ignore this Sample for now. focus on Master and Detail
class Sample(models.Model):
foo = CharField()
class Master(models.Mo
In my case, I store the instance of the User class along with some
other information. If the user is logged in, I used request.user to
get the instance and store it. The problem happens when the user is
Anonymous.
I finally fixed the problem by checking if the user is authenticated
and setting the
> The generated model from inspectdb is only a best guess, but there's
> nothing to stop you editing it. If your field really is a foreign key,
Not really a foreign key,both tables have a string field ID which is
the same,
and unique in one table. So it could be a foreign key except it is not
expl
On Tue, Apr 6, 2010 at 8:12 PM, Ramdas S wrote:
>
> Hey Thanks!
>
> Should I exempt all the views
>
I don't know django-paypal that well, but you should only exempt those
which are supposed to receive POST requests from external domains
(paypal) and which are secured against CSRF attacks in some
Hey Thanks!
Should I exempt all the views
On Apr 6, 11:10 pm, Matthias Kestenholz
wrote:
> On Tue, Apr 6, 2010 at 8:05 PM, Ramdas S wrote:
> > Hi,
>
> > I am trying to use using django-paypal. Everything works fine, expect that
> > the IPN doesn't reach the site.
>
> > I followed the code a pe
On Tue, Apr 6, 2010 at 8:05 PM, Ramdas S wrote:
> Hi,
>
> I am trying to use using django-paypal. Everything works fine, expect that
> the IPN doesn't reach the site.
>
> I followed the code a per instructions in the
> http://github.com/johnboxall/django-paypal
>
> I am able to send and receive mo
Hi,
I am trying to use using django-paypal. Everything works fine, expect that
the IPN doesn't reach the site.
I followed the code a per instructions in the
http://github.com/johnboxall/django-paypal
I am able to send and receive money. But without IPN the goods which is
primarily information se
I have a similar question than [django cross-site reverse][1]. But i think I
can't apply the same solution.
I'm creating an app that lets the users create their own site. After
completing the signup form the user should be redirected to his site's new
post form. Something along this lines:
On Apr 6, 5:26 pm, Jani Monoses wrote:
> Hello,
>
> what is the most straightforward way of making an implicit joining of
> two tables in the Django development version?
>
> The tables are created by another application and are only read in
> Django, and while they have a field that they can be jo
Hello,
what is the most straightforward way of making an implicit joining of
two tables in the Django development version?
The tables are created by another application and are only read in
Django, and while they have a field that they can be joined on (a
string) that is not explicit in the
Hi,
I'm trying to use Model Managers to write some per model
functionality. I have a Book model that needs to be able to convert
some of it's members into SoldBook items.
I want to be able to do:
Book.objects.filter(supplier='Jones').convert_sold()
I'm basing my code on
http://stackoverflow.com
Yes, sorry for not mentioning it.
On Tue, Apr 6, 2010 at 08:12, Walt wrote:
> Did you also specify null=True?
>
>
> Walt
>
> -~
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegro
Sorry, i am using Django 1.1.1 final
>>> import django
>>> django.VERSION
(1, 1, 1, 'final', 0)
__
Vinícius Mendes
Solucione Sistemas
http://solucione.info/
On Tue, Apr 6, 2010 at 1:09 PM, Ramiro Morales wrote:
> On Tue, Apr 6, 2010 at 12:48 PM, Vinicius Mendes
> wrote:
>
On Tue, Apr 6, 2010 at 12:48 PM, Vinicius Mendes wrote:
> Hi,
> I have a ModelAdmin with two new actions and I added a
> locale/pt_BR/LC_MESSAGES to my project folder to change the translation of
> the "Delete selected" option. Locally it works but the translated message
> user is the provided by
Hi,
I have a ModelAdmin with two new actions and I added a
locale/pt_BR/LC_MESSAGES to my project folder to change the translation of
the "Delete selected" option. Locally it works but the translated message
user is the provided by Django. I get my change list with 3 actions, but
when I run it in
Hi guys, I'm building an app for a small business so I've to work with
currencies, decimal numbers, etc... My goal is to create something
like pulseapp.com.
I've searched for opensource projects to look and the only thing I had
found was django-cashflow. This app uses python-money.
I've read some
Hi,
how can I get the value of a bound field in django admin?
I am extending some functionalities in the admin and I would like to
be able to show something according to the field value.
I want to do this in the change_form.html or fieldset.html files, so
in the template.
How can I get access to
On Tue, Apr 6, 2010 at 2:17 AM, Martin Lundberg
wrote:
> Ah, great! Do you know the ticket or changeset for it? Curious to peek and
> learn a little :)
>
http://code.djangoproject.com/ticket/11461
Karen
--
You received this message because you are subscribed to the Google Groups
"Django users
On Mon, Apr 5, 2010 at 3:32 PM, zenr wrote:
> In my application, I used django-registration to allow users to
> login. Authenticated users can use all features of the site while
> Anonymous user should be able to use some portion of the site. When
> django makes a request for an authenticated us
Did you also specify null=True?
Walt
-~
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
To unsubscribe from this group, send email to
django-users+unsubscr...@googlegroups.c
It's actually the auth context processor that queries for messages,
not the auth middleware.
The TEMPLATE_CONTEXT_PROCESSORS are only processed when you using
RequestContext. So there are numerous ways to get prevent the auth
context processor from being used. You could just not use
RequestContext
I recommend you to read more documentation about python. It's a basic python
feature. You can read more about it here:
http://www.saltycrane.com/blog/2008/01/how-to-use-args-and-kwargs-in-python/
Try this:
Sample.objects.filter(*qObjects)
__
Vinícius Mendes
Solucione Sistema
Is it possible to disable a middleware such as the authentication one
for specific views where they are not needed?
The constant querying for messages annoys me a bit :)
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send
Hi
Did you use memcache in deployment in the shared plans
Regards
Subramanyam
On Sun, Apr 4, 2010 at 9:54 PM, Justin Myers wrote:
> I'm a fan of Webfaction's shared plans, and I've used them for three
> or four projects now. I've had no problems with their support, and
> they even did a prett
Thanks.
On Apr 2, 4:22 pm, Waldemar Kornewald wrote:
> On Apr 2, 12:26 pm, knight wrote:
>
> > 1.) I get error: "'Query' object has no attribute 'all'" on line 59 in
> > views.
> > As I understand it's something to do with the fact that GAE queryset
> > is different from django queryset.
> > How
Hi *,
anybody has faced this?
http://groups.google.de/group/lightning-fast-shop/browse_thread/thread/73cc6a8ec3fa330
TIA,
SimO
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-us...@googlegroups.com.
On 5 avr, 21:49, Nihaar Gupta wrote:
> Help. I'm a bit of an apache/mod_python noob and am not sure what is
> causing this error. I get this at page load every so often (not all
> the time). Sometimes the page loads fine and sometimes it throws this
> exception.
>
> Guessing from the fact that th
42 matches
Mail list logo