Re: WEB SERVICE IN DJANGO USING ZSI

2010-11-29 Thread sami nathan
To create server file i used this command but showing following error D:\Python25\Scripts>python wsdl2py --complexType localhost 8080 d:/soap/zz/FlypS ms.wsdl Expecting a file/url as argument (WSDL). Traceback (most recent call last): File "wsdl2py", line 9, in wsdl2py() File "D:\Python25\

Re: WEB SERVICE IN DJANGO USING ZSI

2010-11-29 Thread sami nathan
ANY one knows how to generate server.py flie from wsdl2py in ZSI -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsu

Slug for some terms not working

2010-11-29 Thread Detectedstealth
I am completely at a loss here and have no idea what the problem is: A slug was created for the term escape. So website.com/projects/ escape/ url patterns: url(r'^projects/(?P[-\w]+)/$', 'views.projectslug', name='view_project_slug'), view: def projectslug(request, slug): """Displays the sel

Django admin photo upload

2010-11-29 Thread Sithembewena Lloyd Dube
Hi all, So, I am back once more. I am having headaches with a simple file upload in the Django admin. I have a simple model as follows (partial): class PhotoTest(models.Model): test_name = models.CharField(max_length=50) photo = models.ImageField(upload_to='testphotos', blank=True)

Re: Django admin photo upload

2010-11-29 Thread Venkatraman S
Have a look at django-photologue. -V- -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com.

Re: Django admin photo upload

2010-11-29 Thread Kenneth Gonsalves
On Mon, 2010-11-29 at 15:24 +0530, Venkatraman S wrote: > Have a look at django-photologue. is it still maintained? -- regards Kenneth Gonsalves -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@

Re: Django admin photo upload

2010-11-29 Thread Kenneth Gonsalves
On Mon, 2010-11-29 at 11:52 +0200, Sithembewena Lloyd Dube wrote: > class PhotoTest(models.Model): > test_name = models.CharField(max_length=50) > photo = models.ImageField(upload_to='testphotos', blank=True) > thumbnail = models.ImageField(upload_to='thumbnails', blank=True) > > I

Re: Django admin photo upload

2010-11-29 Thread Venkatraman S
On Mon, Nov 29, 2010 at 3:37 PM, Kenneth Gonsalves wrote: > On Mon, 2010-11-29 at 15:24 +0530, Venkatraman S wrote: > > Have a look at django-photologue. > > is it still maintained? > Not sure. But the code is a good one to start off for the OP and get some ideas on how images and thumbnails can

Re: WEB SERVICE IN DJANGO USING ZSI

2010-11-29 Thread Tom Evans
On Mon, Nov 29, 2010 at 8:32 AM, sami nathan wrote: > ANY one knows how to generate server.py flie from wsdl2py in ZSI > Have you tried asking someone who knows what ZSI is? Ok, so slightly facetious, it's some sort of Zope web services layer. However, you may have noticed that this is the Djan

Re: If logged in show X, if not Y

2010-11-29 Thread robos85
I there any way to name a template? For example my subtempaltes/ loginform.html - I want to name it loginform. In group work it'll be a very useful feature. I knto that {% include %} tag allows passing name - but how? On 29 Lis, 04:09, Venkatraman S wrote: > On Mon, Nov 29, 2010 at 7:44 AM, Andre

Re: Issue uploading photos through the admin. PIL issue.

2010-11-29 Thread Sid
You need to install a couple of pre built packages to allow PIL to compile correctly. Install python dev $>sudo apt-get install python2.6-dev -y Install JPEG Support for PIL first $>sudo apt-get install libjpeg62 libjpeg62-dev zlib1g-dev libfreetype6 libfreetype6-dev -y $>workon venv (venv)$> pi

Re: Caching middleware causes default page caching

2010-11-29 Thread Tom Evans
On Sat, Nov 27, 2010 at 4:30 AM, ydjango wrote: > I have added following to cache some common DB data and it seems it > has started caching whole pages by default. Some pages appeared to be > retrieved from cache without even hitting the view. > > and in my views, > > from django.core.cache im

Re: Django admin photo upload

2010-11-29 Thread Sithembewena Lloyd Dube
@ Venkatraman, and @kenneth - thanks gentlemen. I am trying out easy_thumbnail as it looks light enough for my needs. django-photologue looks great too, although I suspect it is a much more full-fledged solution? I will look at it if need be. Regards, Lloyd On Mon, Nov 29, 2010 at 12:15 PM, Venka

Re: Create an object before calling the save method

2010-11-29 Thread bnabilos
Hi, Thank you for your answer. I will explain what I want to do. Let's say that we have Category and Article classes in our model, each one has a title. To make this title reusable, I created another application that will manage fields, I created the class Title and I added it as foreignkey to C

Installing on Ubuntu Python 2.6- Install failure

2010-11-29 Thread Tim Bowden
When installing django from an official release tarball onto Ubuntu 10.04 python 2.6, (python setup.py install) it installs to /usr/local/lib/python2.6/dist-packages/ rather than /usr/lib/python2.6/dist-packages (as reported by python -c "from distutils.sysconfig import get_python_lib; print get_py

manytomany display field

2010-11-29 Thread Anderson Goulart
Hi, How do I choose which field should appears on the admin interface when I use manytomany field? eg: class Service(models.Model): name = models.CharField(..) acronym = models.CharField(..) class Test(models.Model): services = models.ManyToManyField() When I add a

Re: Django admin photo upload

2010-11-29 Thread Sithembewena Lloyd Dube
@Kenneth, thanks again. easy_thumbnail cuts it just fine. Regards, Lloyd On Mon, Nov 29, 2010 at 1:01 PM, Sithembewena Lloyd Dube wrote: > @ Venkatraman, and @kenneth - thanks gentlemen. I am trying out > easy_thumbnail as it looks light enough for my needs. django-photologue > looks great too,

Re: Installing on Ubuntu Python 2.6- Install failure

2010-11-29 Thread Karen Tracey
On Mon, Nov 29, 2010 at 6:56 AM, Tim Bowden wrote: > When installing django from an official release tarball onto Ubuntu > 10.04 python 2.6, (python setup.py install) it installs to > /usr/local/lib/python2.6/dist-packages/ rather than > /usr/lib/python2.6/dist-packages (as reported by python -c

umlaut

2010-11-29 Thread Thomas Rega
Hi, is there a recommended way to deal with German 'umlauts' (like ü.ö.etc.) I was lookingfor some kind of template filter but without success :( The data is stored as utf-8 format. What I am looking for is an automatic transformation into 'ü, ö etc. Is such a template filter the right approach

Re: umlaut

2010-11-29 Thread Brian Bouterse
Yes I think a template filter is the right approach. You could always define a custom template tag. I've had to do this before to display currency information multinationally before. Brian On Mon, Nov 29, 2010 at 8:20 AM, Thomas

Re: Django book

2010-11-29 Thread octopusgrabbus
There are many books on Django. You can look on www.softpro.com, Amazon, or your favorite book store. I've gotten a lot out of two books. The Definitive Guide to Django and Visual Quick Pro Django. On Nov 28, 11:24 am, Matthias Runge wrote: > Djangobook is available as printed edition from apress

Re: umlaut

2010-11-29 Thread Javier Guerra Giraldez
On Mon, Nov 29, 2010 at 8:24 AM, Brian Bouterse wrote: > Yes I think a template filter is the right approach. I'd say that generating UTF-8 HTML is 'more right' -- Javier -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group,

Re: umlaut

2010-11-29 Thread David De La Harpe Golden
On 29/11/10 13:20, Thomas Rega wrote: > Hi, > > is there a recommended way to deal with German 'umlauts' (like ü.ö.etc.) > I was lookingfor some kind of template filter but without success :( > The data is stored as utf-8 format. What I am looking for is an > automatic transformation into 'ü, ö et

Re: Installing on Ubuntu Python 2.6- Install failure

2010-11-29 Thread Tim Bowden
On 29 November 2010 21:15, Karen Tracey wrote: > On Mon, Nov 29, 2010 at 6:56 AM, Tim Bowden wrote: >> >> When installing django from an official release tarball onto Ubuntu >> 10.04 python 2.6, (python setup.py install) it installs to >> /usr/local/lib/python2.6/dist-packages/ rather than >> /us

Sqlite :memory: database for production?

2010-11-29 Thread Subsume
Hey there, I've got an app on my site that's a game where people make picks from Pack objects. These objects only exist during the life of the game (about 20 minutes) and then are gone. I'm hoping to reduce some Disk I/ O on my server by allowing this app to use a database that is purely in sqlite

Re: Sqlite :memory: database for production?

2010-11-29 Thread Javier Guerra Giraldez
On Mon, Nov 29, 2010 at 10:10 AM, Subsume wrote: > Right now I've got the name :memory: but the table always seems to be > empty, despite objects being created. from the docs (http://www.sqlite.org/inmemorydb.html): > Every :memory: database is distinct from every other. So, opening two > datab

Re: umlaut

2010-11-29 Thread Thomas Rega
Thanks a lot for your replies. The following code does the job for me ... >From 8a110f8358f545fae0a9d0c8d69b496fd0e35cdf Mon Sep 17 00:00:00 2001 From: Thomas Rega Date: Mon, 29 Nov 2010 16:51:01 +0100 Subject: [PATCH] custom template filter to convert umlauts This simple custom template filt

Re: absolute url in template and url name

2010-11-29 Thread Jumpfroggy
As a followup, I had to do something similar and ended up using this: # Gets the http://domain.com without the trailing / base_url = request.build_absolute_uri('/')[:-1] And in the template I can do this: ... The benefits: -You only have to create the base_url in the view, the rest

Re: Sqlite :memory: database for production?

2010-11-29 Thread Subsume
Yeah I gathered that but I found some django code that seemed to deal with that: http://code.djangoproject.com/ticket/2658 I wasn't sure what the implications of this would be in a live situation. On Nov 29, 11:05 am, Javier Guerra Giraldez wrote: > On Mon, Nov 29, 2010 at 10:10 AM, Subsume wr

Re: Sqlite :memory: database for production?

2010-11-29 Thread Cal Leeming [Simplicity Media Ltd]
Hi, To be honest, if you're that worried about performance and concurrent user handling, then you wouldn't be using SQLite anyway. Please can you explain some details about what you are trying to achieve, and lets see if we can give you a better solution :) Cal On Mon, Nov 29, 2010 at 3:10 PM, S

Django timestamp to Javascript timestamp

2010-11-29 Thread Matt Thompson
Hello guys and girls, I'm looking to use Flot to graph some data I have in my Django app. I'd like to graph a time based query and need to get the time is Javascript format (milliseconds since 01/01/1970). I can get it into seconds\unix format, this is seconds since 01/01/1970, but not millisecon

generic views template problem

2010-11-29 Thread Carlos Aboim
Guys, Someone can tell me what is happening with my generic views? I have the templates in my application folder 'templates' in the root my project. This folder is referenced in settings such as: TEMPLATE_DIRS = ( os.path.join (PROJECT_ROOT_PATH, 'templates') ) and I am calling a generic view

Re: Django admin photo upload

2010-11-29 Thread Andre Terra
For anyone else who's interested, I've heard great things about sorl-thumbnail too, haven't used it myself. I hope all is fine with easy_thumbnail. Regards, Andre Terra On Mon, Nov 29, 2010 at 10:39, Sithembewena Lloyd Dube wrote: > @Kenneth, thanks again. easy_thumbnail cuts it just fine. > >

Re: generic views template problem

2010-11-29 Thread Daniel Roseman
On Nov 29, 7:08 pm, Carlos Aboim wrote: > Guys, > Someone can tell me what is happening with my generic > views? > > I have the templates in my application folder 'templates' in the root > my project. > This folder is referenced in settings such as: > TEMPLATE_DIRS = ( >     os.path.join (PROJECT_

Javascript and template rendering problem

2010-11-29 Thread Anderson Goulart
Hi, How can I render to a javascript code a variable set in a view? I tried {{ variable }} but it returns nothing in the html source code. When I put this {{ variable }} outside

Error in ajax request

2010-11-29 Thread James Matthews
Hi, When I use this rate limiter http://www.levigross.com/post/1721427025/django-rate-limiting and preform an ajax request I get this error django/middleware/common.py", line 84, in process_response if response.status_code == 404: AttributeError: 'function' object has no attribute 'status_cod

Re: Sqlite :memory: database for production?

2010-11-29 Thread Subsume
I'm not really worried about concurrent user handling. I'm more worried about things happening quickly. Basically take 3 objects: Pack, Card, Pick. A user is handed a Pack with many Cards, they make a Pick and hand the Pack to the next user. Eventually the Pack depopulates of Cards and deletes its

Re: Javascript and template rendering problem

2010-11-29 Thread Sam Lai
On 30 November 2010 07:03, Anderson Goulart wrote: > Hi, > > How can I render to a javascript code a variable set in a view? I tried {{ > variable }} but it returns nothing in the html source code. When I put this > {{ variable }} outside

Re: Error in ajax request

2010-11-29 Thread Daniel Roseman
On Nov 29, 8:28 pm, James Matthews wrote: > Hi, > > When I use this rate > limiterhttp://www.levigross.com/post/1721427025/django-rate-limitingand > preform an > ajax request I get this error > > django/middleware/common.py", line 84, in process_response >     if response.status_code == 404: > A

MySQLdb InterfaceError

2010-11-29 Thread David Smithson
I'm so frustrated with this problem I am about to lose it. I've tried multiple versions of python, mysql, mysql-python, django, etc. I've resorted to a clean installation of CentOS 5, fully up to date, with all packages installed by the book. Currently I'm using DJango 1.2.3 and MySQL-python 1.2

Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
Hi, I'm wondering what the community's stance on using NULL in Django is? Say for example you have: class Person(models.Model): street_address = models.CharField(max_length=50, blank=True) suburb = models.CharField(max_length=30) postcode = models.IntegerField()

Re: Django timestamp to Javascript timestamp

2010-11-29 Thread Bill Freeman
Unix (and python) timestamps are also from the beginning of Jan 1, 1970, but are in seconds, so you might think that multiplying by 1000 would be enough. But unix timestamps (and, presumably, their emulation on Windows) are in GMT, while JavaScript, if memory serves, uses the browser's local machi

DEBUG=False and emailing pretty html

2010-11-29 Thread Sells, Fred
Is there an easy way to get django to email error tracebacks in the pretty html format that it uses when Debug=True? I've got it emailing plain text, but that requires I "reconstruct" the url from the query string while the html version had it nicely presented -- not the end of the world, but woul

Re: Django timestamp to Javascript timestamp

2010-11-29 Thread Brett Thomas
I found it easiest to use the javascript date constructor with a date string. Just have Django output the date in whatever time zone you want it displayed to the user: var d=new Date("November 29, 2010 9:22:00"); Unfortunately Django's default Date display, the ISO standard, prints a string that

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Adam V.
A "phone number" is actually a character string, not an integer; so use CharField for these as well. For optional foreign keys, the standard (only?) database way to handle these is indeed with a NULL value. On Nov 29, 5:28 pm, Victor Hooi wrote: > Hi, > > I'm wondering what the community's stance

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Lachlan Musicman
On Tue, Nov 30, 2010 at 12:28, Victor Hooi wrote: > Hi, > > I'm wondering what the community's stance on using NULL in Django is? > > Say for example you have: > >    class Person(models.Model): >        street_address = models.CharField(max_length=50, blank=True) >        suburb = models.CharFiel

Re: Django admin photo upload

2010-11-29 Thread Kenneth Gonsalves
On Mon, 2010-11-29 at 17:17 -0200, Andre Terra wrote: > For anyone else who's interested, I've heard great things about > sorl-thumbnail too, haven't used it myself. > > I hope all is fine with easy_thumbnail. easy_thumbnail is one of the forks from sorl-thumbnail which is retired after doing ye

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
heya, Phone Number - Yup, you're both right, I'll be using CharField now, and model validation to make sure they're digits. Spouse/Children: With children, a M2M field, there's a link table, and if you don't have a spouse, then there won't be any lines in that table. So no need for NULLs there.

Re: Current Django 1.3 Alpha 2 Documentation as PDF

2010-11-29 Thread derek
Hmm. So you're not planning to upgrade the doc when the final release is made...?! On Nov 25, 4:22 pm, "ckar...@googlemail.com" wrote: > Okay, please remind me ;-) > > On 25 Nov., 09:38, derek wrote: > > > > > > > > > Please post a link to the PDF when the final release is available. > > > On N

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Mike Dewhirst
On 30/11/2010 4:26pm, Victor Hooi wrote: heya, Phone Number - Yup, you're both right, I'll be using CharField now, and model validation to make sure they're digits. Spouse/Children: Victor I'm coming in late on this and don't have the context for your design but I think there might be a bet

Issues importing models in between apps

2010-11-29 Thread Victor Hooi
Hi, I had an application with a fairly large models.py file, which I split up into separate apps to make it easier to manage. Two of the apps are called "conferences" and "people", each with their own models.py. These two are fairly tightly entwined, they each refer to each other. At the top of

Re: auth_user first_name and last_name editing

2010-11-29 Thread derek
Have you looked at: http://docs.djangoproject.com/en/dev/topics/auth/#module-django.contrib.auth.forms Failing that, http://docs.djangoproject.com/en/dev/ref/generic-views/ may help get you going quickly. On Nov 25, 8:08 pm, BozoJoe wrote: > So no builtin views and urls in any modules? -- You

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Victor Hooi
Mike, Hmm, I'm currently using a recursive ('self') Many2Many and ForeignKey for Children and Spouse, respectively (see source in the first post). Is that what you meant? Or perhaps I'm not quite getting what you mean - any chance you could paste a models.py example so I can make sure I'm on the

Re: Django - Alternative to using NULLs? (for integer and FK fields).

2010-11-29 Thread Mike Dewhirst
On 30/11/2010 5:10pm, Victor Hooi wrote: Mike, Hmm, I'm currently using a recursive ('self') Many2Many and ForeignKey for Children and Spouse, respectively (see source in the first post). Is that what you meant? Or perhaps I'm not quite getting what you mean - any chance you could paste a mode

Choices vs. ForeignKeys (was: Django - Alternative to using NULLs? (for integer and FK fields).)

2010-11-29 Thread Todd Wilson
Mike Dewhirst wrote, on 11/29/2010 10:33 PM: > I'm keeping track of companies, divisions and people with their > relationships. For example, divisions can be traded between companies > and people consult to companies or own trading entities. I can also keep > track of pretty much any relationship o