Hmm, when I remove the raise CommandError statement and replace it with
self.stdout.write, everything works well.
This helps me to point further studies. Thx!
On Wednesday, May 10, 2023 at 2:33:18 PM UTC+2 Bob Aalsma wrote:
> Ah, yes, thanks.
>
> I hesitate to comment on "If I understood the err
Ah, yes, thanks.
I hesitate to comment on "If I understood the error right." ;)
Umm, my problem here is that I think I'm using the exact same *code*
"manually" without errors.
I think I'm also using the same *values* for the manual and test runs.
So I don't understand the reason for the differe
If I understood the error right.
On Wed, May 10, 2023 at 5:47 PM Vishesh Mangla
wrote:
> Probably this would help:
> https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django
>
> On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
>
Probably this would help:
https://stackoverflow.com/questions/8609192/what-is-the-difference-between-null-true-and-blank-true-in-django
On Wed, May 10, 2023 at 5:45 PM 'Bob Aalsma' via Django users <
django-users@googlegroups.com> wrote:
> Sorry Vishesh, thanks for the quick answer but I have no
Sorry Vishesh, thanks for the quick answer but I have no idea what you mean.
On Wednesday, May 10, 2023 at 2:00:51 PM UTC+2 Vishesh Mangla wrote:
> False or True check for yourself.
>
> On Wed, 10 May, 2023, 17:29 Vishesh Mangla, wrote:
>
>> It looks like you are passing a null but null=False is
False or True check for yourself.
On Wed, 10 May, 2023, 17:29 Vishesh Mangla,
wrote:
> It looks like you are passing a null but null=False is not set
>
> On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
> django-users@googlegroups.com> wrote:
>
>> I'm trying to test a django-admin co
It looks like you are passing a null but null=False is not set
On Wed, 10 May, 2023, 17:27 'Bob Aalsma' via Django users, <
django-users@googlegroups.com> wrote:
> I'm trying to test a django-admin command and don't understand why the
> tests give errors on the code while the code works as expect
I'm trying to test a django-admin command and don't understand why the
tests give errors on the code while the code works as expected.
I'm under the impression that the *raise CommandError* is ignored by the
test, but don't understand why this would be.
Please help.
Running the code shows:
(.
Oh,
*Thank you Andréas for your kind attention and your reactivity.*
Nice, I didn't know about request.session... And thanks to you, *now I Know*
:-)
Just for archive, I found a way with context_processors here (old django
version, but I adapt to django 2) :
http://apprendre-python.com/page-dja
Hi Micka,
And welcome to django.
Regarding how to add things in middleware - you can add the information to
the session like this:
class SimpleBreadcrumbs(object):
def __init__(self, get_response):
self.get_response = get_response
# One-time configuration and initialization.
Hello to all Django users :-)
I'm new to Django and this is my first post.
I'd like to implement breadcrumbs on all my pages.
My strategy is to create a middleware and to use RequestContext to
add a dict to the context of each request then use the context in my html
My problem is that I don't u
Hi,
Are there any error messages?
Is there already an existing mysite folder?
What method did you use to install django? Did you really install django
1.8, not 1.7?
Collin
On Thursday, November 27, 2014 10:15:51 AM UTC-5, David Pride wrote:
>
> Title says it all really. Have just installed D
Title says it all really. Have just installed Django 1.8, can test django
version and get correct response so am *fairly* happy it's installed
correctly. I have had Python 2.7 installed and been using perfectly for
several months.
Altered the PATH variable as discussed so it points to correct
I'm new to django and AJAX-level web development, so pardon my non-orthodox
lingo :)
Any ideas what I might be doing wrong if the AJAX form for rating in
agon_ratings added per instructions (
http://agon-ratings.readthedocs.org/en/latest/usage.html) doesn't seem to
really do much? I get the sta
In [1]: x = '1234'
In [2]: x.isdigit()
Out[2]: True
--
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
django-users+unsubscr...@goog
Hi all,
I have a model snippet that I wanna use to store phonenumbers:
e_mail = models.EmailField()
phone = models.CharField(max_length=15)
Mobile numbers in my country are 11digit numbers e.g 080,
Fixed Lines: (2 digit),7 digit e.g (01)755
I wanna try and validate this field on
On 27 January 2011 14:26, Casual Coder wrote:
> Is there a way to see what all got imported from django?
In Python, you can see what is available in each imported module by
using the dir function, e.g.
>>> import django
>>> dir(django)
['VERSION', '__builtins__', '__doc__', '__file__', '__name
Thanks Mike & Russ,
I was using 0.96 for development with Google App Engine.
Stubbornly. I really didn't HAVE to use GAE. I picked it as a
hosting & auth headstart.
My rampup has been embarrassingly slow (Python, Django, Eclipse
newbie) so I think I'll switch over to a newer version of Django
On Thu, Jan 27, 2011 at 12:22 PM, Mike Dewhirst wrote:
> On 27/01/2011 2:35pm, Casual Coder wrote:
>
> import django
> django.VERSION
>>
>> (0, 96.406, None)
>>
> django.get_version()
>>
>> Traceback (most recent call last):
>> File "", line 1, in
>> AttributeError: '
On 27/01/2011 2:35pm, Casual Coder wrote:
import django
django.VERSION
(0, 96.406, None)
django.get_version()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'get_version'
Maybe Django version 0.96 didn't use a get_vers
>>> import django
>>> django.VERSION
(0, 96.406, None)
>>> django.get_version()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'get_version'
--
You received this message because you are subscribed to the Google Groups
"Djan
Mike I appreciate your answers and am trying them lots of ways. Still
not getting that Django linkage in my console.
>>> import django
>>> django.get_version()
Traceback (most recent call last):
File "", line 1, in
AttributeError: 'module' object has no attribute 'get_version'
Is there a way
On 27/01/2011 1:02pm, Casual Coder wrote:
Thanks Mike.
But Darn I'm not as powerful as I had hoped. I expected DUMPDATA to
work the same way, but it doesn't. How did VERSION work?
VERSION didn't actually "work". It is a constant which is an attribute
of django. Bear in mind that django is
Thanks Mike.
But Darn I'm not as powerful as I had hoped. I expected DUMPDATA to
work the same way, but it doesn't. How did VERSION work?
and why doesn't django-admin.py dumpdata work?
>>> django-admin.py dumpdata
File "", line 1
django-admin.py dumpdata
^
Sy
On Jan 26, 8:13 pm, Mike Dewhirst wrote:
> >>> from django import VERSION
> >>> VERSION
> (1, 3, 0, 'alpha', 1)
Ah. That works. I have suddenly become quite powerful. Thanks!
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to t
On 27/01/2011 12:02pm, Casual Coder wrote:
I'd like to get handy with using the console. Do I have a setup
problem or a usage problem?
>>> from django import VERSION
>>> VERSION
(1, 3, 0, 'alpha', 1)
>>>
See following pydev console output. Am I not able to run
get_version() like that?
I'd like to get handy with using the console. Do I have a setup
problem or a usage problem?
See following pydev console output. Am I not able to run
get_version() like that?
Thanks...
>>> import sys; print('%s %s' % (sys.executable or sys.platform, sys.version))
C:\Python25\python.exe 2.5.4
Ah ha...yes - thank you.
M
On Dec 23, 3:46 pm, Bill Freeman wrote:
> Do you have an __init__.py file in zombie_django/battleships ? It is allowed
> to be empty, but it must be there for python to consider the folder to be
> a "package" (folder of modules and sub-packages).
>
> See the documenta
Do you have an __init__.py file in zombie_django/battleships ? It is allowed
to be empty, but it must be there for python to consider the folder to be
a "package" (folder of modules and sub-packages).
See the documentation and tutorials at python.org
On Wed, Dec 23, 2009 at 7:29 AM, Martyn wrot
Hey,
I'm new to django, so please excuse me for asking simple questions for
a bit.
I've installed django and have followed through a few of the simpler
tutorials and have decided it's time to brave the world by
myself...and have fallen at the first hurdle.
I have a website with a urls.py and a v
On Aug 22, 8:29 pm, justin jools wrote:
> key is used in replacement of 'id' in Google app engine (patch)
> Essentially this doesnt matter, assume it is id in normal django.
> I would just like to know how to do a list, list, detail query. When I
> pass the id from first list to query a second li
key is used in replacement of 'id' in Google app engine (patch)
Essentially this doesnt matter, assume it is id in normal django.
I would just like to know how to do a list, list, detail query. When I
pass the id from first list to query a second list in a different
table: i.e. first list/table is
On Aug 22, 6:08 pm, justin jools wrote:
> how can I show a list then pass the id to next list lookup then
> detail?
>
> basically I'm writing a car product database with make, type and model
> tables:
>
> so first list is Audi, BMW, Ford... the next list is e.g. Audi models:
> T100, Quattro, then
how can I show a list then pass the id to next list lookup then
detail?
basically I'm writing a car product database with make, type and model
tables:
so first list is Audi, BMW, Ford... the next list is e.g. Audi models:
T100, Quattro, then last selection is detail.
I used this view model and
generic view list_detail: how do I pass id to another list? (I'm using
google app engine patch)
Ive defined my first view as follows:
def list_make(request):
return object_list(request, Product_Make.all())
which works fine, now I want to pass the id selection to another list
on a different
from django.db import models
from django.utils.translation import ugettext_lazy as _
from django.conf import settings
from django.db.models import permalink
from django.contrib.auth.models import User
import datetime
class PersonType(models.Model):
title = models.CharField(max_length=100)
On 7 jan, 00:03, phoebebright wrote:
> Thanks for that clarification. I am finding that a lot of assumptions
> are made in the documentation about previous knowledge.
Indeed. It is assumed that the reader knows at least a couple things
about the web, programming, HTML, and the HTTP protocol !-)
On 6 jan, 22:46, phoebebright wrote:
> Thanks for your response. Do you think a working knowledge of python
> is essential for django then?
Obviously, yes !-)
That's just like asking if a working knowledge of Java is essential
for Strut, or if a working knowledge of PHP is essential for the Zen
Thanks for that clarification. I am finding that a lot of assumptions
are made in the documentation about previous knowledge. The
documentation can appear very confusing until you understand the
background, then it magically becomes blindingly obvious and helpful!
I must write down more of these
On Tue, Jan 6, 2009 at 16:49, Jeff Anderson wrote:
> phoebebright wrote:
>> Thanks for your response. Do you think a working knowledge of python
>> is essential for django then? And do I import modules the same in
>> django and python? Are there any python things you can't do in
>> django?
yes
phoebebright wrote:
> Thanks for your response. Do you think a working knowledge of python
> is essential for django then? And do I import modules the same in
> django and python? Are there any python things you can't do in
> django?
>
Django *is* Python. In fact, Django is only a Python libra
Thanks for your response. Do you think a working knowledge of python
is essential for django then? And do I import modules the same in
django and python? Are there any python things you can't do in
django?
On Jan 6, 8:18 pm, "Alex Koshelev" wrote:
> Yes. Django is just Python
>
> On Tue, Jan
Yes. Django is just Python
On Tue, Jan 6, 2009 at 11:14 PM, phoebebright wrote:
>
> As a newbie to both python and django (ex PHP) I am not clear on when
> I can use python functions and when I can't.
>
> I want to do some simple string handling in a view, search and replace
> for example, but
As a newbie to both python and django (ex PHP) I am not clear on when
I can use python functions and when I can't.
I want to do some simple string handling in a view, search and replace
for example, but can't find anything in the documentation. I assume
this means that I can use python string ha
Paul,
Thanks for the help. I switched to the get method, and the data
prints correctly now. Thanks!
-Mike
On Dec 22, 5:44 pm, "Wayper, Paul"
wrote:
> > .filter returns a list of the items that match the query. So
> > you're trying to stringify a list. That's where the '[' and
> > ']' are c
> .filter returns a list of the items that match the query. So
> you're trying to stringify a list. That's where the '[' and
> ']' are coming from.
I should have mentioned that the get method (e.g. Post.objects.get(id =
1)) will return a single object, or raise a DoesNotExist error. You may
> From: Mike Albert
> Subject: Newbie Help with Models and Views
>
> I have a couple test rows of data in my database. From the
> interactive shell (manage.py shell), I can return data correctly with
> Post.objects.filter(id=1).
You'll notice that that data is coming b
Hello,
Just getting started learning django, and I'm having trouble with a
view. Here is the model I've created:
from django.db import models
class Post (models.Model):
text = models.CharField(max_length=30)
def __str__(self):
return self.text
I have a couple test rows of
Hi All,
I'm rather new to django (and python) so I tend to get lost sometimes:
I'm looking to limit the choices in a ManyToMany relationship:
class Computer(models.Model):
host = models.CharField(max_length = 20, unique = True)
def __unicode__(self):
return self.host
class Conf
ah <[EMAIL PROTECTED]>
To: django-users@googlegroups.com
Sent: Monday, July 14, 2008 11:58:18 PM
Subject: Re: newbie help
maxlength was changed in the trunk to max_length. You are probably
using an older version of Django, the tutorial you were following
refers to the latest version:
http://cod
lanahan <[EMAIL PROTECTED]>
To: Django users
Sent: Monday, July 14, 2008 11:18:52 PM
Subject: Re: newbie help
On Jul 14, 3:46 pm, Mario Zorz <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm following the Django tutorial [1] I'm using windows xp, python 2.5 and
&g
Sorry, hadn't gotten new mail in a while :D
Joshua Jonah wrote:
> maxlength was changed in the trunk to max_length. You are probably
> using an older version of Django, the tutorial you were following
> refers to the latest version:
> http://code.djangoproject.com/ticket/6457
>
> As for the retu
maxlength was changed in the trunk to max_length. You are probably using
an older version of Django, the tutorial you were following refers to
the latest version:
http://code.djangoproject.com/ticket/6457
As for the returning the text thing, same deal. If you go to this page:
http://www.djangop
On Jul 14, 3:46 pm, Mario Zorz <[EMAIL PROTECTED]> wrote:
> Hello all,
>
> I'm following the Django tutorial [1] I'm using windows xp, python 2.5 and
> SQLite. For some reason I found these 2 things not being appropiate as
> followed in the tutorial:
>
> 1) When tried "python manage.py sql polls
Hello all,
I'm following the Django tutorial [1] I'm using windows xp, python 2.5 and
SQLite. For some reason I found these 2 things not being appropiate as followed
in the tutorial:
1) When tried "python manage.py sql polls" I got this
TypeError: __init__() got an unexpected keyword argument
55 matches
Mail list logo