Re: encode special character in rendering template into XML

2006-11-17 Thread Fredrik Lundh
can.xiang wrote: > Thanks for your suggestion. I was thinking about generate XML in views > directly. > > But the XML file I want is just simple one like HTML(they are also > small) and it's all about presentation, thus it doesn't make sense to > put them into views. > > Any other way to do it?

Re: encode special character in rendering template into XML

2006-11-17 Thread Russell Keith-Magee
On 11/18/06, can xiang <[EMAIL PROTECTED]> wrote: > > I'm trying to render template into XML output. If the str representation > of the variable contains special character of XML, it would cause > trouble. The same thing would happen if trying to render into CSV or > other format. The current sol

Re: encode special character in rendering template into XML

2006-11-17 Thread can.xiang
Thanks for your suggestion. I was thinking about generate XML in views directly. But the XML file I want is just simple one like HTML(they are also small) and it's all about presentation, thus it doesn't make sense to put them into views. Any other way to do it? --~--~-~--~~---

Re: encode special character in rendering template into XML

2006-11-17 Thread James Bennett
On 11/17/06, can xiang <[EMAIL PROTECTED]> wrote: > Is this solution reasonable or I missed something? In the case of XML, the general best practice -- and not just in Django -- is not to use templates, but rather tho use tools designed for the creation and manipulation of XML and which understan

encode special character in rendering template into XML

2006-11-17 Thread can xiang
I'm trying to render template into XML output. If the str representation of the variable contains special character of XML, it would cause trouble. The same thing would happen if trying to render into CSV or other format. It would be nice if the render function of Template can take additional par

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread Waylan Limberg
On 11/17/06, walterbyrd <[EMAIL PROTECTED]> wrote: > > > gabor wrote: > > > > yes, django does work with apache 1.3 and fastcgi. > > > Thanks. Do you know if django will work with regular CGI? See this: http://code.djangoproject.com/wiki/ServerArrangements#CGI -- Waylan Limberg [EMAIL PROT

Wrapping dispatcher/signal functionality

2006-11-17 Thread Ed
Hi django users, I'd like to write a decorator for connecting functions like such: def connect(sender, signal): def _connect(fn): dispatcher.connect(fn, signal=signal, sender=sender) return _connect ... @connect(Account, signals.post_save) def reset_account_balance(sender, instance, sig

Re: Acces to model object inside model

2006-11-17 Thread Waylan Limberg
On 11/17/06, Kamil Wdowicz <[EMAIL PROTECTED]> wrote: > > It is possible to access, and do a query inside models.py ? > > Something like this: > > class Tag(models.Model): > #props... > > def _get_count(self): > return Tag.objects.all().count() > > counter = property(_get_count

Re: A RESTful Django?

2006-11-17 Thread James Bennett
On 11/17/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > Imagine built-in REST URLs the encompass the same functionality that > the admin has: It's actually been talked about a lot; the problem is no-one's ever actually sat down and written the code for it. Want to be the first? ;) -- "May the for

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread Kenneth Gonsalves
On 18-Nov-06, at 7:14 AM, walterbyrd wrote: > Thanks. Do you know if django will work with regular CGI? there was a thread maybe six months back where someone got django to run on CGI - check the archives, I know it was a Russian group -- regards kg http://lawgon.livejournal.com http://nrc

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread walterbyrd
gabor wrote: > > yes, django does work with apache 1.3 and fastcgi. Thanks. Do you know if django will work with regular CGI? I have dot5hosting, I thought I had FastCGI, but I may only have standard CGI. Also, do you know what version of Python I would have to use with django? --~--~--

Re: Cursor Delete Not Committing

2006-11-17 Thread Russell Keith-Magee
On 11/16/06, Steve Wedig <[EMAIL PROTECTED]> wrote: > > Ok, just solved it actually... > I looked in the db wrapping and tried calling connection._commit(). > Since its a private attribute, I assume I'm doing something wrong > though. Is that the case? Looks like you might be getting caught up on

Re: Inside look at Ellington?

2006-11-17 Thread [EMAIL PROTECTED]
Thanks for your replies! I contacted the guys over at ellingtoncms.com a while ago, just hoping to get a bit firmer hold of my interpretation of the whole system, but they still haven't replied. But; I got a couple of good answers from you guys, so I guess I'll just wait and see if they'll relea

Re: svg template

2006-11-17 Thread gabor
Russell Keith-Magee wrote: > On 11/18/06, Facundo Casco <[EMAIL PROTECTED]> wrote: >> Hi, I'd like to generate svg image files from Django. I think, since svg >> is xml, it should be possible to write a template that generates them. >> Has anyone have any experience doing this? Any advice would be

Re: Template for a calendar?

2006-11-17 Thread [EMAIL PROTECTED]
Wow, that actually helps alot! Thanks! One question though: Could you explain what GUINDILLA_CALENDAR_BASE refers to? Again - thanks, Henrik Lied --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" gro

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread gabor
walterbyrd wrote: > I know that django requires Apache 2.X when using mod_python. But, what > about if using FastCGI? > yes, django does work with apache 1.3 and fastcgi. gabor --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Go

Re: svg template

2006-11-17 Thread Russell Keith-Magee
On 11/18/06, Facundo Casco <[EMAIL PROTECTED]> wrote: > Hi, I'd like to generate svg image files from Django. I think, since svg > is xml, it should be possible to write a template that generates them. > Has anyone have any experience doing this? Any advice would be welcome. > Thanks. No experien

Re: Template for a calendar?

2006-11-17 Thread Guillermo Fernandez Castellanos
I've just implemented this for a web page: http://svn.guindilla.eu:8000/guindilla/trunk/guindilla/events/ It's probably not the most optimized solution, but it works for me. I use a context processor to pass all the information I need to create the calendar to all my views. I keep my events in t

Re: Inside look at Ellington?

2006-11-17 Thread Serg Kovrov
On Nov 17, 9:16 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > Screenshots probably wouldn't be all that exciting, though, because > they'd just look like the Django admin interface -- that's what they > are, really (we eat our own dogfood). Perhaps some screencasts or flash demos of Ellington

Re: Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread [EMAIL PROTECTED]
I think Dreamhost uses Apache 1.3, and I've had no problems there. Some people report speed issues with FastCGI, but I can't say I've found them significant. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Will django work with Apache 1.3 and FastCGI?

2006-11-17 Thread walterbyrd
I know that django requires Apache 2.X when using mod_python. But, what about if using FastCGI? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-user

Re: drilling down with generic views

2006-11-17 Thread [EMAIL PROTECTED]
Hello again, I just figured out that this is very easy to implement in Python 2.5, thanks to that version's revamped calendar module. I keep thinking that I must be missing some boneheadedly simple way to do it with the Django generic views, though. Best, Hank Sims On

Template for a calendar?

2006-11-17 Thread [EMAIL PROTECTED]
Hi there, I'm working on a project for a client, and he requests a calendar in the right column, where the dates where stuff is happening comes up as a link in the calendar. Is there an easy way to do this in Django, like a template tag? Or do I have to go way beyond that? Thanks in advance!

A RESTful Django?

2006-11-17 Thread Rob Hudson
Crazy thought of the day as I read certain REST posts[1]: Imagine built-in REST URLs the encompass the same functionality that the admin has: * get list of models * get list of all objects in model X * get/update/delete/add object * etc. >From there, the admin and getting at the content

Re: Django and CRM or ERP

2006-11-17 Thread Baurzhan Ismagulov
Hello Picio, On Fri, Nov 17, 2006 at 01:05:24PM +0100, Picio wrote: > Just courious if Is there anyone that have built or will build a CRM > or an ERP using Django? Not quite what you ask, but there should be some apps at http://www.gnuenterprise.org/ , they should have, among others, a web fron

Re: Mutile forms, id conflicts.

2006-11-17 Thread SmileyChris
> {% for choice in shipping_choices %} > {{ choice[0] }} > {% enfor %} You want {{ choice.0 }} and {{ choice.1 }} --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send e

Re: Want to see your favorite branch merged? Here's how you can help!

2006-11-17 Thread [EMAIL PROTECTED]
I didn't see anything on the page about the Class Inheritance feature. Is there a branch for that? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-u

Re: ./manage.py dbdump > mydata.sql

2006-11-17 Thread Rob Hudson
Russell Keith-Magee wrote: > I've got a prototype of just such a thing as part of the test fixtures > framework I am working on. It will dump the current contents of the database > in a db-independent format (using the serialization framework). You can then > use this dump as a fixture for later t

Re: Status of Oracle support in Django (trunk?)

2006-11-17 Thread ogghead
Oracle support is working pretty well now. You can do everything in the tutorial and run most common django apps. Doing "python manage.py inspectdb" needs some work, as the column types in the Django model it returns aren't all correct. But Oracle passes 62 out of the 65 tests in the test suite

Mutile forms, id conflicts.

2006-11-17 Thread Manu J
Hi, Couple of questions 1. I'm passing on multiple forms as a list to the template and then iterating over that in the template. So I have something like this {% for form in forms %} {{form.shipping}} {% endfor %} The problem is that form.shipping outputs HTML all of which has the same id. How

weird import problem

2006-11-17 Thread [EMAIL PROTECTED]
I'm attempting to install the nesh.thumbnails app for images with thumbnails. In my model, I put from nesh.thumbnail import ImageWithThumbnailField but that fails unless I drill down a layer deeper and put from nesh.thumbnail.field import ImageWithThumbnailField which then fails when it tries t

Question about :: root/django/trunk/django/middleware/admin.py

2006-11-17 Thread Roboto
I was looking at the code to try to figure out why I constantly get raise SuspiciousOperation, "User may have tampered with session cookie." error when I try to login to my admin. All I've been trying to do is get a test project up on production and the only thing I can't get working is the admin

svg template

2006-11-17 Thread Facundo Casco
Hi, I'd like to generate svg image files from Django. I think, since svg is xml, it should be possible to write a template that generates them. Has anyone have any experience doing this? Any advice would be welcome. Thanks. Facundo --~--~-~--~~~---~--~~ You rece

Re: Status of Oracle support in Django (trunk?)

2006-11-17 Thread James Bennett
On 11/17/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > What is the exact status of Oracle support with Django? > Is it fully supported? With caveats? In trunk branch? You might want to read this thread from a couple days ago, which covers the same issues: http://groups.google.com/group/djan

Re: Status of Oracle support in Django (trunk?)

2006-11-17 Thread Ivan Sagalaev
[EMAIL PROTECTED] wrote: > What is the exact status of Oracle support with Django? > Is it fully supported? With caveats? In trunk branch? Today was a call for test of this backend in django-developers list. So I'd say it's roughly equivalent to "beta". > In other words, can I finally tell my b

Status of Oracle support in Django (trunk?)

2006-11-17 Thread django-user
Hi, Reading the Django Book online, I noticed that Oracle support made its way in chapter 5. It is the first time I see Oracle mentionned in official Django material. The only references I found before are from the 'Boulder Oracle sprint', tickets 87 & 1990 and their numerous patches. What is th

Re: video in django

2006-11-17 Thread Martin
Thanks, James, for the advice. i'll try to do it this way and i hope it works;) i actually wanted to play a video on the site (not to download it), but i think that requires only a little modification of the code. thanks for the help, again. bye,martin --~--~-~--~~~

Re: Threading inside django process

2006-11-17 Thread akhen
Graham, You are right, this is usefull when you want to work on some objects that are inside the sgbd, but does not apply for in-memory object, like a cache for example. I really need to have my code running inside the django process, to see lives objects. Thanks. AkH. --~--~-~--~

Re: Something like Application in ASP for django?

2006-11-17 Thread Alex Li
Could you explain more on "the module disappeared when the request finalizes"? Did you attach the global variable to your request object? You don't need to do that, just do: import myapp print myapp.global_variable ... something like that. Hmm, I wonder the way you run your django server may

Re: ./manage.py dbdump > mydata.sql

2006-11-17 Thread Paul Smith
On Nov 16, 2006, at 8:30 PM, Russell Keith-Magee wrote: > > On 11/17/06, Rob Hudson <[EMAIL PROTECTED]> wrote: > > Would something like this be a useful thing to add to manage.py? > > I've got a prototype of just such a thing as part of the test > fixtures framework I am working on. It will dump

Re: have mltiple different models ForeignKey the same model and still conveniently get all the data from all other models?

2006-11-17 Thread Karsten W. Rohrbach
On Nov 16, 4:42 pm, Ivan Sagalaev <[EMAIL PROTECTED]> wrote: publishing systems there is a very > general thing that is called 'object-relational impedance mismatch'[1]. [...] > Django, by design, doesn't try to hide a database structure from a user. > So designing a Django models around pure obj

Re: Threading inside django process

2006-11-17 Thread graham_king
akhen, I tend to use a cron job. That runs a small shell script which sets PYTHONPATH and DJANGO_SETTINGS_MODULE and runs the Python script. In there you import your models and do whetever you need to do really. Regards, Graham. --~--~-~--~~~---~--~~ You rec

some strange paginator behavior

2006-11-17 Thread soundseeker
hello, the following code produces a table with 15 rows as expected. the same code with "hits=paginator.hits" without comment sign results in: Exception Type: TypeError Exception Value:count() takes exactly one argument (0 given) paginate_by = 15 paginator = Object

Re: Online "beta" Book

2006-11-17 Thread Adrian Holovaty
On 11/17/06, Cam <[EMAIL PROTECTED]> wrote: > Any vague timeline until it merges with trunk? > > One of our oracle-centric dev teams is wavering on Django (and heading > towards RoR) but could be persuaded to develop against the branch if a > merge was likely this year. I'd say a merge of the Ora

Re: Want to see your favorite branch merged? Here's how you can help!

2006-11-17 Thread David Johansson
MultipleDatabaseSupport! I havn't tried it yet, but it's precisely what I need. I'll be glad to test it out. /david --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send

Re: apache2 mod-fcgid with django?

2006-11-17 Thread David Johansson
I'm not really sure what you're asking for, but I've used mod-fscgi with apache2 without any problems. Using the FastCgiExternalServer directive. It seems to work well. /david 2006/11/17, [EMAIL PROTECTED] <[EMAIL PROTECTED]>: > > According to the django document, > you have to setup a FastCgiEx

Re: Online "beta" Book

2006-11-17 Thread Robert Hicks
Exactly my position. I was even looking at TurboGears because they use SQLAlchemy but then I see that it isn't totally integrated yet either. Robert --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" g

Re: Online "beta" Book

2006-11-17 Thread Cam
Any vague timeline until it merges with trunk? One of our oracle-centric dev teams is wavering on Django (and heading towards RoR) but could be persuaded to develop against the branch if a merge was likely this year. cheers, Cam --~--~-~--~~~---~--~~ You receiv

Re: Pagination with Custom Views

2006-11-17 Thread soundseeker
holy ... , how stupid. but it led not to the solution, which is: TMergeDoc().by_categories() I had to instantiate the object, of course. Now there are some paginator problems I have to analyze. thank you very much so far! robert --~--~-~--~~~---~--~~ You rece

Re: Django and CRM or ERP

2006-11-17 Thread Javier Rivera
El Viernes, 17 de Noviembre de 2006 13:05, Picio escribió: > Just courious if Is there anyone that have built or will build a CRM > or an ERP using Django? No. But I'm working on a django program to extract data from a ERP. It generates openoffice spreadsheets from sales and stock data. If I we

Re: Django and CRM or ERP

2006-11-17 Thread Kamil Wdowicz
I'm building kind of CRM.. Project manager, client base and Invoice system. 2006/11/17, Picio <[EMAIL PROTECTED]>: > > Just courious if Is there anyone that have built or will build a CRM > or an ERP using Django? > Thanks > Picio > > > > --~--~-~--~~~---~--~~ Yo

Django and CRM or ERP

2006-11-17 Thread Picio
Just courious if Is there anyone that have built or will build a CRM or an ERP using Django? Thanks Picio --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to dj

Re: Generating slug for words with accents

2006-11-17 Thread orestis
Can you discuss this on the relevant ticket: http://code.djangoproject.com/ticket/2282 Thanks, Orestis Aidas Bendoraitis wrote: > Similarly Lithuanian would be: > ą = a > č = c > ę = e > ė = e > į = i > š = s > ų = u > ū = u > ž = z > > I am just thinking whether slugify function should corres

Re: 'User' object has no attribute 'get_permission_list'

2006-11-17 Thread Marcin Jurczuk
Problem solved ...remove django from site-packages and install again + remove *pyc in the app code tree :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

'User' object has no attribute 'get_permission_list'

2006-11-17 Thread Marcin Jurczuk
Trying to use perms module in templates but get following error: AttributeError at / 'User' object has no attribute 'get_permission_list' [cut] Exception Value:'User' object has no attribute 'get_permission_list' [cut] -- In template dump red line is : 14 {{

Re: Want to see your favorite branch merged? Here's how you can help!

2006-11-17 Thread Aidas Bendoraitis
1. row level permissions 2. model inheritance. 3. schema evolution Regards, Aidas Bendoraitis On 11/17/06, Ramon Salvadó <[EMAIL PROTECTED]> wrote: > > 1. Schema Evolution > 2. TextIndexingAbstractionLayer > > En/na Manu J ha escrit: > > 1. Row level permissions > > 2. Schema Evolution > > > >

Re: Tutorial

2006-11-17 Thread Picio
Gotcha! For Linux you can try this: http://www.carthage.edu/webdev/?p=14 It's on Pyhton 2.4 and, again look to free comments. Picio 2006/11/17, Picio <[EMAIL PROTECTED]>: > This is on Windows but the install procedure on Linux is similar. > http://thinkhole.org/wp/2006/04/03/django-on-windows-how

Re: Tutorial

2006-11-17 Thread Picio
This is on Windows but the install procedure on Linux is similar. http://thinkhole.org/wp/2006/04/03/django-on-windows-howto/ This is the official how to http://www.djangoproject.com/documentation/install/ Read all comments ! Picio 2006/11/17, BeagleBen <[EMAIL PROTECTED]>: > > Hello > > Has a

Re: Generating slug for words with accents

2006-11-17 Thread Aidas Bendoraitis
Similarly Lithuanian would be: ą = a č = c ę = e ė = e į = i š = s ų = u ū = u ž = z I am just thinking whether slugify function should correspond to the chosen language or not. It seems that there are not many differences among stripped accented letters in different languages, so maybe it should