Hi,
I make using static.serve a little cleaner like so:
In settings.py:
STATIC_OPTIONS = {'document_root': MEDIA_ROOT, 'show_indexes': True}
In urls.py:
from django.conf import settings
...
(r'^static/(?P.*)$', 'django.views.static.serve',
settings.STATIC_OPTIONS),
(change 'static/' above to
On Sat, 2007-01-13 at 17:16 -0800, abe wrote:
I wanted to use a {{forlppo.counter}} just behind a curly brace in a
djang template {{{forloop.counter}}.0}
but I get an error
TemplateSyntaxError
Exception Value:Could not parse the remainder: {forloop.counter
can I somehow escape the
the problem is not in django, it is more likely in your code...
you have probably applied the login_required decorator to a view
function, that does not correctly return the HttpResponse object...
again if you would post the function we could tell you more...
Honza
On 1/14/07, rzimerman <[EMAIL
How does your ENTIRE urls.py look?
it looks like you supplied a prefix (mysite.www) to the patterns
function, so that it is prepended to every view name you put there...
remove it and it should be OK
On 1/14/07, rzimerman <[EMAIL PROTECTED]> wrote:
I want the Django development web server to
I want the Django development web server to serve the images located in
'/var/www/images', so I added the following line to my urls.py file:
(r'^images/(?P.*)$', 'django.views.static.serve',
{'document_root': '/var/www/images'}),
However, when I got to view the image, I get the following
I wanted to use a {{forlppo.counter}} just behind a curly brace in a
djang template {{{forloop.counter}}.0}
but I get an error
TemplateSyntaxError
Exception Value:Could not parse the remainder: {forloop.counter
can I somehow escape the curlybrace?
-abe
I'm trying to use the 'login_required' decorator to limit access to
some of my views of logged in users. However, when I connect to these
views, I get the following error message:
Request Method: GET
Request URL:http://192.168.1.8/submitVote/
Exception Type: ValueError
I have written an application that keeps track of appointments for my
technicians. My partners would like to be able to view the appointments
in a "calendar-like" format which can be viewed and/or printed. Am I
making sense? Is there already some kind of library in Django and/or
Python that does
ashwoods wrote:
a simple open and free CMS would be good for a lot of people, specially
the newcomers. the problem is how to design a CMS that doesn't limit
the freedom you learn to love when you choose to use django over some
cms.
Someone looks like they tried to start a project like this,
Thanks.
When DEBUG = True, the page reads:
"You're seeing this error because you have DEBUG = True in your Django
settings file. Change that to False, and Django will display a standard
404 page."
Shouldn't it say something about having to define a 404 template first?
When I read the message
On 1/13/07 3:09 PM, Fred C. Dobbs wrote:
I've synched to revision 4313, setup a project, added a line to the
urlpatterns to allow normal operation, and set Debug to False. Then I
fire up the builtin server and request a non-existent page. I expect a
"standard 404 page", but what I get is:
Newbie question.
I've synched to revision 4313, setup a project, added a line to the
urlpatterns to allow normal operation, and set Debug to False. Then I
fire up the builtin server and request a non-existent page. I expect a
"standard 404 page", but what I get is:
Traceback (most recent call
I would recommend you reading this blog by James Bennet:
http://www.b-list.org/weblog/2006/11/16/django-tips-get-most-out-generic-views
it has some great tips on using and extending generic views...
On 1/14/07, qhfgva <[EMAIL PROTECTED]> wrote:
So far I've been using generic views for
So far I've been using generic views for everything so I'm not sure if
I've reached the end of what those can do, or just need some better
understanding of how to use them.
I have a Foo model and a Goo model which among other attributes has a
non-editable ForeignKey reference back to Foo. I'm
On 1/13/07, Brian Victor <[EMAIL PROTECTED]> wrote:
Let's say there's a Room model. And let's say there's a ManyToMany
relationship with User to specify which users can schedule certain
rooms. How should a person in such a circumstance create a SelectField
on a form with a user's rooms as
Let's say there's a Room model. And let's say there's a ManyToMany
relationship with User to specify which users can schedule certain
rooms. How should a person in such a circumstance create a SelectField
on a form with a user's rooms as choices? Or more generally, how should
I go about
or you can simply output the latex code using templates... its just a
text file and thus can be rendered via the standard mechanism...
we use this approach to generate RTF files
On 1/12/07, Kjell Magne Fauske <[EMAIL PROTECTED]> wrote:
Anush Shetty wrote:
> Hi,
> I want to build a wiki with
Thanks a lot Honza and James!
On Jan 13, 2007, at 1:35 PM, Honza Král wrote:
just a thought: do you have DEBUG turned off in your settings?
if not, django will store all qeuries it made in memory so that it is
accessible for debugging purposes...
That's it! With debug off it's stable!
I've been thinking about ideas to capture more detailed logging info in
Django for my app. For instance, I'd like to capture every time someone
views a certain object. Also, I might want to capture all items viewed
in a session. There are obviously several ways to do it. The simplest
is
On 1/13/07, Rob J Goedman <[EMAIL PROTECTED]> wrote:
Normally the delays are natural and are controlled via Twisted (TCP
and callLater). Above program is stable if I comment out the cpl=list
(...) statement, otherwise it grows forever.
Each time that code is called, it's fetching every row
just a thought: do you have DEBUG turned off in your settings?
if not, django will store all qeuries it made in memory so that it is
accessible for debugging purposes...
On 1/13/07, Rob J Goedman <[EMAIL PROTECTED]> wrote:
Hi,
We converted an access system written in VB to a Django app. The
Hi,
We converted an access system written in VB to a Django app. The pure
db side and GUI work great. Data is also obtained from control panels
that have fingerprint readers attached. So I wrote a separate python
program to 'scan' these control panels (embedded linux based) and
store it
On 1/13/07, Picio <[EMAIL PROTECTED]> wrote:
Hello,
in my custom view, when I retrieve a query set, I need to add (i mean
do the sum) of all the values in a column. Is there a built in
django-way to do it, instead to write python code myself?
In the db_api I saw order_by but I cant see
I'm trying to make a RelaxedPhoneNumber field that normalizes
user input to an internal representation of purely digits before
getting saved, and then presents in a particular format. I'm
having trouble finding where to intercept and change the value.
I want to do it on the field level, as I
django is great for writing CMSs, or in other words, writing web
applications for content :). it makes sense to have "application
driven" websites instead of "content driven" when writing the code with
django is so easy... the tradeoff is that most of us are probably
rewriting a lot of the stuff
on irc there was more than one who were really interested in creating
forms from model defintions are were really sad that newforms does not
do this.
but! the newforms documentation isn't nearly finished, so if you are
really impatient, just dive into the code yourself :)
or if you read the
Hi,
I ve decided to try to use django in a project of mine to display some
results. I have an idea of how I m going to implement the database but not
how this translate to a django data model. I am trying to use a database to
store a graph of Nodes to Nodes with Edges. However there are multiple
i visit http://127.0.0.1:8000/media/image/post-jg.gif
and return Page not found:
C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django/contrib/admin/media\image/post-jg.gif
my project locates D:\project\rankba\,and set MEDIA_ROOT =
'D:\\project\\rankba\\media' in settings.py
Hello,
in my custom view, when I retrieve a query set, I need to add (i mean
do the sum) of all the values in a column. Is there a built in
django-way to do it, instead to write python code myself?
In the db_api I saw order_by but I cant see something related to SUM.
I know there is .extra
29 matches
Mail list logo