Hi,
As stated in the answer on SO you should write a custom clean method for your
field.
Bye
On Nov 16, 2011, at 5:31, youpsla wrote:
> Sorry,
>
> I've not search enough,
>
> I think this post :
> http://stackoverflow.com/questions/6365318/custom-field-error-from-try-except-in-django-view
Hi,
I have a django app running on Heroku - I've just added memcached to
the app and have got a server location plus username and password for
the memcached server.
How do I put the username / password into the cache settings in my
settings.py file? I can only see the ability to put IP and Port i
Hey Fabio
Sorry for not replying any sooner. It was a holiday here in Brazil, so I
haven't been checking my e-mail that regularly. I promise to get back at
you as soon as I can, okay? I'll be sure to provide some snippets so that
you can get a sense of how I achieved this. Maybe I'll just make a w
I have a webpage which look nice under one browser and terrible in
another. I'd like to write separate css file for second browser. I'd
like to know if there is possibility to check in template under which
browser I am? I mean something like this:
{% if browser="nice_browser" %}
load css file
Hi
Do you know modernizr? http://www.modernizr.com/
It's a small Java script that detects browser capabilities and adds
them to the 'body' tag.
Also check out http://html5boilerplate.com/. There is a browser reset
css that tries to get all browsers to a common base.
Regards
Simon
On 16 Nov.,
Since url shorteners have already been suggested, how about the possibility
of writing a shorter url pattern in urls.py. Would something like
http://www.freesound.org/r/1-123-a12345678ed12345d123/ be good enough for
you?
Cheers,
AT
On Tue, Nov 15, 2011 at 2:34 PM, Tom Evans wrote:
> On Tue, N
Hello,
I have got a class Person:
class Person(models.Model):
given_names = models.CharField(max_length=200)
family_names = models.CharField(max_length=200)
date_of_birth = models.DateField(blank=True)
and a class PersonForm:
class PersonForm(forms.ModelForm):
def clean_date_of
On 16/11/11 14:32, Jaroslav Dobrek wrote:
Hello,
I have got a class Person:
class Person(models.Model):
given_names = models.CharField(max_length=200)
family_names = models.CharField(max_length=200)
date_of_birth = models.DateField(blank=True)
and a class PersonForm:
class Pers
I'm setting up a standard deploy on a CentOS 6 system that I hope will
be the template for all applications for my small company. We tend to
put only 1 or 2 applications on a VMware image more for administrative
purposes and to avoid a problem/debugging on one system from impacting
other unrelated
Hi All,
So I haven't used Django in a while (like three months), and when I
tried firing up a project in dev from Terminal (in OSX) today using
the "python manage.py runserver" command, I got the following
Traceback:
File "manage.py", line 14, in
execute_manager(settings)
File "/Library/
> def clean_date_of_birth(self):
> date_of_birth = self.cleaned_data.get('date_of_birth')
> if date_of_birth:
> if date_of_birth.year < 1890:
> raise forms.ValidationError(u"It is very improbable...")
> return date_of_birth
>
I had alre
I forgot to say:
(1) I deleted the database completely and created it again.
(2) I ran manage.py syncdb
However, with this code
def clean_date_of_birth(self):
date_of_birth = self.cleaned_data.get('date_of_birth')
if date_of_birth:
if date_of_birth.year < 1890:
On Wed, Nov 16, 2011 at 3:16 PM, Jaroslav Dobrek
wrote:
> I forgot to say:
>
> (1) I deleted the database completely and created it again.
> (2) I ran manage.py syncdb
>
> However, with this code
>
> def clean_date_of_birth(self):
> date_of_birth = self.cleaned_data.get('date_of_birth')
>
On Wed, Nov 16, 2011 at 3:01 PM, Gchorn wrote:
> Hi All,
>
> So I haven't used Django in a while (like three months), and when I
> tried firing up a project in dev from Terminal (in OSX) today using
> the "python manage.py runserver" command, I got the following
> Traceback:
>
> File "manage.py",
> https://docs.djangoproject.com/en/1.3/ref/models/fields/#blankhttps://docs.djangoproject.com/en/1.3/ref/models/fields/#null
>
> The confusion comes about because charfields do not require null=True,
> as empty or missing strings are stored as the empty string rather than
> as a null string.
>
Th
Hi,
I have looked a lot and have not yet figured out how to accomplish this.
Let me show with an example what I am trying to accomplish.
class WidgetType(models.Model):
"""WidgetType categorizes the type of Widget"""
name = models.CharField(max_length=255)
slug = models.SlugField(m
On Wed, Nov 16, 2011 at 4:43 PM, Bastian Kuberek wrote:
> Hi,
> I have looked a lot and have not yet figured out how to accomplish this.
> Let me show with an example what I am trying to accomplish.
>
>
http://code.google.com/p/django-polymorphic-models/
Cheers
Tom
--
You received this messa
Hallöchen!
Bastian Kuberek writes:
> [...]
>
> What I need is to be able to query the Widget class and get back
> subclasses based on their type:
>
widgets = Widget.objects.all()
print widgets
> [ 5>,]
We do this very reliably with
http://djangosnippets.org/snippets/2091/ but I fin
You might be interested in this talk from DjangoCon US 2011:
http://blip.tv/djangocon/restful-apis-promises-lies-5572618
--
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 unsu
Does anybody have a link to a downloadable version of that presentation?
blip.tv is blocked for me here at work and I would love to watch it right
away.
Thanks in advance!
Cheers,
AT
On Wed, Nov 16, 2011 at 3:38 PM, Shawn Milochik wrote:
> You might be interested in this talk from DjangoCon U
i need to modify the content (article) but its not creating history
when i used .save() method .
But when i create article in admin module and continue editing , its
keep on creating history and also publishing status is being changed
from public to draft.
How can i test the same from test case ?
I am new to both python and Django but I have been programming for more than
20 years so I am teaching myself this stuff. I came across an old training
video that I have been going through. This training has you develop a
website that can create web pages. I got everything right so far but I ju
Hey all,
We just put out a blog post on our Python pre-commit hook for git in case
anybody is interested:
http://tech.yipit.com/2011/11/16/183772396/
Cheers,
Adam
---
Adam Nelson
CTO, Yipit
Join the Yipit Team and work with Python, Django, MongoDB, jQuery,
Backbone.js and Sass @ http://yipit.c
On Wed, Nov 16, 2011 at 10:36 AM, Djano_newb wrote:
>
> I am new to both python and Django but I have been programming for more
> than
> 20 years so I am teaching myself this stuff. I came across an old training
> video that I have been going through. This training has you develop a
> website t
In a model for my database I am trying to define an Accounts table
with the id of a default Django User.
class Accounts(models.Model):
user = models.OneToOneField(User)
When I have it set up like this and try to add a user in the adduser
view:
def adduser(request):
username = request.POST['usern
Hi,
I just want to make sure I'm not missing something obvious.
I'm writing a command that takes multiple required parameters and a
set of optional parameters and I there doesn't seem to be readily
available support for this use case. LabelCommand can take multiple
labels, but the semantics of t
Weird, when I navigate to that folder, it hangs as though it's having
to load up a ton of files, and then after a lengthy pause it shows 0
items. I don't know how I could have erased the contents of this
folder as I have never opened it (or why it's hanging every time I try
to open it). The only
On 17/11/2011 9:55am, Gchorn wrote:
Weird, when I navigate to that folder, it hangs as though it's having
to load up a ton of files, and then after a lengthy pause it shows 0
items. I don't know how I could have erased the contents of this
folder as I have never opened it (or why it's hanging ev
We need to code a 5-step form wizard. The first step should let you
select products with various options, validate them, then add those
items to a basket, then proceed when you are ready. The next few
steps are straightforward - personal details, delivery details,
payment.
The FormWizard in 1.3
I'm sorry, it's not totally clear to me what you mean by "trashed disk." If I
use a disk utility, what am I looking for? Some sort of corruption of the
actual hard drive? Are you saying my hard drive itself might be compromised and
need replacement?
Thanks,
Guillaume
--
You received this mess
Hey All
Im running through the Geodjango tutorial and am getting an error
running the load.py. I get the following error; "DatabaseError:
invalid byte sequence for encoding "UTF8": 0x00". It throws this error
on the first row of the world borders shapefile. I can't find a null
character anywhere
On 17/11/2011 12:03pm, Gchorn wrote:
I'm sorry, it's not totally clear to me what you mean by "trashed
disk." If I use a disk utility, what am I looking for? Some sort of
corruption of the actual hard drive? Are you saying my hard drive
itself might be compromised and need replacement?
I think
Hello Django Expets!
In one of my Django app, users must fill some forms with Django
DateField. Why this class does not contain field max_value? Perhaps it
is worth a new ticket?
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this
Hello Django Expets!
In one of my Django app, users must fill some forms with Django
DateField. Why this class does not contain field max_value? Perhaps it
is worth a new ticket?
--
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this
-1
If you need to limit the latest date a user can input, do it while
cleaning your form
On 11/17/11, Michael Nacharov wrote:
> Hello Django Expets!
> In one of my Django app, users must fill some forms with Django
> DateField. Why this class does not contain field max_value? Perhaps it
> is wort
Also, if you want to suggest new features for django, you will have to
do that in django-develop group otherwise you won't get the core
developers to see your suggestions.
Thanks
On 11/17/11, Babatunde Akinyanmi wrote:
> -1
> If you need to limit the latest date a user can input, do it while
> cl
On Thu, 2011-11-17 at 08:10 +0100, Babatunde Akinyanmi wrote:
> Also, if you want to suggest new features for django, you will have to
> do that in django-develop group otherwise you won't get the core
> developers to see your suggestions.
not so - this is the correct list for suggestions. And th
37 matches
Mail list logo