Re: Blog URLs - defined in Template or elsewhere?

2006-08-18 Thread Malcolm Tredinnick
On Fri, 2006-08-18 at 19:59 -0700, keukaman wrote: > I'm unclear how to generate the urls for a blog application I have. > > The source code for the djangoproject/weblog app shows this: > > {{ object.headline > }} > > When I do the same in my template I only get the absolute url of the > applic

Re: favicon.ico displaying in page

2006-08-18 Thread Cheng Zhang
On Aug 17, 2006, at 5:22 PM, a wrote: > > getting and storing favicon.ico as an image, problems > I need to get the favicon.ico using urllib2.urlretrive or somehting > like that > and webpages dont uniformly handle favicons.ico they dont different > references > such as > /favicon.ico > or /medi

Blog URLs - defined in Template or elsewhere?

2006-08-18 Thread keukaman
I'm unclear how to generate the urls for a blog application I have. The source code for the djangoproject/weblog app shows this: {{ object.headline }} When I do the same in my template I only get the absolute url of the application, ie., http://www.websitename.com/blog/. However, it appears tha

Re: manage.py runserver throws error message

2006-08-18 Thread Malcolm Tredinnick
On Fri, 2006-08-18 at 15:52 -0400, Cole Tuininga wrote: > On 8/2/06, neuruss <[EMAIL PROTECTED]> wrote: > > > Is there anything you've forgotten to tell us? You really did just do > > > "django-admin.py startproject site", then "cd site", edit a couple of > > > lines inside settings.py and then "m

Re: django admin - page's auto-refresh after item addition

2006-08-18 Thread david83
Thank you :-) --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Re: order_by()

2006-08-18 Thread James
Just for the record, see: http://code.djangoproject.com/ticket/2076 --~--~-~--~~~---~--~~ 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 unsubs

Pope Guido blesses Django

2006-08-18 Thread Andy Dustman
http://pyre.third-bit.com/blog/archives/613.html (found via http://del.icio.us/holovarty) """Guido just pronounced: Django is *the* web framework * Won't be part of the core, but will be as "standard" as PIL or NumPy * This was not what I expected the outcome of my talk would be, but hey

Reading data from binary files - A Mini Tutorial

2006-08-18 Thread [EMAIL PROTECTED]
The tutorial: http://code.djangoproject.com/wiki/reading_baldurs_gate_binary_files This tutorial describes how to read a binary file and get data out of it. To do it you need the filetype specification as shown in the example - Baldurs Gate II CHR Character file :) --~--~-~--~~-

Re: How do I parse XML in a Django view?

2006-08-18 Thread JP
Are you running under mod_python? Is there any chance that this is an xml library version collision between python and apache? Perhaps, if so, you could try lxml, which provides an ElementTree-like interface but doesn't use expat: http://codespeak.net/lxml/ JP --~--~-~--~~-

Re: django admin - page's auto-refresh after item addition

2006-08-18 Thread Adrian Holovaty
On 8/18/06, bk <[EMAIL PROTECTED]> wrote: > It's when you add to a related object from within an add/edit page. > The popup window loads normally, but upon save, it returns a blank page > and doesn't automatically refresh/update the parent window. Aha! Thanks for reporting this. I've fixed it in

Re: How do I parse XML in a Django view?

2006-08-18 Thread Bill de hÓra
Mike wrote: > Yes to both. I'm assuming the url configuration is correct because if I > attempt to use regular file reading and writing everything works fine > and if I change the name of the file I'm parsing to something that > doesn't exist, the page throws an error. The file is readable and > w

Re: django admin - page's auto-refresh after item addition

2006-08-18 Thread david83
it is exactly that but I have difficulties to explain it in with my bad English level ;-) ! any idea ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djan

Re: How do I parse XML in a Django view?

2006-08-18 Thread Mike
Yes to both. I'm assuming the url configuration is correct because if I attempt to use regular file reading and writing everything works fine and if I change the name of the file I'm parsing to something that doesn't exist, the page throws an error. The file is readable and writeable (for test pur

Re: How do I parse XML in a Django view?

2006-08-18 Thread Jeremy Dunck
On 8/18/06, Nathan R. Yergler <[EMAIL PROTECTED]> wrote: > > Are you sure your url configuration is correct? Sounds like your > problem isn't in the catalog function at all. Are you sure the file is readable by your web server user? --~--~-~--~~~---~--~~ You rece

order_by()

2006-08-18 Thread James
Hi, according to the docs, I should be able order by a field in another table like below, but for some reason I can't get it to work. I'm new to django. Thought I'd give it a shot as I've primarily been using Ruby on Rails. views.py: products = Product.objects.order_by('products_brand.name', 'p

Re: manage.py runserver throws error message

2006-08-18 Thread Cole Tuininga
On 8/2/06, neuruss <[EMAIL PROTECTED]> wrote: > > Is there anything you've forgotten to tell us? You really did just do > > "django-admin.py startproject site", then "cd site", edit a couple of > > lines inside settings.py and then "manage.py runserver"? > > No, I didn't edit any line. > The tutor

Re: How do I parse XML in a Django view?

2006-08-18 Thread Nathan R. Yergler
Are you sure your url configuration is correct? Sounds like your problem isn't in the catalog function at all. Mike wrote: > Please bear with me as I continue to learn and struggle. We installed > ElementTree and started tinkering around with it, but we are still > having problems when we try to

Re: How do I parse XML in a Django view?

2006-08-18 Thread Mike
Please bear with me as I continue to learn and struggle. We installed ElementTree and started tinkering around with it, but we are still having problems when we try to have the view pass anything to the templates. The code has been stripped down to: from sputnik.utils.elementtree.elementtree impo

Re: search in django

2006-08-18 Thread Andy Dustman
On 8/18/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > > On 8/18/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > > Why not use the same suffix syntax (or subset thereof) for other > > django queries ie. __istartswith, __iexact, etc, instead of creating a > > new one? > > This is a valid point.

Re: django admin - page's auto-refresh after item addition

2006-08-18 Thread bk
It's when you add to a related object from within an add/edit page. The popup window loads normally, but upon save, it returns a blank page and doesn't automatically refresh/update the parent window. --~--~-~--~~~---~--~~ You received this message because you are

Re: django admin - page's auto-refresh after item addition

2006-08-18 Thread Adrian Holovaty
On 8/18/06, david83 <[EMAIL PROTECTED]> wrote: > After my last django update, page's auto-refresh after having an item > doesn't work any more. > > Something changed in django which could caused this problem ? Hey david83, I can't think of anything that may have caused this problem. Could you be

Re: notification when an object is deleted

2006-08-18 Thread medhat
Ian Clelland wrote: > I would have thought that this would have been automatic -- normally > Django does a good job of telling me, when I delete an object, about > any other objects related to it which will also be deleted. Ok, I am sorry, but I am still confused! :( First, I am using sqlite...

django admin - page's auto-refresh after item addition

2006-08-18 Thread david83
After my last django update, page's auto-refresh after having an item doesn't work any more. Something changed in django which could caused this problem ? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django use

Re: How do I parse XML in a Django view?

2006-08-18 Thread Adrian Holovaty
On 8/18/06, Mike <[EMAIL PROTECTED]> wrote: > We read through and experimented with a variety of tutorials > (since we're all still very new to python) and found several approaches > that seem to work when written in the shell. Adding them to django > however has proved to be very difficult. Regar

Re: How do I parse XML in a Django view?

2006-08-18 Thread Nathan R. Yergler
I haven't tried this in particular, but I can tell you that the ElementTree API for doing XML processing in Python is going to be considerably simpler for something like this. ElementTree is available at http://effbot.org/zone/element-index.htm, and will be in the standard library starting with 2

Re: How do I parse XML in a Django view?

2006-08-18 Thread Joseph Kocherhans
On 8/18/06, Mike <[EMAIL PROTECTED]> wrote: > > We have been creating a content management system in Django which > (despite a few learning bumps) has gone swimmingly. Now, we have > reached an impasse. We have some applications running elsewhere on the > site whose xml data we need to access and

Re: smtplib with TLS in django

2006-08-18 Thread Adrian Holovaty
On 8/16/06, ihomestore <[EMAIL PROTECTED]> wrote: > Does django support sending email via TLS? I am trying to use gmail > smtp server to send out emails but it needs TLS. Is there a way to do > this in django? > > Instead of using django's send_mail, I am using tlslite to send out > emails via gma

Re: search in django

2006-08-18 Thread Adrian Holovaty
On 8/18/06, Matthew Flanagan <[EMAIL PROTECTED]> wrote: > Why not use the same suffix syntax (or subset thereof) for other > django queries ie. __istartswith, __iexact, etc, instead of creating a > new one? This is a valid point. One small argument in favor of the current syntax is that search_fi

How do I parse XML in a Django view?

2006-08-18 Thread Mike
We have been creating a content management system in Django which (despite a few learning bumps) has gone swimmingly. Now, we have reached an impasse. We have some applications running elsewhere on the site whose xml data we need to access and display from a django view function. We read through a

Re: Using choices with list_display

2006-08-18 Thread Tim Shaffer
Thanks... that fixed it. I don't know how I missed that. It's always the simple things. --~--~-~--~~~---~--~~ 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@google

Re: notification when an object is deleted

2006-08-18 Thread [EMAIL PROTECTED]
James Bennett wrote: > It should happen automatically; Django emulates SQL's "ON DELETE > CASCADE" behavior when deleting an object to which other objects were > related. Can u override this default Django behaviour? Thanks, Lorenzo --~--~-~--~~~---~--~~ You r

Re: Using choices with list_display

2006-08-18 Thread Adrian Holovaty
On 8/18/06, Tim Shaffer <[EMAIL PROTECTED]> wrote: > RECURRENCE_CHOICES = ( > ('1', 'Daily'), > ('2', 'Weekly'), > ('3', 'Monthly'), > ('4', 'Yearly'), > ) > > class Event(models.Model): > title = models.CharField(maxlength=50) > recurrence = models.SmallIntegerField(blank=

Using choices with list_display

2006-08-18 Thread Tim Shaffer
I have a model that holds events... simplified, it looks like this: RECURRENCE_CHOICES = ( ('1', 'Daily'), ('2', 'Weekly'), ('3', 'Monthly'), ('4', 'Yearly'), ) class Event(models.Model): title = models.CharField(maxlength=50) recurrence = models.SmallIntegerField(blank=T

Re: User registration.

2006-08-18 Thread garaged
On 8/18/06, themak <[EMAIL PROTECTED]> wrote: > > What is the best way to go about creating a user registration view in > django, should I use create my own custom manipulator and create_user, > or should I use an add manipulator, or is there already a user > manipulator? It should be plain simpl

User registration.

2006-08-18 Thread themak
What is the best way to go about creating a user registration view in django, should I use create my own custom manipulator and create_user, or should I use an add manipulator, or is there already a user manipulator? --~--~-~--~~~---~--~~ You received this message

Encoding problem in Django admin logging (BUG?)

2006-08-18 Thread libraM
Hello. I think there is a problem in django.contrib.admin.models code: string slice ("object_repr[:200]") doesn't respect multibyte encodings (UTF8). class LogEntryManager(models.Manager): def log_action(self, user_id, content_type_id, object_id, object_repr, action_flag, change_message='')

Re: geographic targeting with django

2006-08-18 Thread Jan Claeys
Op wo, 16-08-2006 te 10:17 +1000, schreef Ian Holsman: > does anyone know of a python module/interface to allow me to determine > what state a given IP# is in? Don't depend on those GeoIP (etc.) databases mentioned to be always correct... -- Jan Claeys --~--~-~--~~~--

Re: check for yourself (((;

2006-08-18 Thread simonbun
Exactly... and on that note: http://www.whitehouse.gov/robots.txt --~--~-~--~~~---~--~~ 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 unsubscri

Re: Process forking issues

2006-08-18 Thread tomass
Thanks, that's very helpful, and sounds very likely to be the problem. I'll give it a try and see what I can come up with... May take a little while but I'll post back once I have a resolution one way or the others. Cheers, Tom --~--~-~--~~~---~--~~ You received

Re: Easy template vars question

2006-08-18 Thread Sean Schertell
Thanks Malcom. That's sorta what I expected to hear. I'm still trying to work out the best way to do what I want to do (mostly static websites with django's awesome templates and the occasional reusable django app plugged in). Maybe writing views for each page and setting those types of v

Re: search in django

2006-08-18 Thread a
u guys rock!!! --~--~-~--~~~---~--~~ 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 [EMAIL PROTECTED]

Re: Easy template vars question

2006-08-18 Thread Malcolm Tredinnick
On Fri, 2006-08-18 at 12:14 +0900, Sean Schertell wrote: > Hi folks, > > Okay, so I got my little staticpages app working (thanks adrian), and > now I can happily throw sometemplate.html in my templates/ directory > and I can view the page at mysite/sometemplate. Great! And it extends > my

Re: check for yourself (((;

2006-08-18 Thread Max Penet
Some php projects had to cope with that. I can remember phpbb : http://isc.sans.org/diary.php?date=2004-12-21 But many other projects suffered from this . > is there enough advantage to be had by > parsing the HTML response of a google search, that malware writers > would bother to write that,

Re: check for yourself (((;

2006-08-18 Thread Jay Klehr
Seems to me that robots.txt is the first place I'd look if I was looking to cause some trouble. :) Jay Ian Clelland wrote: > I always > assumed that all they would do is connect over port 80, and try to > retrieve something like /admin/, or another platform-specific resource > over http, and th