pkg_resources.distributionnotfound django==1.3.1

2012-05-17 Thread doniyor
Hey guys, i am getting this error while trying the command: django-admin.py startproject test can it be that i am using 2 versions of django at the same time? first what i did was: i wanted to install django1.4 and i did. then many errors came, then i switched back to django1.3, in between i

Re: Thread safety with view arguments in class based views

2012-05-17 Thread akaariai
On May 18, 12:17 am, Rafael Durán Castañeda wrote: > I'm wondering if this is suitable for a doc bug report, it is? I think a direct github pull request is the way to go. And yes, the docs could be clarified here. - Anssi -- You received this message because you

Re: Model design question

2012-05-17 Thread akaariai
On May 18, 5:25 am, oneroler wrote: > Thanks Mike, that is what I was originally planning to do but realized > there would be situations where that wouldn't do exactly what I wanted. > For example, if there is a business that only has the strategy 'wholesale' > assigned,

Re: Model design question

2012-05-17 Thread Mike Dewhirst
On 18/05/2012 12:25pm, oneroler wrote: Thanks Mike, that is what I was originally planning to do but realized there would be situations where that wouldn't do exactly what I wanted. For example, if there is a business that only has the strategy 'wholesale' assigned, using ForeignKey would

Re: Model design question

2012-05-17 Thread oneroler
Thanks Mike, that is what I was originally planning to do but realized there would be situations where that wouldn't do exactly what I wanted. For example, if there is a business that only has the strategy 'wholesale' assigned, using ForeignKey would still allow me to assign a different

virtualization that suitable for django & mysql server

2012-05-17 Thread Bolang
Hi, I want to deploy my django app to VPS. So far, i use KVM and it works great without problem. Now, i want to split my mysql server to another VPS. The VPS provider have both openvz & KVM VPS. Which virtualization type that recomended for django? And which virtualization type that recommended

Re: Model design question

2012-05-17 Thread Mike Dewhirst
On 18/05/2012 7:02am, oneroler wrote: I'm trying to setup my first app and I'm trying to figure out the best way to have constraints on a particular field (strategy for class Division noted below). Below is the basic model structure. What I would like is for the strategy under a Division to

Re: Can't locate 'media' directory

2012-05-17 Thread Min Hong Tan
hi, you may try this way. in your settings.py import os ROOT_PATH = 'c:/project/ajax_tut' # take note. need to use black slash. On Thu, May 17, 2012 at 12:31 AM, Venkat Rangan wrote: > No, this did not work. Is there a way to print what the ROOT_PATH is, on > an

Re: Process Related Object when Saving

2012-05-17 Thread Marc Aymerich
On Wed, May 16, 2012 at 7:15 AM, ghachey wrote: > Hi again; > > Looking at the source code I realised that form.save_m2m() must be > called. > > def save_related(self, request, form, formsets, change): > >        form.save_m2m() >        for formset in formsets: >            

url tag: "'str' object has no attribute 'regex'"

2012-05-17 Thread refreegrata
Hello list I know, this question has been posted and resolved before, but the solutions don't work in my situation. I don't know why. When I try to use the "url" tag in any template an exception is raised: "'str' object has no attribute 'regex'" for example, with this I got the error:

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Rafael Durán Castañeda
El 17/05/12 22:11, Chris B escribió: Alright. That makes sense. Thanks everyone On Wednesday, May 16, 2012 4:18:49 PM UTC-7, Chris B wrote: According to the docs on the generic class based views : Each request

Model design question

2012-05-17 Thread oneroler
I'm trying to setup my first app and I'm trying to figure out the best way to have constraints on a particular field (strategy for class Division noted below). Below is the basic model structure. What I would like is for the strategy under a Division to be constrained to the strategies

Re: Newbie Stuck on Django Tutorial 3 - Django Template system

2012-05-17 Thread Daniel Roseman
On Thursday, 17 May 2012 19:39:53 UTC+1, Bob Loblaw wrote: > > I was cruising along fine, but am stuck now... Any help would be > greatly appreciated > > OS: Mac OS X Version 10.6.8 > Python: 2.6.1 > Django: 1.4 > > Issue: system throwing an error message during template rendering when >

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Chris B
Alright. That makes sense. Thanks everyone On Wednesday, May 16, 2012 4:18:49 PM UTC-7, Chris B wrote: > > According to the docs on the generic class based > views > : > >> Each request served by a >>

Re: import error: no model named .....

2012-05-17 Thread Apokalyptica Painkiller
Hello i'm not sure but did you edited your module.py? I'm watching your urls.py and i found this: ('^hello/$,hello), I'm guessing that there is a syntax mistake, it should be " ('^hello/$', hello) why don't you try that. See you 2012/5/17 Tanveer Ali Sha > Hi

Re: Simple multiplication in model's attribute

2012-05-17 Thread Fady Kamal
issue was solved here http://stackoverflow.com/questions/10640565/simple-multiplication-in-models-attribute-django/10640628#comment13795400_10640628 On Thu, May 17, 2012 at 8:27 PM, Dennis Lee Bieber wrote: > On Thu, 17 May 2012 10:22:15 -0700 (PDT), Fady Kamal >

Re: import error: no model named .....

2012-05-17 Thread Nick Legotte
urls.py should look like this from django.conf.urls.defaults import* from wikicamp.views import hello urlpattern = patterns(' ', ('^hello/$',hello), ) On Thu, May 17, 2012 at 12:23 PM, Tanveer Ali Sha wrote: > Hi Apokalyptica Painkiller , > > Here is my urls.py and

Re: import error: no model named .....

2012-05-17 Thread Tanveer Ali Sha
Hi Apokalyptica Painkiller , Here is my urls.py and views.py *URLS.PY* from django.conf.urls.defaults import* from wikicamp.views import hello urlpattern = patterns(' ', ('^hello/$,hello), ) *VIEWS.py* * * *from django.http import HttpResponse* * * *def hello(request):* * return

Re: import error: no model named .....

2012-05-17 Thread Andre Terra
Everyone, please follow these guidelines before asking other questions: https://code.djangoproject.com/wiki/UsingTheMailingList Cheers, AT On Thu, May 17, 2012 at 4:14 PM, Tanveer Ali Sha wrote: > even am getting *page not found* error > > 1.^notes/ > the current

Re: import error: no model named .....

2012-05-17 Thread Tanveer Ali Sha
even am getting *page not found* error 1.^notes/ the current URL,didnt match any of these for that wikicamp example which is available in showmedo.com.. I donno why I getting these error ...??:( On Fri, May 18, 2012 at 12:32 AM, Halit Alptekin wrote: >

Re: How to specify utf8 in models.py

2012-05-17 Thread Nick Legotte
This should answer your question: class Person(models.Model): first_name = models.CharField(max_length=50) last_name = models.CharField(max_length=50) def __unicode__(self): return u'%s %s' % (self.first_name, self.last_name) If you define a __unicode__() method on your

Re: import error: no model named .....

2012-05-17 Thread Halit Alptekin
You should import models into views.py. For Example; from hdyazi.models import * from hdmakale.models import * from hdsayfalar.models import * My models' names are hdyazi,mdmakale,hdsayfalar ... -- *www.halitalptekin.com | Halit Alptekin* -- You received this message because you are

Re: import error: no model named .....

2012-05-17 Thread Apokalyptica Painkiller
Hello, can you show us your views.py and urls.py? See you 2012/5/17 Ali Shaikh > Hey... > > > I am practicing to implement simple examples in django... > > started project with > 1.django-admin.py startproject wikicamp > 2.python manage.py startapp wiki > 3.editing

Re: import error: no model named .....

2012-05-17 Thread Nick Legotte
Copy and paste the stacktrace On May 17, 2012 11:58 AM, "Ali Shaikh" wrote: > Hey... > > > I am practicing to implement simple examples in django... > > started project with > 1.django-admin.py startproject wikicamp > 2.python manage.py startapp wiki > 3.editing the

import error: no model named .....

2012-05-17 Thread Ali Shaikh
Hey... I am practicing to implement simple examples in django... started project with 1.django-admin.py startproject wikicamp 2.python manage.py startapp wiki 3.editing the setting 4.python manage.py syncdb 5.python mange.py runserver till this stage its working fine:) But after

Re: Newbie Stuck on Django Tutorial 3 - Django Template system

2012-05-17 Thread Marcin Tustin
This is your problem: {% else %} Everything between {% and %} is interpreted as template-syntax code. On Thu, May 17, 2012 at 7:39 PM, Bob Loblaw wrote: > I was cruising along fine, but am stuck now... Any help would be > greatly appreciated > > OS: Mac OS X Version

Newbie Stuck on Django Tutorial 3 - Django Template system

2012-05-17 Thread Bob Loblaw
I was cruising along fine, but am stuck now... Any help would be greatly appreciated OS: Mac OS X Version 10.6.8 Python: 2.6.1 Django: 1.4 Issue: system throwing an error message during template rendering when trying to implement Django template system. So I guess I must have a config snag

How to specify utf8 in models.py

2012-05-17 Thread Elim Qiu
In the tutorial poll app, we have models.py like from django.db import models # Create your models here. class Poll(models.Model): question = models.CharField(max_length=200) pub_date = models.DateTimeField('date published') class Choice(models.Model): poll =

Re: Thread safety with view arguments in class based views

2012-05-17 Thread Rafael Durán Castañeda
El 17/05/12 04:51, Jon Paugh escribió: That last part refers to the way /Python/ handles arguments and the like. Whenever you have a complex object, such as an array, Python does not make a new copy of the object each time the view function is called. Instead, it passes a reference to the

Simple multiplication in model's attribute

2012-05-17 Thread Fady Kamal
Hello, I am trying to set a default value for attribute threshold in this code, the threshold should be the current level*50 and this is the model class Level (models.Model): name = models.CharField(max_length=20,null=True, blank=True) description = models.CharField(max_length=20, null=True,

django admin panel list display

2012-05-17 Thread mithesh j.c
Hi Friends, I have added a custom form field in admin panel list display for one of my model and i have been able to save and retrieve the data properly however when i try to save the data for this custom field via actions it throws up an javascript alert "You have unsaved

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-17 Thread Gath
Seems like it does not support Informix!? On May 16, 1:20 pm, Rahul wrote: > IBM_DB_DJANGO-1.0.4 > --- > IBM_DB_DJANGO adaptor enables access to IBM databases from Django > applicationshttp://www.djangoproject.com/. The adaptor is

Re: Visibility images/css from another directories

2012-05-17 Thread Ilian Iliev
This is a bit more general than a Django issue. Are both css directories going to be server under the same URL? What will happend if both of them contain files with the same name? Are you using staticfiles? And more important why do you have these files out of the project, what is the reason to

Re: Distributing Django apps

2012-05-17 Thread Tom Evans
On Tue, May 15, 2012 at 12:31 PM, Steve Kilbane wrote: > I had a look at fagungis, but it didn't seem to be addressing the > issue. I didn't give much detail before, so that's not a surprise. :-) > > So: > > Stage 1: person X develops an open source Django app. > >

Re: Visibility images/css from another directories

2012-05-17 Thread Stone
Sorry, now I have only the dev one for the moment, but for real usage I will have apache2-2.2.22 Best reagards Petr On 17 kvě, 12:01, Ilian Iliev wrote: > Hi, > > can you add some more details. Are you using web server or you have only > the dev one for the moment. If you have

Re: What's the best way to simulate a request?

2012-05-17 Thread Prahlad
To simulate requests I am using following code and works perfect for me: from django.test.client import Client c = Client() response = c.get('/url/you/want/to/request') On Tuesday, July 8, 2008 7:16:54 AM UTC+5:30, Andrew wrote: > > Here's the situation: > > I'm creating an RESTful

TypeError in BaseDatabaseWrapper when starting Django in Jython

2012-05-17 Thread Jindřich Vavruška
Hello, I have a small app/site which runs fine under django development server when started with python as interpreter. When I start the very same thing using jython, I get strange error message: (P.S. my settings.py contain some code to detect and use the correct ENGINE parameter for DATABASE

Re: Visibility images/css from another directories

2012-05-17 Thread Ilian Iliev
Hi, can you add some more details. Are you using web server or you have only the dev one for the moment. If you have web server what is it: Apache, NginX etc.? Best wishes, Ilian Iliev -- eng. Ilian Iliev Web Software Developer Mobile: +359 88 66 08 400 Website: http://ilian.i-n-i.org On

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Dan Santos
1.) When I do this then I get a bunch of cryptic outputs and *"sh: command not found"* errors. And the file isn't downloaded to the host where I executed this command. However the same command worked on my local PC. $ curl

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Alec Taylor
You could wget/curl over a version of http://code.google.com/p/pts-mini-gpl/wiki/StaticPython On Thu, May 17, 2012 at 6:21 PM, Dan Santos wrote: > Sorry I celebrated too early :( not sure if my local webhost can pull it of > entirely? > But they have been very forthcoming

Re: How do you install Django on a shared hosting without root access?

2012-05-17 Thread Dan Santos
Sorry I celebrated too early :( not sure if my local webhost can pull it of entirely? But they have been very forthcoming so far. I've just got SSH access with limited privileges. And saw that I only have Python 2.4 and Django 1.3. But I want to run Django 1.4. And I couldn't setup

Visibility images/css from another directories

2012-05-17 Thread Stone
Dear users, I have a some simple question. Let's say that my project (dJango) is stored on the file system here: /opt/appl/htdocs and media files are stored here: /opt/appl/htdocs/media/css /opt/appl/htdocs/media/images All CSS and images are visible under directory /opt/appl/htdocs w/o problem.

Re: Can't locate 'media' directory

2012-05-17 Thread Venkat Rangan
No, this did not work. Is there a way to print what the ROOT_PATH is, on an HTML page? On Wed, May 16, 2012 at 3:55 PM, Min Hong Tan wrote: > hi, > > your media folder location should be > > /media > > example: your ROOT_PATH is c:\project\ajax_tut > then your media file

Re: New Release of IBM_DB_DJANGO (1.0.4)

2012-05-17 Thread Harold.Miao
good news 2012/5/16 Phang Mulianto > Is the IBM db express free? > > I don't even know ubtil now... > > As django user, this is great news > On May 16, 2012 9:42 PM, "Andre Terra" wrote: > >> I don't even use IBM databases, but I just wanted to say