Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Ian Kelly
On Wed, Dec 1, 2010 at 7:58 PM, Anurag Chourasia wrote: > This is using cx_Oracle and it works fine > === cx_Oracle.version > '5.0.3' cursor.execute("select to_term from terminology_map where id=316") cursor.fetchone()[0] >

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Pranav
On Dec 2, 12:10 am, bruno desthuilliers wrote: > On 1 déc, 19:20, Pranav wrote: > > > Hi all, > > > I'm new to django and python and i'm working on a project that works > > with a legacy database. > > I've a particular problem with a

Django + Russian Charaters

2010-12-01 Thread pROCKrammer
Hi, I am getting such error while adding text with russian charaters from the admin panel, Please help me The Model is class JobTitle (models.Model): # Char Fields title = models.CharField(max_length = 250) def __unicode__(self): return u'%s' %

how to define choices option per model's instance

2010-12-01 Thread Alex Boyko
Hi! I got such kind of problem. I'd like to define the tuple(list) of choices option at the moment of instance created on the fly In the future these choices will not change. Hence I've found just one way to do it - override __init__() of my model and pass there the particular predefined list of

Re: Python (2.6) threading module or multiprocessing module?

2010-12-01 Thread Cal Leeming [Simplicity Media Ltd]
Hmm, all depends what you're trying to achieve. I personally avoid conventional threading in Python from the outset, and use Stackless instead. Have you possibly considered using Twisted (see http://twistedmatrix.com/trac/ and http://twistedmatrix.com/documents/current/core/examples/) On

Re: Django in production on Windows

2010-12-01 Thread Cal Leeming [Simplicity Media Ltd]
It's a shame you are not using a *nix os, because you could have then used uWSGI (http://projects.unbit.it/uwsgi/). Feature list: Current core features are * written totally in C * very fast (and simple) communication protocol for webservers integration (apache2

Re: signal locations

2010-12-01 Thread Cal Leeming [Simplicity Media Ltd]
Place your signals into webapp/app/signals.py Then, inside the signals, do "from webapp.app import models" Then attach the signals in a fashion which you are accustom to (see http://docs.djangoproject.com/en/dev/topics/signals/). Then, inside the __init__.py OR the models.py, do "import

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Anurag Chourasia
Hi Ian, Thanks for the response. With cx_Oracle(version 5.0.3), the retrieval of that field value works fine as in my original email. It's only when i directly use the Django models way of accessing that it fails. Below two examples will make it more clear. This is using Django models and it

Re: Unresolved import in Eclipse

2010-12-01 Thread cocolombo
Thank you all. Project > Properties > PyDev - PYTHONPATH was the problem I had. I will try using Aptana Studio. Thanks again. On Dec 1, 8:22 pm, Javier Guerra Giraldez wrote: > On Wed, Dec 1, 2010 at 6:54 PM, Andre Terra wrote: > > I've never used it

Re: Unresolved import in Eclipse

2010-12-01 Thread Javier Guerra Giraldez
On Wed, Dec 1, 2010 at 6:54 PM, Andre Terra wrote: > I've never used it as a plugin, just the standalone version. the standalone is just an Eclipse installer with the plugin already configured (and a few relevant others) -- Javier -- You received this message because

Re: Unresolved import in Eclipse

2010-12-01 Thread Andre Terra
You could also try using Aptana Studio, which is imho better than Eclipse for django development. They're very similar, but it's more refined. http://www.aptana.com/products/studio3 Mind you, I've never used it as a plugin, just the standalone version.

Re: Unresolved import in Eclipse

2010-12-01 Thread cootetom
I take it you're using PyDev with eclipse? My experience is that eclipse often says that it can't resolve an import but is wrong. Just remember an import will work if it is on your python path. When you run the django project from eclipse it will use the python path as well as the project

Re: Loading CSS

2010-12-01 Thread Mike Dewhirst
On 2/12/2010 1:48am, octopusgrabbus wrote: Thank you. I've done made changes according to your suggestions, but the css appears not to load. I am using apache, not the built-in web server. Here is my working vhost.conf for my Apache. See the aliases below which cause Apache to find the css

Re: Django 1.3 alpha static settings consistency

2010-12-01 Thread Russell Keith-Magee
On Thu, Dec 2, 2010 at 4:43 AM, fahhem wrote: > According to some pages in the dev documentation, the settings are > STATIC_ROOT and STATIC_URL: > > http://docs.djangoproject.com/en/dev/ref/settings/ > http://docs.djangoproject.com/en/dev/howto/static-files/ > > But according

Wiki Plugin

2010-12-01 Thread Sam Pottinger
Hello, I am writing a django-based website to hold documentation and a blog for a university research project. We are looking to add a "wiki-like" documentation section that implements history tracking and has decent markdown support or a WYSIWYG editor, preferably with a way to handle file

Re: signal locations

2010-12-01 Thread garagefan
That wouldn't resolve the problem any more than having everything in the models.py. i wish to externalize this signal from the gallery application so that it is up to the website project whether or not a signal is being used. i suppose i could add a toggle variable in the gallery settings file so

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Many thanks to the replies and everyone's patience. I can't see the 9th response to this thread because Google Groups appears to be off line, but here's what I've done to get amr.css to load: 1) Here is the base template portion that loads the css file: {% block title %}Town

Django 1.3 alpha static settings consistency

2010-12-01 Thread fahhem
According to some pages in the dev documentation, the settings are STATIC_ROOT and STATIC_URL: http://docs.djangoproject.com/en/dev/ref/settings/ http://docs.djangoproject.com/en/dev/howto/static-files/ But according to this page and to the actual code, the settings are actually STATICFILES_ROOT

Re: signal locations

2010-12-01 Thread Daniel Roseman
On Dec 1, 5:29 pm, garagefan wrote: > Now, i've read the thread in regards to putting the import in the > __init__.py > > here is my structure > > website_project > - > signals > - - > signals.py (and an __init__.py) > - > shared_apps (link to numerous apps shared amongst

Creating Custom User Row In Custom Table with Django.auth.register

2010-12-01 Thread Corey
I am using Django registration platform and was trying to figure out how to create a row in my CustomUser table for my custom user when a user registers using the django registration platform. I derived a CustomUser class from the django.contrib.auth.User class and added many fields I wanted to

Testing an app: adding an optional test model

2010-12-01 Thread Torsten Bronger
Hallöchen! In order to test my app, I need to add a model class just for testing. While it doesn't do much harm if it's always there because its DB table would remain empty, I'd like to add it only for the test runner. (Background: My app is extended by other apps. But for testing, I must

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread bruno desthuilliers
On 1 déc, 19:20, Pranav wrote: > Hi all, > > I'm new to django and python and i'm working on a project that works > with a legacy database. > I've a particular problem with a "composite key" and "get" or > "get_object_or_404". > > i generated the below model form the legacy

Python (2.6) threading module or multiprocessing module?

2010-12-01 Thread ydjango
http://www.python.org/dev/peps/pep-0371/ I am aware this is a Django forum not python. But many python experts are on this forum, so I though I would ask. When would you use Python (2.6) threading module or multiprocessing module? It seems in general python multiprocessing module should be

Re: get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Daniel Roseman
On Dec 1, 6:20 pm, Pranav wrote: > Hi all, > > I'm new to django and python and i'm working on a project that works > with a legacy database. > I've a particular problem with a "composite key" and "get" or > "get_object_or_404". > > i generated the below model form the legacy

get_object_or_404 on composite key and Value Error:Invalid Literal for int with base 10

2010-12-01 Thread Pranav
Hi all, I'm new to django and python and i'm working on a project that works with a legacy database. I've a particular problem with a "composite key" and "get" or "get_object_or_404". i generated the below model form the legacy database using inspectdb model: -- class Member:

Unresolved import in Eclipse

2010-12-01 Thread cocolombo
Hi everyone. I am using Eclipe 3.6.1 with Python 2.7 on Windows XP and my problem is the following: 1) I have installed a module named : django-urlauth-0.1.1 2) In Eclipse, at the left of the line: from urlauth.util import wrap_url Eclipse qive a big red dot with the message : Unresolved

signal locations

2010-12-01 Thread garagefan
Now, i've read the thread in regards to putting the import in the __init__.py here is my structure website_project - > signals - - > signals.py (and an __init__.py) - > shared_apps (link to numerous apps shared amongst other projects) - - > gallery application my signals.py looks like this

Re: Django 1.2.3, Oracle with Character Set WE8MSWIN1252 - 'utf8' codec can't decode bytes

2010-12-01 Thread Ian
On Nov 30, 8:31 pm, Anurag Chourasia wrote: > On Oracle 10.2 with Character-Set set to WE8MSWIN1252, > > When using Django, I try to select a Oracle row which contains a field with > value as 'Páginas', i encounter the following error "'utf8' codec can't > decode bytes

Re: Django in production on Windows

2010-12-01 Thread ashdesigner
Javier, Thanks for your reply. We will try to explore (to some extent) solutions you propose, hopefully it will help. Anthony On Dec 1, 6:26 pm, Javier Guerra Giraldez wrote: > On Wed, Dec 1, 2010 at 6:43 AM, ashdesigner wrote: > > The only

Re: Problem with ForeignKey to an abstract class

2010-12-01 Thread Marc Aymerich
On Wed, Dec 1, 2010 at 12:48 PM, Ferran wrote: > > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA256 > > Hello everyone, > > I want to have foreign keys to parent model on a manytomany > intermediate table (through) to have unique entries for that domain. > > The problem is i

Re: Problem with ForeignKey to an abstract class

2010-12-01 Thread Ferran
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 01/12/10 12:48, Ferran wrote: > I've thought maybe i can implement contacts and ns fields in both > DomainOwned and DomainPending, using generic relationships, but it > does not seems right to me. Shame on me. This is the right way to do it,

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
My question is what do I need to do to straighten out the media path, so I can load amr.css. When trying to load amr.css, my application gets a 404. 10.100.0.88 - - [01/Dec/2010:10:03:06 -0500] "GET /css/amr.css HTTP/ 1.1" 404 228 6 "http://amrserver:8002/; "Mozilla/5.0 (X11; U; Linux i686;

Re: Unique querysets

2010-12-01 Thread cootetom
Excellent, thank you. That does the trick! On Dec 1, 3:15 pm, Tom Evans wrote: > On Wed, Dec 1, 2010 at 3:07 PM, cootetom wrote: > > Hi, I have a question about the ORM. > > > If I have model class's: > > > class Event(models.Model): > >    

Re: MySQL error

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 3:24 PM, wrote: > Thanks Tom, which one should I download for my django project? > There are about 9 files. > > Kindly revert. > > Regards. > Sent from my BlackBerry wireless device from MTN > I don't know; haven't used windows for ~10 years.

Re: Django in production on Windows

2010-12-01 Thread Javier Guerra Giraldez
On Wed, Dec 1, 2010 at 6:43 AM, ashdesigner wrote: > The only undiscovered issue to us is whether we can launch a heavy > loaded website in Django under Windows (IIS) + MSSQL. Would appreciate > any comment please. a WSGI plugin for IIS would be the best answer; but

Re: MySQL error

2010-12-01 Thread delegbede
Thanks Tom, which one should I download for my django project? There are about 9 files. Kindly revert. Regards. Sent from my BlackBerry wireless device from MTN -Original Message- From: Tom Evans Sender: django-users@googlegroups.com Date: Wed, 1 Dec 2010

Re: Django in production on Windows

2010-12-01 Thread ashdesigner
Lloyd, No it is not a must, but is highly desirable by our IT dpt. You see, currently we don't have a *nix admin, so Windows deployment would be an advantage. Anthony On Dec 1, 5:52 pm, Sithembewena Lloyd Dube wrote: > Hi Antony, it's a pleasure. > > Regarding your last

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Your right. I should have looked in the logs, and the directory path is wrong. 10.100.0.88 - - [01/Dec/2010:10:03:06 -0500] "GET /css/amr.css HTTP/ 1.1" 404 228 6 "http://amrserver:8002/; "Mozilla/5.0 (X11; U; Linux i686; en-US; rv: 1.9.2.12) Gecko/20101027 Ubuntu/10.04 (lucid) Firefox/3.6.12"

Re: Unique querysets

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 3:07 PM, cootetom wrote: > Hi, I have a question about the ORM. > > If I have model class's: > > class Event(models.Model): >     > > class Ticket(models.Model): >    user = models.ForeignKey(User) >    event = models.ForeignKey(Event) >    . > >

Re: Loading CSS

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 3:02 PM, Tom Evans wrote: > Are you expecting django to serve the file through apache or apache to > directly serve the file? > > How have you configured apache? > > What is output in apache's access log when you try to access the file? > > You

Unique querysets

2010-12-01 Thread cootetom
Hi, I have a question about the ORM. If I have model class's: class Event(models.Model): class Ticket(models.Model): user = models.ForeignKey(User) event = models.ForeignKey(Event) . Then I have a user who has 2 tickets for the same event. If I have the event object

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Thank you. I've done made changes according to your suggestions, but the css appears not to load. I am using apache, not the built-in web server. On Nov 30, 5:14 pm, Robert S wrote: > Well - that's one way > A simpler way is to use your settings.py file to point to

Re: Loading CSS

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 2:48 PM, octopusgrabbus wrote: > Thank you. I've done made changes according to your suggestions, but > the css appears not to load. I am using apache, not the built-in web > server. > Are you expecting django to serve the file through apache or

Re: Loading CSS

2010-12-01 Thread octopusgrabbus
Thanks for your comments: Here are the changes I've made, and it still does not load: A directory css is under the main media directory a...@h2oamr:~/django/amr$ ls -l media/css total 4 -rw-r--r-- 1 amr amr 72 Nov 30 14:45 amr.css Here are the settings.py changes: # Absolute path to the

order by rand not working with postgree

2010-12-01 Thread bastir
Hey, why is a query like order:by('?') in postgree not working. It works great in sqlite. thx sebastian -- 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

Re: Django in production on Windows

2010-12-01 Thread Sithembewena Lloyd Dube
Hi Antony, it's a pleasure. Regarding your last question - I am sure you could get a Django/ IIS7 setup to work, but I am also sure that you would get more support from the community for deploying on Apache or other open source web servers than on IIS. Anyhow, here are more links that speak to

Re: minidom parsestring error

2010-12-01 Thread vamsy krishna
I see a 502 Bad Request on the browser and the server is auto-shutting down. I do not see any error logs even though am using a try except block for the line file_xml = minidom.parseString(file_feed) None of the logs output beyond this line and the execution seems to halt. I haven't seen a 502

Re: minidom parsestring error

2010-12-01 Thread Daniel Roseman
On Dec 1, 1:18 pm, vamsy krishna wrote: > Hi, > > I have a function to read and display an RSS feed which is working as > expected in my local Apache. However I'm getting a HTTP 502 error when > I access the same on Webfaction. Below is a snippet from my code and > the

Re: Django in production on Windows

2010-12-01 Thread ashdesigner
Pete, Does this mean that we shouldn't even try to run it on IIS7 in production? On Dec 1, 4:27 pm, CrabbyPete wrote: > I developed Djano on a windows server and everything went smoothly > except getting it to work with IIS. I loaded apache on windows and it > works great.

Re: Django in production on Windows

2010-12-01 Thread ashdesigner
Hi Lloyd, Thank you so much for your reply. You see, the new project is still currently regarded of as probationary, though the choice of the Django framework is agreed and seems to be confident. The issue is that we will be running a separate VPS for the project, and Windows+IIS+MSSQL perfectly

Re: Django in production on Windows

2010-12-01 Thread CrabbyPete
I developed Djano on a windows server and everything went smoothly except getting it to work with IIS. I loaded apache on windows and it works great. On Dec 1, 6:43 am, ashdesigner wrote: > Hello, > > I am absolutely new to Python/Django. Being responsible for a large

minidom parsestring error

2010-12-01 Thread vamsy krishna
Hi, I have a function to read and display an RSS feed which is working as expected in my local Apache. However I'm getting a HTTP 502 error when I access the same on Webfaction. Below is a snippet from my code and the error is originating from the last step involving parsing. Like i mentioned

Re: Django in production on Windows

2010-12-01 Thread Sithembewena Lloyd Dube
Antony, you might also want to have a look at this: http://code.djangoproject.com/wiki/DjangoFriendlyWebHosts Regards, Lloyd On Wed, Dec 1, 2010 at 1:43 PM, ashdesigner wrote: > Hello, > > I am absolutely new to Python/Django. Being responsible for a large >

Re: script adding FileField, no attribute chunks

2010-12-01 Thread Andrew Marder
Awesome! Thanks so much for the help. Andrew On Wed, 2010-12-01 at 12:32 +, Tom Evans wrote: > On Wed, Dec 1, 2010 at 12:23 PM, Andrew Marder > wrote: > > I'm trying to add a bunch of files from disk into my django database. > > Here's the helper function I've

Re: Django in production on Windows

2010-12-01 Thread Sithembewena Lloyd Dube
Hi Anthony, I was in a situation similar to yours not too long ago - introduced Django at work and we've enjoyed it. We are getting better time to market than we would with other options (PHP, .NET etc). Also, coding in Python has been great fun. So, good choice. As to your question, I have no

Re: MySQL error

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 10:09 AM, wrote: > I am starting out to learn django and I am using the book: Beginning Django > E-Commerce by Jim McGaw. > I was able to create the database using mysql console but when I ran the > command: > $ python manager.py dbshell > > I got

problem with media

2010-12-01 Thread Emanuel Vitorino
Hi all! I've recently updated my django version and now all my projects doesn't have css and js from admin or from my apps I've started new projects and it simply doesn't work I've googled and I find out when we are using the deveopment server the static files from admin should be server

Django in production on Windows

2010-12-01 Thread ashdesigner
Hello, I am absolutely new to Python/Django. Being responsible for a large corporate startup project and having looked through a number of MVC/ MVT frameworks I decided to outsource the webproject in Django. The only undiscovered issue to us is whether we can launch a heavy loaded website in

Inconsistant Behaviour with TemplateSyntaxError.

2010-12-01 Thread porangi.chris
Hi, I'm getting very inconsistant behavior with my Django system(s). I'm getting errors to this affect: Caught ViewDoesNotExist while rendering: Tried admin_views in module client_system. Error was: 'client_system.admin_views' is not a callable. or Caught ViewDoesNotExist while rendering:

MySQL error

2010-12-01 Thread delegbede
I am starting out to learn django and I am using the book: Beginning Django E-Commerce by Jim McGaw. I was able to create the database using mysql console but when I ran the command: $ python manager.py dbshell I got the following error: ow...@dipo /c/python26/djangojobs/ecomstore $ python

Re: script adding FileField, no attribute chunks

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 12:23 PM, Andrew Marder wrote: > I'm trying to add a bunch of files from disk into my django database. > Here's the helper function I've written so far: > > def django_file(path, field_name, content_type): >    # adapted from here: >

Re: script adding FileField, no attribute chunks

2010-12-01 Thread Andrew Marder
I'm trying to add a bunch of files from disk into my django database. Here's the helper function I've written so far: def django_file(path, field_name, content_type): # adapted from here: http://groups.google.com/group/django-users/browse_thread/thread/834f988876ff3c45/ from

Re: Problema con ForeignKeys hacia una tabla abstracta

2010-12-01 Thread Ferran
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 On 01/12/10 12:57, Ferran wrote: > Buenas tardes a todos; Sorry list, this mail was intended to a spanish django list. Ignore this mail, thanks. -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using GnuPG with Mozilla -

Problema con ForeignKeys hacia una tabla abstracta

2010-12-01 Thread Ferran
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Buenas tardes a todos; Quiero tener ForeignKeys hacia el modelo padre en las tablas intermedias (manytomany trough) para tener entradas únicas en las mismas. El problema es que quiero que este modelo padre sea abstract, ya que nunca querré

Problem with ForeignKey to an abstract class

2010-12-01 Thread Ferran
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Hello everyone, I want to have foreign keys to parent model on a manytomany intermediate table (through) to have unique entries for that domain. The problem is i want this parent model class to be an abstract one, because i don't ever want to

Re: list_display with a function

2010-12-01 Thread Daniel Roseman
On Dec 1, 11:17 am, Daniel Carvalho wrote: > hi > > I have a model that defines a function: > > class Test(models.Model): >     name = models.CharField(max_length=200) > >     data_expira = models.DateField() > >     def expired(self): >         return self.data_expira <

list_display with a function

2010-12-01 Thread Daniel Carvalho
hi I have a model that defines a function: class Test(models.Model): name = models.CharField(max_length=200) data_expira = models.DateField() def expired(self): return self.data_expira < datetime.date.today() expired.short_description = 'Expirou?' I want to put it in

Re: Django, Python, AJAX position

2010-12-01 Thread Kenneth Gonsalves
On Wed, 2010-12-01 at 09:55 +, Tom Evans wrote: > And your post is what exactly? > > This is a pretty standard job ad, if you are interested, email the > recruiter, if not, please don't email the list and moan about it; I've > now seen this ad 6 times because people keep replying to it,

Re: Django, Python, AJAX position

2010-12-01 Thread Tom Evans
On Wed, Dec 1, 2010 at 2:38 AM, Cal Leeming [Simplicity Media Ltd] wrote: > 1) The fact you've put the terms "my client" and "work permit" whilst using > a gmail email address, that doesn't have your real name, kinda says a lot. > 2) You've broadly used the

Re: Loading CSS

2010-12-01 Thread Tom Evans
On Tue, Nov 30, 2010 at 6:21 PM, octopusgrabbus wrote: > I am running Django 1.2.3 -- python -c "import django; print > django.get_version()" I basically need to know what logs to look at to > fix a css file not loading. > > I am trying to load a css file in my base

Re: Project management software

2010-12-01 Thread Thomas Guettler
Hi, i am interested, but the licence (GPL) ist unfortunately unusable for me. I need a licence like django (BSD or LGPL). Thomas tiemonster wrote: > I finally had a chance to put a demo up online: > > http://freeshell.de/~mscahill/projects/ > > Now obviously this isn't as pretty as it could

Re: php script in django app

2010-12-01 Thread Ferran
-BEGIN PGP SIGNED MESSAGE- Hash: SHA256 Maybe this? http://pythonpaste.org/wphp/ - -- Abordemos el parlamento! -- http://pirata.cat En democracia, dos Belén Esteban valen más que tú Di NO al top-posting! -BEGIN PGP SIGNATURE- Version: GnuPG v1.4.11 (GNU/Linux) Comment: Using