Hi,
The HTTP return codes 404 and 500 can be raised with an exception.
That's very handy. Unfortunately a Http Redirect can't be raised.
Do other django users thing this would be usefull, too?
I implemented it myself. But I think something like this should be in django.
#responseutils.py
class
I've used the ORM as a kinda command line client for a database. It's pretty
quick and easy to do :-)
On 02/01/2008, Jeff Anderson <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I am just curious if there is anyone out there that has used django to
> create things other than web applications.
> I've se
On Jan 2, 2008 3:49 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> The HTTP return codes 404 and 500 can be raised with an exception.
>
> That's very handy. Unfortunately a Http Redirect can't be raised.
> Do other django users thing this would be usefull, too?
No. Exceptions represent "errors"
I may be the only one still interested in this, but the patch got
incorporated yesterday (http://code.djangoproject.com/changeset/6981),
so Malcolm, your original idea will now work.
--Ned.
Ned Batchelder wrote:
> I tried out this change, and it works well. I've created a ticket
> (http://cod
On Jan 2, 2008 12:07 AM, LRP <[EMAIL PROTECTED]> wrote:
>
> Hello,
>
> I'm trying to install django following directions in The Django Book.
> I would like to run with Postgres on my Debian etch system.
>
> When I try to build psycopg2.0.6 I get the error messages shown below.
> Would much appreci
Jeff Anderson wrote:
> Hello,
>
> I am just curious if there is anyone out there that has used django to
> create things other than web applications.
> I've seen it done where I work-- we use django for our print accounting
> scripts.
>
> Does anyone else use django for a framework?
>
> Jeff Ande
Try downloading Kodos and sticking in your regex and the string you
want to match it and see what it says.
Todd
On Jan 2, 2008 12:59 AM, Greg <[EMAIL PROTECTED]> wrote:
>
> ocgstyles,
> Tried it...still no good
>
> (r'^(?P[a-zA-Z]+)_(?P[a-zA-Z]+)/$', 'showline'),
>
>
> On Jan 1, 11:23 pm, ocgsty
Hi Dan,
Are u by any chance planning to release it?
Ramdas
On Jan 2, 2008 6:34 PM, Daniel Mahoney <[EMAIL PROTECTED]> wrote:
>
> Jeff Anderson wrote:
> > Hello,
> >
> > I am just curious if there is anyone out there that has used django to
> > create things other than web applications.
> > I've
Hi Jeff and Doug
Thank you for your prompt and helpful responses! I have to delay my
reply because I'm still figuring out certain core concepts of Python
that I need to read on before I can reply. :)
Jeff:
> Storing their results would be a bit ugly, unless you wanted to create new
> tables fo
Hi Jeff and Doug
Thank you for your prompt and helpful responses! I have to delay my
reply because I'm still figuring out certain core concepts of Python
that I need to read on before I can reply. :)
Jeff:
> Storing their results would be a bit ugly, unless you wanted to create new
> tables fo
Yes, I am. I've created a SourceForge project for it (ISPython), am just
waiting for the SF admins to approve it before I move the first files
over (READMEs, an first draft of the Admin tool, etc).
Ramdas S wrote:
> Hi Dan,
>
> Are u by any chance planning to release it?
>
> Ramdas
>
> On Jan 2
Oh! Great!
Shall follow this work
Ramdas
On Jan 2, 2008 7:20 PM, Daniel Mahoney <[EMAIL PROTECTED]> wrote:
>
> Yes, I am. I've created a SourceForge project for it (ISPython), am just
> waiting for the SF admins to approve it before I move the first files
> over (READMEs, an first draft of the
On Wed, Jan 02, 2008 at 04:09:43AM -0600, James Bennett wrote:
>
> On Jan 2, 2008 3:49 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> > The HTTP return codes 404 and 500 can be raised with an exception.
> >
> > That's very handy. Unfortunately a Http Redirect can't be raised.
> > Do other django
Hi all,
I'm having some problems with Django and CSS. It seems that my templates
just don't load the CSS file. I'm using some think like this:
and the "file.css" is in the same directory as all my templates, but all
my pages are with no style.
So is there any special thing to do to use CSS wit
We have a Django web application that also uses parts of Django to
feed data to the database automatically.
There's an application built in Twisted that receives messages from
various other servers and 'does something' based on the message.
One of the 'does somethings' is using the Django ORM f
Ronaldo, have a look here:
http://www.djangoproject.com/documentation/static_files/
Thomas
On Jan 2, 3:23 pm, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]>
wrote:
> Hi all,
>
> I'm having some problems with Django and CSS. It seems that my templates
> just don't load the CSS file. I'm using some thi
1. the error is :
TemplateSyntaxError at /groups/
'tagging.templatetags.tagging_tags' is not a valid tag library: Could
not load template library from
django.templatetags.tagging.templatetags.tagging_tags, No module named
tagging.templatetags.tagging_tags
the tagging is under c:\python25\lib\ a
As always, your questions are answered by the well-maintained list of
backwards-incompatible changes:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges
Specifically, you want to read this:
http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Templatetagloadingrespectsdo
Hi all,
Is there a good python shopping cart that works well with django?
Thanks,
Jorge Hugo Murillo
Be a better friend, newshound, and
know-it-all with Yahoo! Mobile. Try it now.
http://mobile.ya
Am Mittwoch, 2. Januar 2008 11:09 schrieb James Bennett:
> On Jan 2, 2008 3:49 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> > The HTTP return codes 404 and 500 can be raised with an exception.
> >
> > That's very handy. Unfortunately a Http Redirect can't be raised.
> > Do other django users t
On Jan 2, 2008 8:20 AM, Forest Bond <[EMAIL PROTECTED]> wrote:
> I disagree. Exceptions represent "exceptional situations," not all of which
> are
> necessarily errors. For instance, SystemExit is not really an error, is it?
> What about StopIteration?
By that analogy as well, exceptions would
> Tried it...still no good
When in doubt, supply specifics, as in 'exactly what is the specific
URL you are trying to match?'
The given pattern matches an appropriate URL correctly. E.g.
>>> import re
>>> x = 'foobar_abcde/'
>>> m = re.match(r'^(?P[a-zA-Z]+)_(?P[a-zA-Z]+)/$', x)
>>> print m.gro
On Jan 2, 2008 9:37 AM, Thomas Guettler <[EMAIL PROTECTED]> wrote:
> If someone tries to save a form, but someone else was faster,
> then I want to leave the slower person a message, and redirect him to
> the form again. His changes will be lost.
Why not return a validation error from the form te
http://www.satchmoproject.com/
On 2 янв, 18:37, [EMAIL PROTECTED] wrote:
> Hi all,
> Is there a good python shopping cart that works well with django?
> Thanks,
>
> Jorge Hugo Murillo
>
>
>
> Be a better f
I haven't tried to work with it yet, but you might want to checkout
(pun intended) the Django-based cart 'Satchmo' at http://www.satchmoproject.com/
and their newsgroup at http://groups.google.com/group/satchmo-users.
They are currently at 0.6 and are working on their roadmap to 1.0.
Peter
--~-
Hi,
On Wed, Jan 02, 2008 at 09:35:33AM -0600, James Bennett wrote:
> On Jan 2, 2008 8:20 AM, Forest Bond <[EMAIL PROTECTED]> wrote:
> > I disagree. Exceptions represent "exceptional situations," not all of
> > which are
> > necessarily errors. For instance, SystemExit is not really an error, is
> I am just curious if there is anyone out there that has used django to
> create things other than web applications.
> I've seen it done where I work-- we use django for our print accounting
> scripts.
I've used it for some ETL work (slurping in CSV files and
churning them into the DB), which g
Given that I've thought a bit about this not too long ago[1], I'll
pipe in with my little bit of philosophy, along with some advice on
the topic at hand.
Exceptions are, by definition, exceptional. They defy the rule. That
could mean errors, but it could also mean any other situation that a
parti
Hedronist,
Thanks for the reply. I tried your suggestion but it still doesn't
work. Thanks for the link. I'll look it over and hopefully be able
to solve the problem.
In regards to having all of my pages as close to the root as
possible. I was reading that search engines put more importance t
http://code.google.com/p/django-cart/
A much shorter learning curve than Satchmo, but a fraction of the
functionality.
On Jan 2, 9:37 am, [EMAIL PROTECTED] wrote:
> Hi all,
> Is there a good python shopping cart that works well with django?
> Thanks,
>
> Jorge Hugo Murillo
>
>
> _
On Dec 30 2007, 6:46 pm, makebelieve <[EMAIL PROTECTED]> wrote:
> Part of a form of mine has a drop down to choose a region which is a
> foreign key to the object I'm updating. Further, I have a link to add
> a new region if the user does not see what they want. If a user adds
> a new region it
There's no reason, apart from the fact that I feel like I'm repeating
myself in the views. I'm thinking template tags, because the template
inheritance tree has to be specified in the templates. Therefore it is
the only place to load necessary context variables without having to
repeat the inherit
Le 20 déc. 07 à 10:27, Daniel de la Cuesta a écrit :
> Hi all,
>
> I want to add the geo tag (with latitude and longitude) to each item
> of my feeds:
>
> 45.256 -71.92
> I am using the feeds framework:
> class LatestEvents(Feed):title = "Latest Events"link
> = "/events/"
> My son gave me some space to play in on an Apache server he rents.
Is this a dedicated server or a shared hosting account?
Dedicated? Carry on.
Shared? Watch out! Many shared hosting providers frown on (or outright
forbid) "long running processes." Without thinking about what I was
doing, I s
Hi Thomas,
Thanks. It helped me a lot.
Ronaldo.
On Wed, 2008-01-02 at 06:28 -0800, Thomas wrote:
> Ronaldo, have a look here:
> http://www.djangoproject.com/documentation/static_files/
>
> Thomas
>
>
> On Jan 2, 3:23 pm, "Ronaldo Z. Afonso" <[EMAIL PROTECTED]>
> wrote:
> > Hi all,
> >
> > I'
I have this code,
from django.contrib.auth import login
user = User.objects.get(username =
login_form.cleaned_data['username'])
login(request, user)
Which is giving me exception 'User' object has no attribute 'backend'
Traceback:
File "C:\Python24\lib\site-pack
Hi,
I wonder what tool let me to do web load & stress testing with this
options:
- Run on Windows, test target are windows & solaris
- Simulate diferent users, with separation of surfers vs content
uploaders (ej: send photos, links, etc)
- Tell me page size & maybe benefits on caching?
- Correla
For all your testing needs http://www.softwareqatest.com/qatweb1.html
On Jan 2, 2:58 pm, mamcxyz <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I wonder what tool let me to do web load & stress testing with this
> options:
>
> - Run on Windows, test target are windows & solaris
> - Simulate diferent users,
On Jan 2, 2008 1:57 PM, shabda <[EMAIL PROTECTED]> wrote:
> I have this code,
> from django.contrib.auth import login
> user = User.objects.get(username =
> login_form.cleaned_data['username'])
> login(request, user)
> Which is giving me exception 'User' object
Hi all!
I'm seeing a really strange behavior.
I have a query
q = Company.objects.filter(asOf__isnull = False).filter(Q(exchange =
1) | Q(exchange = 2)).order_by("name")[1:50]
When I run it from the command prompt, it gives proper results.
But when I run it as the web application / view, the s
Keith:
If you want to take your first steps learning Django without
installing it, I work on a tutorial in my spare time called Instant
Django:
http://www.instantdjango.com
It includes a download that contains a portable Django environment
that runs under Windows, no installation required, and
I have used the formtags that is inluded in the nongselect tar
package. It seems with the development version of django the import
statements {% load formtags %} no longer work, I need a way to
replace the
{% selectrow form.reporter "/myapp/reporter_lookup/?q=%{searchString}"
"first_name" %}
On Sat, 2007-12-29 at 00:30 -0800, sector119 wrote:
> Request Method: GET
> Request URL: http://127.0.0.1:8000/people/person/
> Exception Type: TypeError
> Exception Value: Cannot resolve keyword '' into field. Choices are:
> organizationdatabase, meterreadings, transaction, id,
On Sat, 2007-12-29 at 00:55 -0800, Ulf Kronman wrote:
> Hi all,
> I'm using Django to build a repository of scientific publications at
> my university.
>
> Now we need to edit publication records that have been supplied by our
> departments and imported into the database.
>
> I would like to be
On Sat, 2007-12-29 at 20:27 -0800, shabda wrote:
> Using the testing framework how can we make sure that the correct view
> got called.
>
> Documentation at http://www.djangoproject.com/documentation/testing/#testcase
> says that
> (django.test.client can be used to) "Test that the correct view
I am trying to filter by users who are not staff, but this user column
accepts NULL values in my model.
As a result I need to check for user__isnull, since
user__is_staff=False will not work for null values.
I tried:
Post.objects.filter(Q(user__isnull=True) | Q(user__is_staff=False))
but this
On Wed, 2008-01-02 at 14:25 -0800, Peter wrote:
> I am trying to filter by users who are not staff, but this user column
> accepts NULL values in my model.
>
> As a result I need to check for user__isnull, since
> user__is_staff=False will not work for null values.
>
> I tried:
> Post.objects
I really like Django's policy of readable URLs and one authoritative
page. My question is how do I do printable versions of those nice
and authoritative urls?
Say I have this:
http://www.site.com/articles/slug
I can think of two general ways:
http://www.site.com/print_articles/slug
http://www
On Jan 2, 2008 4:09 PM, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote:
> It doesn't seem to be possible to work out the exact Python function
> that was called (the necessary information isn't always available, since
> it could, for example, be a middleware function that short-circuited
> things).
Hi,
I have the same situation as a thread (http://groups.google.com/group/
django-users/browse_thread/thread/2dbb2b7f01951a2/efbeb1f74be6e454?
lnk=gst&q=multiple+template+block) started in 2005. The idea is that
in my template, I want to use the same template block for both the
and tags.
I did
The second variant with GET query is the best. One resouce has one uri
but with query you specify it's display properties.
On 3 янв, 01:52, Mordy Ovits <[EMAIL PROTECTED]> wrote:
> I really like Django's policy of readable URLs and one authoritative
> page. My question is how do I do printable v
Йобаные клерики, идити в жопу. Я русский. Мои предки сделали Революцию, я
атеист, мне срать на ваше дебильное мнение о мире. Умрите, пожалуйста, сами,
не заставляйте тратить на вас патроны. Православные, католики, всякие прочие
идиоты идут вместе с вами к стенке. Вы идиоты и вы неизлечимы. Вы не
Use the user defined inclusion template tag or {% include %} standard
tag
http://www.djangoproject.com/documentation/templates_python/#inclusion-tags
On 3 янв, 01:52, stryderjzw <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I have the same situation as a thread (http://groups.google.com/group/
> django-us
sorry for my last message. We are meting new year in Russia
--~--~-~--~~~---~--~~
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
Hi,
I'm having a problem with Django "HTML escaping" JSON data sent in
response to an asynchronous form submission when the form has an
field. Forms that don't have a file field
yield proper responses, and when Javascript is disabled on the browser
normal form submissions work as well.
I'm using
In my sitemap file, I want to include subdomain links such as:
http://user1.domain.com, http://user2.domain.com, ...
But when I specify a URL in "location" method of the sitemap class, a
"http://example.com"; (or whatever is specified in the sites contrib
app) is prepended to the URL.
Same with
On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
> Hi,
> I'm having a problem with Django "HTML escaping" JSON data sent in
> response to an asynchronous form submission when the form has an
> field. Forms that don't have a file field
> yield proper responses, and when Javascript is disabled on
(This is hedronist in his disguise as himself, whatever that means.)
> www.mysite.com/sprint_cellular_M1000/
Ah, something specific. Of course, it doesn't look like what you first
posted, but I kind of suspected that. I'll say it one more time, if
you have a specific problem, then you need to sp
Well, I figured out that overriding the "get_urls" method of the
Sitemap class solves the problem. But, remember to call the private
__get() method like _Sitemap__get() in your class.
Though, a cleaner solution is appreciated...
On Jan 2, 3:38 pm, omat <[EMAIL PROTECTED]> wrote:
> In my sitema
Hi
I´m building my own admin view... I have followed this tutorial:
http://www.djangobook.com/en/1.0/chapter17/. Everything works fine
except that all urls in the header, the "home" link, "change password"
link, "logout" link doesn't work for some reasen.
The home-link is linked to "/", not "/ad
On Jan 2, 4:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
> On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
> > Hi,
> > I'm having a problem with Django "HTML escaping" JSON data sent in
> > response to an asynchronous form submission when the form has an
> > field. Forms that don't have
You could try not serving a different page at all: CSS can apply a
different stylesheet when printing than when on the screen. See
http://www.alistapart.com/stories/goingtoprint/ for an introduction.
--Ned.
http://nedbatchelder.com
Alex Koshelev wrote:
> The second variant with GET query is th
> How can I add URLs with sub-domains to my sitemap files?
If you are talking about XML sitemaps, you can't.
>From http://www.sitemaps.org/protocol.php:
Note that this means that all URLs listed in the Sitemap must use the
same protocol (http, in this example) and reside on the same host as
the
> On Jan 2, 4:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> wrote:
>
>
>
> > On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
> > > Hi,
> > > I'm having a problem with Django "HTML escaping" JSON data sent in
> > > response to an asynchronous form submission when the form has an
> > > field. F
> Use the user defined inclusion template tag or {% include %} standard
> taghttp://www.djangoproject.com/documentation/templates_python/#inclusio...
@Alex: That's not what he was asking for. He wants to be able to have
multiple blocks with the same name in a parent template and have them
get the
I also like /articles/slug/print, in that print modifies the
articles/slug url that precedes it. Also, you can prevent robot
spidering other ways than robots.txt. A tag in the served
content can direct the robot as well: see http://www.robotstxt.org/meta.html
--Ned.
http://nedbatchelder.com
Greetings folks,
We are looking into using GeoDjango for a project of ours and are
wondering how stable it is compared to 0.9.6? I took a look at the
revisions and it seems to be updated from trunk, but from my
understanding its not exactly stable? Our requirements are very simple
as we want to r
thanks James, i found many changes in this file. it is very useful to
newbies.
here is from djangoproject.org:
Previously, anything before the final dot was ignored. If you were
using this for any decorative purpose (at least one package was, it
turns out), you have to remove any unwanted prefix.
> You could try not serving a different page at all: CSS can
> apply a different stylesheet when printing than when on the
> screen. See http://www.alistapart.com/stories/goingtoprint/
> for an introduction.
While I agree with Ned that CSS is an excellent if not the
best way to go...The OP (Mord
i use {% load tagging.templatetags.tagging_tags %}, it work right on
the previous svn django.
last night i updated django to the latest svn, and got this error:
'tagging.templatetags.tagging_tags' is not a valid tag library: Could
not load template library from
django.templatetags.tagging.templa
On Jan 2, 2008 10:34 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> i use {% load tagging.templatetags.tagging_tags %}, it work right on
> the previous svn django.
>
> last night i updated django to the latest svn, and got this error:
>
> 'tagging.templatetags.tagging_tags' is not a valid ta
thanks Karen, it works as you said.
On Jan 3, 11:42 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
> On Jan 2, 2008 10:34 PM, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
>
>
>
>
>
>
> > i use {% load tagging.templatetags.tagging_tags %}, it work right on
> > the previous svn django.
>
> > last
Generally, GeoDjango is as stable as trunk (the latest merge was today
-- we're in sync up to r6990). This topic was discussed in-depth in a
previous thread:
http://groups.google.com/group/django-users/browse_thread/thread/f6d73b6ec1be2f03
> I took a look at the revisions and it seems to be upd
I have a simple view:
def index(request):
this_dict = { 'one':'','two':'', 'three':''}
c = Context({"this_dict":this_dict})
return HttpResponse(t.render(c))
my template is like so:
{% for i in this_dict %}
key: {{i}}
value:{{this_dict.i}}
{% endfor %}
This might help...
from: http://www.djangoproject.com/documentation/templates/#for
{% for key, value in this_dict.items %}
{{ key }}: {{ value }}
{% endfor %}
-Bill
On Jan 2, 2008, at 8:40 PM, brandonl wrote:
I have a simple view:
def index(request):
this_dict = { 'one':'','tw
>From the template docs:
http://www.djangoproject.com/documentation/templates/
{% for key, value in data.items %}
{{ key }}: {{ value }}
{% endfor %}
Note that this is for the svn version of django.
brandonl wrote:
> I have a simple view:
>
> def index(request):
> this_dict = { 'one':'
Thanks.
On Jan 2, 8:47 pm, Jeff Anderson <[EMAIL PROTECTED]> wrote:
> From the template docs:http://www.djangoproject.com/documentation/templates/
>
> {% for key, value in data.items %}
> {{ key }}: {{ value }}
> {% endfor %}
>
> Note that this is for the svn version of django.
>
> brandonl w
Wow! Thanks for all the replies. I appreciate all the help.
I'll check out the tutorial, and hope all goes well with the new baby.
The server is shared. My son doesn't have any problem with me working
on it, but I don't want to cause any problems for him. If I run the
dev server briefly, that wo
> If I run the dev server briefly, that won't cause any problems, will it?
It all depends on your hosting company. When in doubt, ask. It's not
that you are port-scanning their accounting machine, but you are
creating a "long running process" (i.e. it doesn't just generate a
page and exit) that i
Hi,
I'm looking for the most pythonic [or djangonautic] way to render a
FusionChart [http://www.fusioncharts.com/gadgets/docs/] in Django. I
searched through the forums and didn't see this addressed directly -- my
apologies if this is very basic and obvious!
1. I have a django template, containe
The sitemaps.org says:
> For instance, if the Sitemap is located at
> http://www.example.com/sitemap.xml, it can't include URLs from
> http://subdomain.example.com.
But if I place it under "example.com" (without the "www") it should be
ok for the subdomains.
On Jan 2, 5:55 pm, Peter Rowell
It turns out this problem has been reported by others, see ticket
http://code.djangoproject.com/ticket/5563
The easiest solution in this case was to change the type of the field,
from models.BooleanField to models.NullBooleanField, and now null
values from the dumpdata are loaded without a proble
You were right Peter, Google refused the subdomains, even when the
sitemap file was under "domain.com".
But this doesn't seem logical. If a sitemap can represent sub
directories, it should be able to represent sub domains below it
hierarchically.
Thanks for the reply...
On Jan 2, 11:15 pm,
On Jan 2, 7:13 pm, grahamu <[EMAIL PROTECTED]> wrote:
> > On Jan 2, 4:43 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
> > wrote:
>
> > > On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
> > > > Hi,
> > > > I'm having a problem with Django "HTML escaping" JSON data sent in
> > > > response to an as
On Wed, 2008-01-02 at 15:38 -0800, grahamu wrote:
[...]
> As an example, the JSON response seen by the javascript might be:
>
>"{\"valid\": false, \"errors\": {\"options\": \" \"errorlist\\">- This field is required.<\/li><\/
> ul>\"}}"
>
> when it should be:
>
>"{\"vali
85 matches
Mail list logo