Re: import Error

2010-09-09 Thread ravi krishna
Hi, For installing i followed their instructions Setup¶ - unzip django-chat archive or checkout it - install dojango (http://dojango.googlecode.com/files/dojango-0.3.tar.gz) in the python path - create database (python manage.py syncdb --no

Re: date translation

2010-09-09 Thread Kenneth Gonsalves
On Thu, 2010-09-09 at 06:59 -0700, imgrey wrote: > in locale/no/LS_MESSAGES/django.po > msgid "DATETIME_FORMAT" > msgstr "" this has nothing to do with the format to be used - this just translates the word 'DATETIME FORMAT' into norwegian -- regards Kenneth Gonsalves -- You received this messa

Re: 404 handler not working on live hosting environment

2010-09-09 Thread Kenneth Gonsalves
On Thu, 2010-09-09 at 14:31 +0200, Sithembewena Lloyd Dube wrote: > Yes, both the Django and Python versions on dev and prod match. We are > running Django 1.2.1. and Python 2.6.5. > > On our dev server, we use Django's server instead of Apache. > > actually to avoid problems like this in produ

Re: Does select_related() follow ManyToMany fields?

2010-09-09 Thread Seán Patrick Hogan
No. select_related() will work on ForeignKey() relationships and OneToOneField() relationships and reverse OneToOneField() relationships. Example: class Blog(models.Model): title = models.CharField() > class Entry(models.Model): body = models.TextField() blog = models.ForeignKey

Does select_related() follow ManyToMany fields?

2010-09-09 Thread Winnie
Does select_related() work if used on a ManyToMany field? -- 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...

Re: How does django convert string to modules

2010-09-09 Thread Bachir
The problem is not the lack of information, the real problem is that i don't know what to search for . 2010/9/9 bruno desthuilliers > > > On 9 sep, 03:46, maroxe wrote: > > Hi, I am trying to understand an other magic thing about django: it > > can convert strings to modules. In settings.py, IN

RE: model across several databases

2010-09-09 Thread Sells, Fred
I've had success using sql to define views to other databases and then linking an "unmanaged" model to the view. This is with MySQL where different "databases" are really on the same db server. -Original Message- From: django-users@googlegroups.com [mailto:django-us...@googlegroups.com]

Re: Optional foreign key with django?

2010-09-09 Thread maroxe
This solved my problem On 9 sep, 12:18, Carlton Gibson wrote: > On 9 Sep 2010, at 12:04, bagheera wrote: > > >> On Sep 8, 11:14 pm, maroxe wrote: > >>> Hi, In my models I want to have an optional field to a foreign key. I > >>> tried this: > > >>>  field = models.ForeignKey(MyModel, null=True, b

Returning an inclusion tagLLKKJJ

2010-09-09 Thread maroxe
Hi, I am suffering whereever i try to do something in django that is not common(in django, not in python in general) For example, i don't know how to return an inclusion tag. This. obviously, won't work: @register.inclusion_tag('template.tpl') def myinclusiontag(parameter): return {'var': par

Free, open course for news-interested "hackers"

2010-09-09 Thread phillipadsmith
Apologies if this is a bit off-topic, but Django has it's roots in online news, so I thought this would be relevant to some folks on this list: Mozilla, Hacks/Hackers, Medill School at Northwestern University, and The Media Consortium are collaborating to run a free online course for journalists a

Re: TEMPLATE_CONTEXT_PROCESSORS doesn't seem to be present in settings.py by default

2010-09-09 Thread Sandip Bhattacharya
Never mind. Just saw http://code.djangoproject.com/ticket/6851 - Sandip On Fri, Sep 10, 2010 at 3:51 AM, Sandip Bhattacharya wrote: > Is this variable supposed to be present in default generation of > settings.py after a startproject? Because I don't see this variable in > any of the projects th

TEMPLATE_CONTEXT_PROCESSORS doesn't seem to be present in settings.py by default

2010-09-09 Thread Sandip Bhattacharya
Is this variable supposed to be present in default generation of settings.py after a startproject? Because I don't see this variable in any of the projects that I am creating. The doc (http://docs.djangoproject.com/en/dev/ref/settings/#std:setting-TEMPLATE_CONTEXT_PROCESSORS) makes it seem as if t

Create Dynamic Forms from a MetaModel?

2010-09-09 Thread rz7qpx
Hi, was hoping someone could point me in a direction, I'm somewhat new to Django. I'm trying to create a "model of a model", something like this (mostly pseudo-code, not "real" Python): class TheModel(Model): name #some other stuff class TheModelProperties(Model): the_model = ForeignKe

Re: Overridden Model __init__ being called twice

2010-09-09 Thread Brian Bouterse
The first request is the actual request and its stack trace shows the work being kicked off by the request handler. The second request stack trace is actually coming from a the use of the inlines functionality in the OrderOpportunityAdmi

url_name from resolve in Django 1.2

2010-09-09 Thread SlafS
Hi there! Is there any way to obtain a name of an url that Django URL dispatcher matched by resolving (or anything else) e.g. '/path/to/my/page/'? For now resolve returns a tuple :/. I assume that it will be available in 1.3 according to http://docs.djangoproject.com/en/dev/topics/http/urls/#dj

hello .L

2010-09-09 Thread Steven Davidson
hello friends: I have good news for you. Last week ,I have Order china 7 Products w e b: www.hoaoeso1.com I have received the product! It's amazing! The item is original, brand new and has high quality, but it's muc cheaper. I'm pleased to share this good news with you! I believe you will find

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Ok, cant quite get it. Here is what I have: please_wait.html ... http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> $.get({{ calculation_url }}, function(data) { if (data == 'OK') { window.location.href = {{ view_url }}; } else { alert(data); }

Re: Overridden Model __init__ being called twice

2010-09-09 Thread akaariai
On 9 syys, 20:06, bmbouter wrote: > I have a model defined named OrderOpportunity where I have overridden > __init__(self).  I have included the relevant parts of the Model below > as an example.  What I want to understand is why the overridden > __init__ is being called twice for the creation of

Re: Strange unit test / OAuth Issue

2010-09-09 Thread Chris
Awh yes thank you for the tip. After removing the incorrect versions and installing the correct ones, I ran a simple md5 checksum to make sure that both my local dev and prod versions match: from oauth import oauth from md5 import md5 print "You are using version: ", oauth.VERSION filename = oaut

Re: UnicodeDecodeError after upgrade to django-1.2.2

2010-09-09 Thread Karen Tracey
There is a ticket with patch for this problem here: http://code.djangoproject.com/ticket/14235 Karen -- http://tracey.org/kmt/ -- 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.

Overridden Model __init__ being called twice

2010-09-09 Thread bmbouter
I have a model defined named OrderOpportunity where I have overridden __init__(self). I have included the relevant parts of the Model below as an example. What I want to understand is why the overridden __init__ is being called twice for the creation of a single OrderOpportunity DB record. In mo

GeoDjango installer not working

2010-09-09 Thread George Silva
Hello guys, The GeoDjango installer for windows is not working. When I try to execute it I get an error, saying that file is possibly corrupted. Is it me or is the file damaged? Thanks -- George R. C. Silva Desenvolvimento em GIS http://blog.geoprocessamento.net -- You received this message

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
A lot of ways to do this. Yes you could do it as above, but that can get ugly as you start adding more views. You can indeed access the context dictionary in please_wait.html. It's hard to say without knowing more details about your application. How does the user pass arguments (if any) used in the

Re: model across several databases

2010-09-09 Thread qMax
On Sep 9, 3:50 pm, Russell Keith-Magee wrote: > On Thu, Sep 9, 2010 at 8:48 AM, qMax wrote: > > Hi. > > > Being quite new in django, > > I have a task to integrate data from multiple databases. > > And I wonder if django-1.2 multibase capabilities can help me in that. > > > The idea is like that:

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
OK, Got it working. Sorry one more question. I have a couple of places where I'd like to display the 'Please Wait' page. I'd imagine I'd do something similar to the following:: # please_wait.html ... http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> if (If_come_from_pageA)

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Yeah, I just tried out what I wrote in my last and it worked! Thanks for all your help!!! Bradley On Thu, Sep 9, 2010 at 11:17 AM, Alec Shaner wrote: > That's really a design issue up to you, i.e., how you get data from your > view to your template. Since I don't know the format or how much dat

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
That's really a design issue up to you, i.e., how you get data from your view to your template. Since I don't know the format or how much data you're storing in the session it's hard to say. I was just assuming you'd use context variable(s) to pass the data to the template. I'm not intimately famil

Job Opportunity with Firefly e-Ventures

2010-09-09 Thread parul gupta
Firefly e-Ventures `__ (Gurgaon, India) **Job Description**: Person should have worked on Python/ Django, MYSQL, Javascript, XMS, JSON **Open Source Developer

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Thanks Alec, That finally makes sense. However, I do have a question here: def display_DHM(request): # Get results from session return render_to_response('ran_DHM.html', ...) '# Get results from session' Would I not just do this: def display_DHM(request): return render_to_respon

Re: Please wait page trouble

2010-09-09 Thread Joe Casper
The NoReverseMatch error is being thrown because Django cannot find a named URL pattern to match {% url run_DHM %}. Here is the link to the spot in the docs where it discusses this feature: http://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-patterns In essence, you would need to re

Re: Django webiste down

2010-09-09 Thread Federico Maggi
On Sep 9, 2010, at 4:43 PM, Łukasz Rekucki wrote: > Is it only me or is http://docs.djangoproject.com/ down? http://downforeveryoneorjustme.com/http://docs.djangoproject.com/ -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to t

Re: Django webiste down

2010-09-09 Thread bagheera
Dnia 09-09-2010 o 16:43:50 Łukasz Rekucki napisał(a): Is it only me or is http://docs.djangoproject.com/ down? Works fine. -- Linux user -- 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...@goo

Django webiste down

2010-09-09 Thread Łukasz Rekucki
Is it only me or is http://docs.djangoproject.com/ down? -- Łukasz Rekucki -- 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 djang

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
I feel your pain - javascript has always been a pain for me, but libraries like jQuery make it more bearable! AJAX calls are made in the background (usually asynchronously), so they don't directly change the page you're currently viewing in your browser. The browser is responsible for dispatching

AW: PayPAL-IPN-request doesn't call the view

2010-09-09 Thread daqube
ok thanks; I should have mentioned that. the view is called when loaded from a browser. even with GET or POST method. But it is obviously that the error occurs in the wsgi handler This is really strange On Sep 8, 11:47 pm, Max_ wrote: > Hello, > I created a website, using the IPN-Function. > Ev

Re: django-simple-freinds: template tags and Friendship request

2010-09-09 Thread Preston Holmes
On Sep 9, 5:11 am, justin jools wrote: > Hi Muhuk, > > I am using django-simple-friends app, much easier to setup than django- > friends. > but need a little help and was hoping for some guidance. > > I have set up friends_list.html no problem: >  Friend List > Friends for {{ user }} >   >   {%

Re: Optional foreign key with django?

2010-09-09 Thread Carlton Gibson
On 9 Sep 2010, at 12:04, bagheera wrote: >> On Sep 8, 11:14 pm, maroxe wrote: >>> Hi, In my models I want to have an optional field to a foreign key. I >>> tried this: >>> >>> field = models.ForeignKey(MyModel, null=True, blank=True, >>> default=None) >>> >>> But i am getting this error: >>>

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
Alec, Thanks for your patience. The jquery tutorials have been frustrating. Anyway, I do not have three 'views' as you suggested. I will try that. But I need to understand a few things before I try that. How to call run_DHM from my please_wait.html page. (I assume AJAX but I've tried and tries wha

date translation

2010-09-09 Thread imgrey
Does someone have an idea why django might not display date and time in selected language ? In settings.py: USE_L10N = True USE_L18N = True LANGUAGE_CODE = 'no' LANGUAGES = ( ('no', u'Norwegian'), ('en', u'English'), ) in template: {% load i18n %} {{ variable_with_date|date:_("DATETIM

Re: upload_to vs FileSystemStorage

2010-09-09 Thread Preston Holmes
On Sep 8, 5:04 am, Dave wrote: > Hi everyone, > > I've found in documentation usage of custom file storage. There it is > like that > (http://docs.djangoproject.com/en/1.2/topics/files/#the-built-in-files... > ) - > > from django.db import models > from django.core.files.storage import FileSyst

Re: Please wait page trouble

2010-09-09 Thread Alec Shaner
Could you post the full url.py file? And as Brian mentioned your javascript block should be separated. Plus you have an extra }); that's going to fail once you resolve this reverse error. It's also not clear what you intend to happen when run_DHM returns its response? It looks like your intent is

Re: PayPAL-IPN-request doesn't call the view

2010-09-09 Thread Preston Holmes
On Sep 8, 11:47 pm, Max_ wrote: > Hello, > I created a website, using the IPN-Function. > Everything worked fine at first - the notification view was called and > the signal was sent. > But now (without any changes on the code), the IPN-Request from PayPAL > doesn't call the IPN-view anymore. Th

Re: Please wait page trouble

2010-09-09 Thread Bradley Hintze
#url.py ... (r'^please_wait/', please_wait), (r'^DHM_run/$', run_DHM), ... #please_wait.html http://ajax.googleapis.com/ajax/libs/jquery/1.4/jquery.min.js";> $.getJSON('{% url run_DHM %}') }); #view.py def please_wait(request): c = {'we_r_home':'yes'} return render_to_respon

Re: 404 handler not working on live hosting environment

2010-09-09 Thread Sithembewena Lloyd Dube
Hi Kenneth, Yes, both the Django and Python versions on dev and prod match. We are running Django 1.2.1. and Python 2.6.5. On our dev server, we use Django's server instead of Apache. So happens that a colleague solved the issue as I was responding to your questions - by restarting Apache. Than

Re: 404 handler not working on live hosting environment

2010-09-09 Thread Kenneth Gonsalves
On Thu, 2010-09-09 at 14:19 +0200, Sithembewena Lloyd Dube wrote: > We are in the process of deploying a Django app to WebFaction hosting > where > we use Apache to serve it. > > is the django version used in your dev server the same as that on webfaction? Also did you test with apache on your d

404 handler not working on live hosting environment

2010-09-09 Thread Sithembewena Lloyd Dube
Hi folks, We are in the process of deploying a Django app to WebFaction hosting where we use Apache to serve it. - We are using Django's handler404 callable in our URLConf, where we instruct Django to pass 404 errors to a custom view. - In turn, the view fetches region-specific data and passes

Re: save_model -- how to find out what has been changed?

2010-09-09 Thread Heribert
it worked -- thanks! On Sep 8, 11:00 pm, akaariai wrote: > On 8 syys, 22:50, Heribert wrote: > > > > > hi everyone, > > > first of all: I'm totally new to django. I did the tutorial and now I > > want to go beyond what I've learnt there ... and write a simple app to > > manage all my projects i

django-simple-freinds: template tags and Friendship request

2010-09-09 Thread justin jools
Hi Muhuk, I am using django-simple-friends app, much easier to setup than django- friends. but need a little help and was hoping for some guidance. I have set up friends_list.html no problem: Friend List Friends for {{ user }} {% for friends in friends_list %} {{ friends.username }} {%

Re: Advice needed on bundling applications

2010-09-09 Thread Benedict Verheyen
On 7/09/2010 10:45, Benedict Verheyen wrote: > Hi, > > > i've written a calltracking application for my company and other apps will > follow soon. > Now, i would want a central way to access them and to assign rights on who > can see > and run what application. > The dashboard or access panel w

UnicodeDecodeError after upgrade to django-1.2.2

2010-09-09 Thread Dirk Eschler
Hello, after upgrading from 1.2.1 to 1.2.2 i get a UnicodeDecodeError using the dev server. It happens with a simple contact form i'm using. The error page is served as text, white background, no django debug screen. Traceback (most recent call last): File "/path/to/django/core/servers/baseh

Re: Optional foreign key with django?

2010-09-09 Thread bagheera
Dnia 09-09-2010 o 11:00:29 akaariai napisał(a): On Sep 8, 11:14 pm, maroxe wrote: Hi, In my models I want to have an optional field to a foreign key. I tried this: field = models.ForeignKey(MyModel, null=True, blank=True, default=None) But i am getting this error: model.mymodel_id may

Re: django not taking in consideration model fields declared in __init__

2010-09-09 Thread bruno desthuilliers
On 8 sep, 18:26, Bachir wrote: > This is an example: > > class UploadItem(models.Model): >     file = models.FileField(upload_to=UploadItem.get_directory) > >     class Meta: >         abstract = True > > # I want videos to be storred in 'videos/' directory > class Video(UploadItem): >     def get

Re: How does django convert string to modules

2010-09-09 Thread bruno desthuilliers
On 9 sep, 03:46, maroxe wrote: > Hi, I am trying to understand an other magic thing about django: it > can convert strings to modules. In settings.py, INSTALLED_APPS is > declared like that: > > INSTALLED_APPS = ( >     'django.contrib.auth', >     'django.contrib.contenttypes', >     'django.co

Re: Optional foreign key with django?

2010-09-09 Thread akaariai
On Sep 8, 11:14 pm, maroxe wrote: > Hi, In my models I want to have an optional field to a foreign key. I > tried this: > >   field = models.ForeignKey(MyModel, null=True, blank=True, > default=None) > > But i am getting this error: > >   model.mymodel_id may not be NULL > > i am using sqlite edit

Re: model across several databases

2010-09-09 Thread Russell Keith-Magee
On Thu, Sep 9, 2010 at 8:48 AM, qMax wrote: > Hi. > > Being quite new in django, > I have a task to integrate data from multiple databases. > And I wonder if django-1.2 multibase capabilities can help me in that. > > The idea is like that: > class PersonModel(Model): >    id         = AutoKey(prim

Re: Automatically loading data into Django

2010-09-09 Thread shofty
you might want to read through this snippet. http://djangosnippets.org/snippets/788/ its a csv import script which imports to a django db from a csv file. very easy to use. im using it relatively successfully. it populates a model, but it errors if you try and set a boolean and i havent worked out

Re: import Error

2010-09-09 Thread Jitesh
Have you installed the django-chat-0.2 using setup.py, (make sure it is there in python site-packages and also check its application name there) and have you specified python's bin path in enviornment variables? On Sep 8, 11:21 am, ravi krishna wrote: > Hi, > I am newbie with python and django. I

Re: request object in generic view?

2010-09-09 Thread Łukasz Rekucki
On 9 September 2010 05:46, akcom wrote: > Is there anyway to access the request object from a generic view? > Specifically, I'd like to access the request.user object.  I tried > doing it as follows: > (r'^$', 'django.views.generic.simple.direct_to_template', {'template': > 'index.html', 'extra_co