Re: generic ModifiedPreorderTreeTraversal app

2006-07-26 Thread Cheng Zhang
Great. If you get time, I suggest you update the wiki page accordingly. - Cheng Zhang On Jul 27, 2006, at 12:05 PM, nkeric wrote: > hi all, > > Base upon Julio's mptt-0.9 which handles nested contents: > > http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal > > I made this more

generic ModifiedPreorderTreeTraversal app

2006-07-26 Thread nkeric
hi all, Base upon Julio's mptt-0.9 which handles nested contents: http://code.djangoproject.com/wiki/ModifiedPreorderTreeTraversal I made this more "generic" version mptt-0.95, from the README: [snip] orignal mptt readme [/snip] Follow up by me === First of all, ***BIG

Re: Media and Admin Media URL Issues

2006-07-26 Thread SmileyChris
http://www.djangoproject.com/documentation/static_files/ says: Using this method is inefficient and insecure. Do not use this in a production setting. Use this only for development. I'd guess that you just needed to symlink the media and admin media directories to your site root.

Re: [Changeset] r3455 - django/trunk/docs

2006-07-26 Thread Cheng Zhang
Adrian Would you mind to point out which OSCON presentation it is? Just curious. Thanks. - Cheng Zhang On Jul 27, 2006, at 8:46 AM, [EMAIL PROTECTED] wrote: > > Author: adrian > Date: 2006-07-26 19:46:32 -0500 (Wed, 26 Jul 2006) > New Revision: 3455 > > Modified: >

Re: hiding fields in admin

2006-07-26 Thread Tamara D. Snyder
It just makes the field not editable. Actually, it looks like you can edit the field - type in new stuff, etc. - but when you hit save, that field is not saved. This is fine with me, because what I *really* wanted was to keep knuckleheads from changing the slug field. I'd also like to

Re: hiding fields in admin

2006-07-26 Thread Sean
Tamara D. Snyder wrote: > Thank you, this works pretty well. > > Actually, "editable=false" does not hide the field from the admin > But what else does it do? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

hide drop-down items with generic views?

2006-07-26 Thread hotani
I'm using a generic view for a form and have a few drop-downs on the page. However, I don't want to display every item in the drop-down. I thought I would put in an "active" switch on them, but can't figure out how to only show the active items on the template. would this be A: a filter set up

Re: Is MS SQL Server support coming anytime soon?

2006-07-26 Thread Willie
I've been floating around looking for SQL Server support too. I'm starting on Django for our website. I can use MySQL/Postgres for the web side of things (and prefer too), but when it comes to linking to our backend customer data I have to use SQL Server - I suspect a lot of people will be in the

Re: hiding fields in admin

2006-07-26 Thread Tamara D. Snyder
Thank you, this works pretty well. Actually, "editable=false" does not hide the field from the admin, but it will keep the field from being edited, and I can use the javascript trick to make it hidden, so all is well for me. Thanks a lot, guys! On Jul 26, 2006, at 4:02 PM, Sean wrote: > >

Re: Search Engine for Python and Django

2006-07-26 Thread Tom Dyson
Antonio Cavedoni wrote: > > I'm about to release a pure-Python full-text indexer and search > > engine called Dolphy. > Well, I would cast a decided +1 for the Unicode/UTF-8 support. Care > to elaborate on why it's going to be so hard to have it in the 1.0 > release? Maybe it's not so hard...

Re: hiding fields in admin

2006-07-26 Thread Aidas Bendoraitis
One more way would be to have a javascript function which changes to for the slug field. Something like this: window.onload = function() { document.getElementById("id_slug").type="hidden"; } Good luck! Aidas Bendoraitis [aka Archatas] On 7/27/06, Sean <[EMAIL PROTECTED]> wrote: > >

Re: hiding fields in admin

2006-07-26 Thread Sean
Maybe you would want the "editable=False" parameter in your model, which hides the field from the admin. Then simply populate the field in the save method. Tamara D. Snyder wrote: > Hi all, > > In my "Event" model I have a slug field that is automatically > generated from another field. I

Re: Any good Python book recommendations?

2006-07-26 Thread Steve Wedig
I learned python by reading o'reilly's learning python over a weekend, and thought it was good introduction. Haven't seen the other intro books. You must have o'reilly's cookbook. It teaches you how to use the language like a ninja. I use o'reilly's nutshell book for quick references, however

Re: Search Engine for Python and Django

2006-07-26 Thread Antonio Cavedoni
Hi Tom, On 26 Jul 2006, at 1:22, Tom Dyson wrote: > I'm about to release a pure-Python full-text indexer and search > engine called Dolphy. I think your message got kind of lost in the thread, but wow, I’m *so* looking forward to see Dolphy! > If you're interested in this project, please

Re: hiding fields in admin

2006-07-26 Thread Julio Nobrega
You can override the save() method and generate the slug yourself. There's also a templatetag that 'slugfies' a string. I think you can either use it to output the var or import the function on your save(). On 7/26/06, Tamara D. Snyder <[EMAIL PROTECTED]> wrote: > > Hi all, > > In my "Event"

Re: Not failing silently on undefined variables in the template system?

2006-07-26 Thread James Bennett
On 7/26/06, Guillaume Pratte <[EMAIL PROTECTED]> wrote: > To verify the variables before passing control to the template system is not a > viable solution, and would break the DRY principle (Don't Repeate Yourself). > I would have to know what variables are defined in my templates in my code >

hiding fields in admin

2006-07-26 Thread Tamara D. Snyder
Hi all, In my "Event" model I have a slug field that is automatically generated from another field. I would like to hide the slug field from admin users, but still allow it to be automatically generated. I know I can hide it by using the "fields" parameter in the admin class of my

Re: Not failing silently on undefined variables in the template system?

2006-07-26 Thread Guillaume Pratte
To verify the variables before passing control to the template system is not a viable solution, and would break the DRY principle (Don't Repeate Yourself). I would have to know what variables are defined in my templates in my code calling the template, thus duplicating the information and

Re: Not failing silently on undefined variables in the template system?

2006-07-26 Thread Bill de hÓra
Guillaume Pratte wrote: > In http://www.djangoproject.com/documentation/templates_python/ you can read : > >In Django 0.91, if a variable doesn't exist, the template system fails >silently. The variable is replaced with an empty string. > > This is controlled with the

Not failing silently on undefined variables in the template system?

2006-07-26 Thread Guillaume Pratte
In http://www.djangoproject.com/documentation/templates_python/ you can read : In Django 0.91, if a variable doesn't exist, the template system fails silently. The variable is replaced with an empty string. This is controlled with the silent_variable_failure variable set to True in the

Re: Where can be a problem??

2006-07-26 Thread [EMAIL PROTECTED]
What you're doing is changing the access to be only related to u2, if you had: g.set_access([u2.id, u.id]) it would work fine. Take a look at http://www.djangoproject.com/documentation/models/many_to_many/ for info on using the M2M relationship. Particularly the lines: # Create another Article,

Batch record processing

2006-07-26 Thread Phil Powell
Hi all, I've got a Django app with a whole stack of data which I want to be able to update on a semi-regular basis. It's currently in Excel format, which is then easily converted to CSV and imported into a pre-defined MySQL table, with a relevant Django model defined around it. It all works

Error with InspectDB

2006-07-26 Thread guinsu
I'm trying to work with a legacy DB, but since my legacy DB is MS sql and I am just getting started, I thought I'd run it on the DB from the tutorial that is in postgre just to make sure I was doing everything right. With the following command line: django-admin.py inspectdb

INSTALLED_APPS partially shown in admin with mod_python

2006-07-26 Thread Kilian CAVALOTTI
Hi djangonauts, I recently tried to use my django project with apache2+mod_python, after a developement period using the integrated server. After some struggle, I finally have a (quite) working installation. But the admin module shows a really weird quirk. I have two custom applications,

Re: Search Engine for Python and Django

2006-07-26 Thread Vizcayno
Hello Kevin: The environment used is Windows? If yes, how did you compiled to use with python? Thanks!!! --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to

Re: Trying to get app working with Apache with mod_python

2006-07-26 Thread Seth Buntin
I figured it out. I should have had: (r'admin/', include('django.contrib.admin.urls')), not: (r'^admin/', include('django.contrib.admin.urls')), --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Where can be a problem??

2006-07-26 Thread PythonistL
I have the following models class User(meta.Model): Login=meta.CharField(maxlength=50,unique=True) Email=meta.EmailField(_('e-mail address'),blank=True) class Gallery(meta.Model): Title = meta.CharField(_("title"), maxlength=80) created = meta.ForeignKey(User)

Trying to get app working with Apache with mod_python

2006-07-26 Thread Seth Buntin
Here is the error and apache conf. I don't know what the problem is, it is the first time I have tried to setup an app through Apache and not running the development server. Do I need to modify my urls.py? Error: Using the URLconf defined in ncate.urls, Django tried these URL patterns, in

Re: Media and Admin Media URL Issues

2006-07-26 Thread Tyson Tate
Adding that to urls.py and removing the media/ rewrite rule from my .htaccess file seemed to do the trick. Thanks! -Tyson On Jul 26, 2006, at 1:22 AM, Aidas Bendoraitis wrote: > Do you have something like: > (r'^media/(?P.*)$', 'django.views.static.serve', > {'document_root': >

Re: have urlpatterns in urls.py changed?

2006-07-26 Thread Don Arbow
On Jul 25, 2006, at 3:06 PM, cyberco wrote: > > Anybody? What should go in urls.py if my project is called 'proj', my > app 'app' and there is a method 'index' in views.py? I would say the > following, but that doesn't work: > > (r'^proj/', include('proj.app.views.index)), That's because you're

Re: have urlpatterns in urls.py changed?

2006-07-26 Thread cyberco
Found my error: the 'include' should be removed: (r'^proj/', 'proj.app.views.index), More about this can be read here: http://www.djangoproject.com/documentation/tutorial3/#decoupling-the-urlconfs --~--~-~--~~~---~--~~ You received this message because you are

Re: have urlpatterns in urls.py changed?

2006-07-26 Thread cyberco
Found my error: the 'include' should be removed: (r'^proj/', 'proj.app.views.index), More about this can be read here: http://www.djangoproject.com/documentation/tutorial3/#decoupling-the-urlconfs --~--~-~--~~~---~--~~ You received this message because you are

Re: Rich text editor with code snippets

2006-07-26 Thread [EMAIL PROTECTED]
Maybe one of these might help: http://lazutkin.com/blog/2005/aug/26/using_tinymce_djangos_admin/ http://code.djangoproject.com/wiki/AddWYSIWYGEditor http://www.socialistsoftware.com/post/django-and-tinymce/ Chris --~--~-~--~~~---~--~~ You received this message

Re: How many times my method returning dict is called in template?

2006-07-26 Thread Jeremy Dunck
On 7/26/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > {% for slave in master.slave_set %} > {{ slave.init_dict }} > {{ slave.dict_keyA }} > {{ slave.dict_keyB }} > {{ slave.dict_keyC }} > {% endfor %} Mmm, if you know which master you'll be dealing with, you could still have

Re: Search Engine for Python and Django

2006-07-26 Thread kwe
Hi Kevin (great name!), Are you able to share more about how you create the index in the first place? I'm assuming you used swish-e's -S prog option and perhaps a custom python script? I'm quite new to python and django, so any hints gratefully received..

Re: a miniblog example in django

2006-07-26 Thread [EMAIL PROTECTED]
ups, forgoten about: rename the folder "miniblogen" to "miniblog" 1. syncdb to create all the tables (sqlite will do) 2. runserver. It should work correctly. It's based on Django 0.95 / from SVN. --~--~-~--~~~---~--~~ You received this message because you are

Re: SuspiciousOperation: User tampered with session cookie

2006-07-26 Thread tone77
Patrick J. Anderson wrote: > On Tue, 27 Jun 2006 23:30:56 -0500, Patrick .J. Anderson wrote: > > > Malcolm Tredinnick wrote: > >> [quoted text muted] > > > > Hi, Malcolm > > > > Yes, I noticed that too. Perhaps it would be good if I tested this > > behaviour on another distro, but I don't want to

Re: unable to runser ?

2006-07-26 Thread Javier Rivera
Rajeshwar Singh Jenwar escribió: > I m using mysql-standard-5.0.22-linux-i686 and > MySQL-python-1.2.1_p2 on RH Fedora core 4. Are you mixing RH packages with official Mysql ones? I mean, is libmysql from mysql.com and MSQL-Python from a official RH package?. Maybe there is some kind of

How to save file with name based on PK of DB entry

2006-07-26 Thread rtmie
Hi, I would like to be able to do the following: Upload a file to my app along with some meta data. Store the filepath in the table using a FileField. However I would like to override the uploaded filename to be used in the file store to some unique system generated, preferrably numeric, name. I

Re: unable to runser ?

2006-07-26 Thread Rajeshwar Singh Jenwar
yup On 7/26/06, Javier Rivera <[EMAIL PROTECTED]> wrote: Rajeshwar Singh Jenwar escribió:> Hi All,>> I m new to django.> I m getiing problem with Tutorial-1. It's probably a blind shot, but...Have you got the MyAQLdb python module installed?Javier.

Re: a miniblog example in django

2006-07-26 Thread Rajeshwar Singh Jenwar
Hi Rik,   How to use it ? 1. unzip miniblogen.zip 2. cd minibloggen 3. python manage.py runserver -> giving errors.  File "manage.py", line 11, in ?    execute_manager(settings)  File "/usr/lib/python2.4/site-packages/django/core/management.py", line 990, in execute_manager   

Re: How many times my method returning dict is called in template?

2006-07-26 Thread [EMAIL PROTECTED]
> Ah, in that case, pass your computed dictionary to the template context. [...] Actually, my 'model' object is invoked through the template. A more complete example of my template would be: - {% for slave in master.get_slaves %} {{ slave.dict_keyA }}

Re: Media and Admin Media URL Issues

2006-07-26 Thread Aidas Bendoraitis
Do you have something like: (r'^media/(?P.*)$', 'django.views.static.serve', {'document_root': '/home/ohgoditb/django_projects/fallingbullets/media/'}), in your urls.py? Regards, Aidas Bendoraitis [aka Archatas] On 7/26/06, Tyson Tate <[EMAIL PROTECTED]> wrote: > > I'm having some rather

Media and Admin Media URL Issues

2006-07-26 Thread Tyson Tate
I'm having some rather befuddling problems with getting my media URLs working for . In my project's root, I have my regular media in "media/" and the admin media in "media/admin/". For some reason, I can't access anything under "media/". My server just gives

Re: render_to_response equivalent in urls.py?

2006-07-26 Thread Guillermo Fernandez Castellanos
Indeed! I knew it was somewhere, I simply could not find where! Maybe it would be useful to add a little mention about this (a sentence or a link) in http://www.djangoproject.com/documentation/url_dispatch/ Thanks a lot, G On 7/26/06, Sean <[EMAIL PROTECTED]> wrote: > > Could you be looking

Re: have urlpatterns in urls.py changed?

2006-07-26 Thread cyberco
Oh yeah, and the exception is: Traceback (most recent call last): File "C:\Python24\lib\site-packages\django-0.95-py2.4.egg\django\core\handlers\base.py" in get_response 65. callback, callback_args, callback_kwargs = resolver.resolve(path) File

Re: Related objects in generic views

2006-07-26 Thread Sean
Hi, Malcolm Tredinnick wrote: > In the object_list view, you are given an "object_list" parameter, which > is a list of all the objects for that page. To display them, you will be > doing something like > > {% for folder in object_list %} > > to iterate over that list. Inside that loop,

Re: unable to runser ?

2006-07-26 Thread Rajeshwar Singh Jenwar
Hi Jeremy,   I m using mysql-standard-5.0.22-linux-i686 andMySQL-python-1.2.1_p2 on RH Fedora core 4. I didn't compile form source, i was using binary given by mySQL. The links u pointed out set the path for libmysqlclient.so* but i dont have that dynamic library, i have static library