> would I still be able to paginate over the entire list of 1 objects?
Or my list would be shortened to 5 objects?
Its the latter. Your query set will loop only for the size of it's length.
On Sat, Dec 19, 2009 at 12:03 PM, Continuation wrote:
> In the django-pagination, it uses the example
On Dec 18, 2009, at 9:58 PM, yummy_droid wrote:
> I read that we can overwrite the save() for any model to do something
> before/after its save. But my issue is, how can I be sure that what i
> save + what the model needs to save happen as a transaction, so if
> either fails, the whole thing fails
In the django-pagination, it uses the example:
{% autopaginate object_list %}
My question is does object_list have to be the **entire** list over
which I want to paginate, or can I limit the length of object_list? If
I limit the length of object_list, will autopaginate still go through
the entire
Hi,
I read that we can overwrite the save() for any model to do something
before/after its save. But my issue is, how can I be sure that what i
save + what the model needs to save happen as a transaction, so if
either fails, the whole thing fails.
Example. I want to keep a total inventory count i
Hello,
I've installed pydelicious and it seems to work until it imports
feedparser.py. I've installed feedparser.py, and it's in the same
directory as pydelicious. When pydelicious tries to import
feedparser.py my app crashes. I get 'No module named feedparser'. Does
anyone know why feedparser.py
On Fri, Dec 18, 2009 at 6:58 PM, macdd wrote:
> plain text then it isn't very secure. Okay so https comes in. What I
> don't understand is when to use it and when not to. It seems like if
> you authenticate over https just for user credentials and then go back
> to http (like yahoo) than someone c
I am reading the django book. I just finished the chapter on
authentication. I get the jist of it. What I don't understand is the
overall security of authentication. If everything you do is passed as
plain text then it isn't very secure. Okay so https comes in. What I
don't understand is when to us
One thing I'm keenly missing from rails is the form input naming convention
that causes the form values to be converted into a hierarchy. For instance,
will result in the request values being stored as { 'foo' : {'bar' : 'one',
'baz' : 'two' }}
this is very handy when updating multiple rel
I need users to attach arbitrary media files to database records. Attachments
seems to do what I need, except that its UI is utterly lame - it should figure
out the media type of the file from the extension and display an appropriate
thumbnail as well as a way to provide a viewer inline. Also,
Thanks for the information, I will look into your suggestions. The
getLanguage design did seem to work though, as changing the language
did have an effect on the __unicode__ function: in the admin interface
the correct values (for that language) were shown. At least it did so
on the local runserver
On Wednesday 16 Dec 2009 10:45:49 am Paddy Joy wrote:
> Try 'django.middleware.csrf.CsrfMiddleware' instead of
> 'django.contrib.csrf.middleware.CsrfMiddleware'
>
copied and pasted straight from the official docs
--
regards
Kenneth Gonsalves
Senior Project Officer
NRC-FOSS
http://nrcfosshelpline
I recently got burned by r11626, which added SimpleLazyObject to
1.1.x. I have a templatetag that linkifies a user-object, and it
checks whether it is given a django.contrib.auth.models.User, an int
(looks up a User) or a profile (looks up the User). This check was
done with type(). Unfortunately,
I have the following models:
class News(models.Model):
title = models.CharField(max_length=128)
author = models.ForeignKey(User, related_name='news')
class Report(News):
subtitle = models.CharField(max_length=128)
synopsis = models.TextField()
class Post(News):
body = models.
I tried
{% if field %}
No
{% else %}
Yes - {{ field }}
{% endif %}
And if the value of field is null, the else statement above ended up
getting executed and output was "Yes - None"
So far for me:
{% ifequal field Null %} and {% ifequal field None %} works.
But
{% if field %}
doesn't.
D
Sorry guys. the explanation is in the next paragraph. Please
disregard.
On Dec 18, 1:50 pm, bayousoft wrote:
> I am brand new to Django and I'm trying to get up to speed ASAP. I
> really like it so far. I'm getting an error trying to create a
> template in the shell.
>
> >>> from django import
Looking in Synaptic I'm kinda wondering if I need to install python-
jinja2 ?
On Dec 18, 1:50 pm, bayousoft wrote:
> I am brand new to Django and I'm trying to get up to speed ASAP. I
> really like it so far. I'm getting an error trying to create a
> template in the shell.
>
> >>> from django i
Hello...
A common occurrence I have with one particular project is that it
requires the user to enter dimensions (for width/depth/height) in Feet
and Inches. Calculations are needed to be performed on that dimension,
so I've been working on a custom field type that takes in a dimension
in Feet/Inc
Okay, Here's a quick look at my model layout
Contact :
company -> ForeignKey -> Company
Company :
type --> OneToOne --> Type
Type :
type (character)
I'm trying to build a search that will return contacts based on
certain criteria. Any other fields in Company that do not join to
another t
I am brand new to Django and I'm trying to get up to speed ASAP. I
really like it so far. I'm getting an error trying to create a
template in the shell.
>>> from django import template
>>> t = template.Template('My name is {{ name }}.')
Traceback (most recent call last):
File "", line 1, in
idle.pyw is the gui version of the python idle editor. Sounds like
you've got file extension .py associated with it, instead of python.
On Dec 18, 11:59 am, OkaMthembo wrote:
> Hi Dane,
>
> Yes, when you have to specify an absolute path to get it working, it
> definitely sounds like a PATH envir
On Dec 18, 2:13 pm, Michael K wrote:
> Still having the same issue. I'm on a windows machine, but even if I
> use wget on one of the Solaris machines, the TAR is reported as having
> no files and/or is corrupted.
>
> Is there another download location I can try?
>
> --
> Michael
James,
Thanks f
On Dec 18, 2:10 pm, Michael K wrote:
> On Dec 16, 4:10 pm, James Bennett wrote:> On Wed, Dec
> 16, 2009 at 2:13 PM, Michael K wrote:
> > > Should I take the silence to mean I should open a bug report?
>
> > I clicked the "download" link for Django 1.1.1, and the package
> > downloaded. On fin
On Dec 16, 4:10 pm, James Bennett wrote:
> On Wed, Dec 16, 2009 at 2:13 PM, Michael K wrote:
> > Should I take the silence to mean I should open a bug report?
>
> I clicked the "download" link for Django 1.1.1, and the package
> downloaded. On finishing the download, I was able to checksum it a
Hi Dane,
Yes, when you have to specify an absolute path to get it working, it
definitely sounds like a PATH environ config. problem. When you check your
PATH variables, do you see the folder to django-admin.py listed?
Regards,
Lloyd
On Fri, Dec 18, 2009 at 7:27 PM, Dane wrote:
> It worked with
It worked with 'python c:\python26\scripts\django-admin.py
startproject newsite'. Does that mean the PATH got messed up somehow?
On Dec 18, 7:52 am, Shawn Milochik wrote:
> What happens when you type 'python django-admin.py'?
>
> If that doesn't work, try replacing 'python' there with the full pa
In case anyone else hits this issue, there's a patch available:
http://code.djangoproject.com/ticket/12399
--
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 th
Thanks Ales, there were problems with the symlink. Deleting it and
just doing python setup.py install solved the problem. Thanks again
for your help!
-Gaston
On Dec 17, 3:08 am, Ales Zoulek wrote:
> OK.
>
> Try:
>
> ls SITE-PACKAGES-DIR/django
>
> is there a "core", "http", "forms" dirs or dirs
Hi,
Sorry for the late reply. Here is more info.
Django Verstion: 1.1
Oracle Version:Oracle9i Enterprise Edition Release 9.2.0.8.0 - 64bit
Production
cx_oracle for Python 2.6.
Thanks for the help.
Wayne
On Dec 18, 10:26 am, Peter Herndon wrote:
> On Dec 18, 2009, at 10:15 AM, Peter Herndon wr
Never mind. Me am a moron. Had a totally different programming error
elsewhere. It works as is it should.
On Dec 17, 4:12 pm, Chris Curvey wrote:
> I have my class definition that looks like
>
> class Foo:
> def get_bars(self):
> bars = []
> # do something to collect bar instan
On Thu, Dec 17, 2009 at 5:02 AM, bruno desthuilliers
wrote:
...
>
> [1] currently 970 LOCs, and I just have the basic models structures
> and only one custom manager defined yet, so I know there will be more
> to come. YMMV but I don't like modules growing much bigger than 1 to
> 1.5 KLOC.
In gen
See link for details
https://us.pycon.org/2010/register/default/index
--
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
It is the project configuration's file, "settings.py" where you can
change project options, for example, DATABASE_NAME equals name of your
database and more...
2009/12/18 Biju Varghese :
> create a project with django-admin.py startproject project1
> and this will create a folder named project1 an
create a project with django-admin.py startproject project1
and this will create a folder named project1 and check in this foder
will have settings.py urls.py manage.py and __init__.py etc.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post
I can't promise that it will do what you want, but your problem is
that at the time
you try to set the value of Meta.ordering, class Substrate does not yet exist.
You can dig into the Substrate.objects._meta later to add ordering, probably.
Your design wouldn't have worked anyway, since getLanguag
On Dec 18, 2009, at 10:15 AM, Peter Herndon wrote:
>
> On Dec 17, 2009, at 7:32 PM, Wayne wrote:
>
>> Hi,
>
> This error arises from an inconsistency between the behavior of Oracle and
> the behavior of PostgreSQL, as Mike noted. It works under Postgres. I'll
> check with the dev list and
On Dec 17, 2009, at 7:32 PM, Wayne wrote:
> Hi,
Hi Wayne,
>
> I tried to use djando-ldap-groups but got some errors from database
> configuration. Could somebody shed some light on the possible problems
> of my set up?
Hmm, I think I found the problem below.
>
> Our LDAP server is Sun One Se
The difference between the PDF and JPG is that the JPG has to be an 'img' tag
and the PDF has to be an 'href' tag.
So instead of:
Try:
Download Important Stuff
Shawn
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group,
What happens when you type 'python django-admin.py'?
If that doesn't work, try replacing 'python' there with the full path to your
Python executable in Windows. I've never heard of this problem, but it sounds
like it could be something odd in the environment.
Shawn
--
You received this messag
Hi all,
I'm new to Django. I got through the beginner tutorial without much
trouble and I just finished the introductory chapters of The
Definitive Guide, so I decided to start work on a real project. I've
quickly run into a bizarre stumbling block however when I try to start
my new project.
I ru
Hi,
I am having a bit of a problem. I have a model with 3 name fields,
each for a different language. By creating an __unicode__ function
like below, I always get the correct name for the current language.
Works fine.
But, I want to change the default ordering for this model, so that in
each lang
I saw a solution on the list to format a datefield in a template.
Unfortunately i didnt find any solution for formatting a datefield in
a mailform. I have this in my model:
Aankomst = forms.DateField(('%d/%m/%Y',), widget=forms.DateTimeInput
(format='%d/%m/%Y', attrs={
'c
2009/12/18 reactosguy :
> I get this message every time I go on http://localhost:8000/ with the
> Django server running:
>
> Traceback (most recent call last):
>
> File "C:\Python26\lib\site-packages\django\core\servers
> \basehttp.py", line 279, in run
> self.result = application(self.environ,
On Dec 18, 7:12 am, Continuation wrote:
> I have a field with the null=True option
>
> How do I test for the Null value in template?
>
> I did something like:
>
> {% ifequal field Null %}
> do something
> {% else %}
> do something else
>
> I tested it and it worked. But I want to make sure
has nobody an idea for this?
Hour and Minute itself seems to be easy - should just be added to
where.py
WhereNode class => make_atom() - but how to extend the functionality
to greater / lower?
-- Hinnack
On Nov 27, 2:53 pm, Hinnack wrote:
> Hi,
>
> how would I extend the field lookup to get som
noone interested in this?
--
Hinnack
-- Forwarded message --
From: Hinnack
Date: 2009/12/13
Subject: Ticket #2417 Support for binary type fields
To: Django users
Hi,
is there a timeframe, when this will make it into TRUNC or a version?
regards
--
Hinnack
--
You received
In fact, my code had a bug in it -- I was both rolling back and
releasing the savepoint (via a finally). Sorry about that.
For the record this *does* work: you can use savepoints and row-level
locking for synchronization between different processes, as you would
hope
Thanks.
On Dec 18, 2:03
46 matches
Mail list logo