Re: Cloning/using Django admin without auth_ and django_ database tables?

2009-09-04 Thread Ulf Kronman
Hi Russel, thanks for the tip. > There isn't a simple switch of setting to do this out-of-the-box. > However, it _might_ be possible with some creative subclassing. I might try this, but I'm afraid that it is a fair bit beyond my Django/Python skills. Maybe I have to bite the bullet and write

Cloning/using Django admin without auth_ and django_ database tables?

2009-09-03 Thread Ulf Kronman
Hi all, I’m using Django to build an Intranet web interface to a big legacy database running in a MS SQL Server. With the help of the code from the guys over at the django_pyodbc project (http://code.google.com/p/django-pyodbc/) I have managed to get things working quite well against this

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-30 Thread Ulf Kronman
Hi again Malcolm, I've now performed some of the test you suggest here, and I would like to report my findings. > > It seems to me that when the Python renderer sees the Decimal() call, > > it goes and fetches my OS locale, which calls for Swedish decimal > > commas instead of US decimal points.

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-30 Thread Ulf Kronman
Hi Malcolm, > I forgot to mention this in my last reply, but you didn't actually > answer the question that Karen asked. If you open up a Python prompt on > your machine and do this: > >         >>> import decimal >         >>> decimal.Decimal('1.0') > > does it raise an exception? Sorry, I

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-29 Thread Ulf Kronman
Hi again, a follow up: It seems as if it is a design decision from the pymsql developers to return Decimal for BIGINT (sorry; not longint, as I said before). It is documented here: http://freshmeat.net/projects/pymssql/?branch_id=59462_id=205925 > big numbers (MONEY, SMALLMONEY, DECIMAL,

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-29 Thread Ulf Kronman
Hi Karen, > Are you running an SVN checkout and did you update it from something prior > to r9369/r9370 to something after that level right before this started > happening?   Yes, it may well be. Is there a place in TortoiseCVS where I can see a history of my updates? Looking at the log just

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-29 Thread Ulf Kronman
Hi, I'm back to report that I have found the cause and a temporarily solution to my problem. First of all; thanks to Malcolm and Karen for trying to help me out, even if I didn't give a lot of detail on the problem in the first round. The reason was that I was frustrated and tired late in the

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-25 Thread Ulf Kronman
Thanks Karen and Malcolm, I'll get back with a more thorough answer when I find more time. I just wanted to leave a short note that I have verified that the problem actually *is* somewhere in my view code. I have been able to run another view containing floatformat and get floats with decimal

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-25 Thread Ulf Kronman
Hi again, > Nothing has changed in Django in the past few months (or years) that > would affect this, as far as I can see. OK, so the reason must be me doing some changes (which I have forgotten) to the code. > > > Django doesn't call setlocale() itself and it would be a little tricky > > > to

Re: Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-25 Thread Ulf Kronman
Hi Malcolm, thanks for your response. > I don't have any solution to your problem. I don't use Windows, so I > have no idea what the fix might be (well, I do, but "for the love of all > that is decent, stop using Windows!" sounds like an option you would > have already considered). But if you do

Template engine reads OS locale (?) and expects comma instead of decimal point in floatformat

2008-11-24 Thread Ulf Kronman
Hi all, I need your help on this. Suddenly this weekend my templates on my Win XP box started breaking with the error message: TemplateSyntaxError at /vr/isi/items/ Caught an exception while rendering: invalid literal for int() with base 10: '' The template line causing the problem is: {{

Re: Python on Windows re-using old .pyc files?

2008-10-21 Thread Ulf Kronman
Hi Thomas, > Apache creates several threads (or worker processes) and after one > request the thread/process gets killed. But the other are still alive and > have the old code loaded. > > Maybe you could try mod_wsgi. It is much more flexible. Thanks for the tip. It seems as this could be the

Python on Windows re-using old .pyc files?

2008-10-19 Thread Ulf Kronman
Hi all, I've been coding database development with Django for about a year in a Mac OS X and Linux environment using a Postgres database. Now I have moved to a new organisation and is trying to use Django for development against a big bibliometric legacy database in MS SQL Server in a Windows

Re: Template path for new admin doc broken in revision 8520?

2008-08-24 Thread Ulf Kronman
Thanks Karen and Shadow, > > > urlpatterns = patterns('', > > >    # Admin > > >    (r'^admin/doc/', include('django.contrib.admindocs.urls')), > > >    (r'^admin/(.*)', admin.site.root), > > > ) > > You need that in urls.py,  plus you need  'django.contrib.admindocs' added > > to your

Template path for new admin doc broken in revision 8520?

2008-08-24 Thread Ulf Kronman
Hi all, some time ago, I noticed that I got an error when I clicked on the link to Documentation in the Django admin. I also saw that admin docs had been moved from /django/contrib/admin/templates/admin_doc/ to /django/contrib/admindocs/templates/admin_doc/ but some part of my Django

Re: Anyone got a backend for MS SQL Server working?

2008-07-03 Thread Ulf Kronman
Hi Malcom, and thanks for your answer. On Jul 3, 8:37 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Not knowing anything about this particular project, but if that's what > the line really says in the source (and I'm not doubting you, just very > surprised), it's completely wrong. It's

Re: Anyone got a backend for MS SQL Server working?

2008-07-03 Thread Ulf Kronman
Hi again all, after a few days of struggling with django-pyodbc, I have finally got past the "ImportError: No module named django-pyodbc.db.mssql.base" stage. The problem was that the module package was missing __init__.py files in the directories above the mssql directory. So I added two empty

Re: Anyone got a backend for MS SQL Server working?

2008-06-30 Thread Ulf Kronman
[Posted this reply yesterday, but I can't see it, I post it again. Sorry for any duplication. / Ulf ] On Jun 27, 4:12 pm, gordyt <[EMAIL PROTECTED]> wrote: > Ulf I haven't played with this second solution, but I did just check > out a copy of the django-pyodbc project.  You should be OK

Anyone got a backend for MS SQL Server working?

2008-06-27 Thread Ulf Kronman
Hi all, sorry; I know that this is an ever-coming-back question, but I need to dig a bit deeper to get further, before deciding to struggle on or give up. I've been coding happily with Django for over a year, using an Ubuntu server with a PostgreSQL database and a development environment on Max

Re: Make Django admin edit return to custom page?

2008-01-04 Thread Ulf Kronman
Hi all, I believe that I now have found a way to use the Django admin edit form, addressed from an external page, and then get returned back to the external page, rather than the default admin listing of records. I got a first good hint from Malcolm, and after a little tweaking of URL configs

Re: Make Django admin edit return to custom page?

2008-01-03 Thread Ulf Kronman
Hi Malcom, and thanks for the reply. > The admin interface isn't really designed to be customised like that. > Rather, the principle is that if you can edit one record, you can edit > them all. OK, I guessed that I would get that answer, but I took a chance anyhow. > However, a bit of reading

Make Django admin edit return to custom page?

2007-12-29 Thread Ulf Kronman
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 able to use the excellent Django admin interface for this editing,

management.call_command dumpdata does not return datastring

2007-10-25 Thread Ulf Kronman
Hi all, I've been using the Django management module to output data from my database in JSON format. This summer I asked some questions about the changes in the call management.dump_data to management.call_command('dumpdata',) and got good help and got it working. Now that I try to run my

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-22 Thread Ulf Kronman
> That one has to go to the > extent of reading the Python source code to fully understand what it > is for is a good sign that the typical user shouldn't be using it for > anything. If it is there for any reason, I'd say it is more for people > who are tinkering with the actual Python code

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-21 Thread Ulf Kronman
Hi Graham, > You should not need to set PYTHONHOME and doing so could cause a lot > of problems because if you now run /usr/bin/python2.3 directly or > indirectly, it will pick up the wrong installed version of Python > modules. OK, I'll remove it. But why should I want to run Python 2.3? As I

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-21 Thread Ulf Kronman
Hi all, > Have you made any try on Python 2.5 together with mod_python? I'll reply to myself here, since I finally got mod_python to work with Python 2.5! Here's how I did it: -- Installed Python 2.5.1 from the DMG package. Set up paths in my ~/.profile: export

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-21 Thread Ulf Kronman
Hi Leo, > Both in that effort and in some previous attempts to configure my > Python, I ended up avoiding MacPorts entirely. It's a good concept > but just wasn't standard enough or up-to-date enough. Also, I try to > stick to Framework installs of Python whereever they come from... OK, it

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-21 Thread Ulf Kronman
Hi again Graham, > No, that is a different flag. It is -Wl,-f not -Wl,-F. They mean > different things. You would use: > > LDFLAGS = -Wl,-F/Library/Frameworks .existing options OK, I understand. The -F option is just to point to the right framework location. But my previous

Re: Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-20 Thread Ulf Kronman
Hi Graham, thanks for your answer. Here some replies to your comments. > A few quick comments, although you may have so mucked up your > installations you might be better reinstalling everything, include the > OS from scratch. :-) Uh-uh. So this implies that there may be some settings tucked

Anyone running mod_python for Python 2.5 on Mac OS X?

2007-10-19 Thread Ulf Kronman
Hi all, I have severe problems to get my Apache 2 to run mod_python together with Python 2.5 on Mac OS X 10.4.10. This is my sad story: I'm developing a small in-house publication database for bibliometric purposes. I run a Ubuntu Linux-based server with Apache, Python and PostgreSQL, but I

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
> > Is there any documentation on this change around yet? > As always, backwards-incompatible changes appear here: > http://code.djangoproject.com/wiki/BackwardsIncompatibleChanges#Chang... Thanks again. I also notice that the command names have changed from dump_data and load_data to dumpdata

Re: django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
Hi Russ, > Rather than call the command directly, you now go through the > management interface and invoke the command by name: > >>> management.call_command('dumpdata', 'kth', format='json', indent=2) Thanks for an *extremely* fast support response. Fantastic! Is there any documentation on

django.core.management.dump_data gone into management.commands - but how to address it?

2007-08-29 Thread Ulf Kronman
Hi all, I've been using Django for building an application containing information about my university's scientific publications, and I'm quite impressed with it. I've been using some borrowed code snippets to make a script that saves data from my PostgreSQL database, and now the script has