On 11/11/2012 4:45pm, Mike Dewhirst wrote:
Can anyone help with some unit test guidance please?
How can I trap an IntegrityError in a test to prove unique_together is
working?
I'm modelling a company and multiple divisions. A solo division doesn't
need a division.name so I'm allowing it to be b
Can anyone help with some unit test guidance please?
How can I trap an IntegrityError in a test to prove unique_together is
working?
I'm modelling a company and multiple divisions. A solo division doesn't
need a division.name so I'm allowing it to be blank. It's __unicode__()
method returns
David
I think the solution is to look at the admindocs source and tweak it to
do what you want and submit a patch.
The target audience for admindocs is template authors. This means you
are possibly trying to make admindocs do something it wasn't designed to
do. I don't mean your specific pro
I want to ensure that a username is unique hence the unique constraint. Is
having a ModelForm with an abstract model is supported? If not I will
consider dynamically creating an instance of derived model form. But it
looks a lot cleaner with the abstract class.
On Saturday, November 10, 2012 5
Hi!
I would try to set unique property within "real" model, not within abstract
base class. Besides django creates unique pk on each model by default, so
to my mind creating additional unique field is redundant. Not quite sure,
but there seems to be some restrictions on use of unique property.
In the documentation it is quite clear that the following syntax is
correct in templates:
{% load i18n %}
{% trans "my_string" as blah_string %}
{{ blah_string }}
etc etc.
This works fine if the original trans tag is inside a block but then the
blah_string variable is only valid within that
I noticed a strange behavior with Django and filed a bug
https://code.djangoproject.com/ticket/19271#ticket
It is suggested that I first check on the support group if the bug is valid
or not. Fair Enough.
I have created a standalone project to demonstrate the problem. In order to
run it you may
On Sat, Nov 10, 2012 at 6:15 AM, Tomas Ehrlich wrote:
> I usualy put methods like this one into Model, although Manager is also
> possible. Definitely not View or sth else.
definitely in the model.
you'd use it like this:
accnt = get_object_or_404 (Account, pk=account_id)
payee = get_object_or_
Try youtube. Pretty cool series of django tutorial from HackedExistence.
https://www.youtube.com/watch?v=yAyWM-iEIos&feature=youtube_gdata_player
If the link does not work, search for HackedExistence and django. Good
luck.
Regards
Matthias
Am 10.11.2012 16:29 schrieb "HackTheDay" :
> Hi, What a
wow thank you, can any one of you write a blog post about how to setup this
environment or share a post which you have written earlier.
With Best
-Ashwin.
+91-9959166266
On Sat, Nov 10, 2012 at 10:19 PM, Javier Guerra Giraldez wrote:
> On Sat, Nov 10, 2012 at 3:51 AM, Kurtis Mullins
> wrote
On Sat, Nov 10, 2012 at 3:51 AM, Kurtis Mullins
wrote:
> I, personally, prefer Nginx and uWSGI but something else may be better for
> your particular use case.
same here. it's a little different from other solutions, but rock
solid, and includes its own process management, so it's really close
t
Hi, What are apps/prjects (with detailed documentation) like Poll App which
a new developer
can play around to get a grip of Django and web dev?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To view this discussion on the web visit
https://
Hi
I'm pretty new to Django and am trying to use doc strings to document my
model in the admin interface. All works fine except for a model that uses
inheritance.
My Abstract base model is:
class Account(models.Model):
"""
blah blah
"""
account_id = models.CharField(max_length=10, unique=True)
Hi
I'm using Django 1.4.2. I have a base model:
class Account(models.Model):account_id =
models.CharField(max_length=10, unique=True)name =
models.CharField(max_length=50)balance =
models.DecimalField(max_digits=20, decimal_places=2)
and I have child model that inheri
Hi Kristofer,
I usualy put methods like this one into Model, although Manager is also
possible. Definitely not View or sth else.
Why I like Model more than Manager is this difference (suppose your
method is called make_payment):
Account.make_payment # via Model
Account.objects.make_payme
Well for development purposes, I just recommend using Django's built-in
"runserver" command. It will launch a relatively full-featured HTTP Server
for testing on your own computer. The command is "python manage.py
runserver" and you should be able to access it using localhost:8000
Otherwise, I thi
16 matches
Mail list logo