Re: Newbie Question about django-admin.py startproject

2010-06-22 Thread Sam Lai
'import django' is a command for the Python interpreter. 'django-admin.py startproject testsite' is a standard shell command. Just open up a console window, and type the latter into it. If it doesn't work, it means your PATH variable doesn't contain the Django sources. On 23 June 2010 15:27, Jac

Newbie Question about django-admin.py startproject

2010-06-22 Thread Jacob Shiach
Ok, I am trying to start a project with Django and failing miserably. I open Python IDLE, Type "import django" then type "django-admin.py startproject testsite" and get a SyntaxError:invalid syntax. Does anyone know where I am going wrong here? Note: I installed both Python 2.6.5 and Djang 1.1.

Re: not able to install django development version

2010-06-22 Thread Kenneth Gonsalves
On Wednesday 23 June 2010 10:07:48 samie wrote: > could not conn > ect to server (http://code.djangoproject.com)"" > check your internet connection -- Regards Kenneth Gonsalves Senior Associate NRC-FOSS at AU-KBC -- You received this message because you are subscribed to the Google Groups "Dj

Re: not able to install django development version

2010-06-22 Thread samie
On Jun 22, 6:41 pm, Horst Gutmann wrote: > The checkout works for me. Are you perhaps behind some HTTP proxy or > firewall that blocks certain HTTP commands? You could also try one of > the project mirrors on github or bitbucket. Perhaps you have more luck > downloading one of these: > > http://

Re: not able to install django development version

2010-06-22 Thread samie
On Jun 22, 5:32 pm, Simon Brunning wrote: > On 22 June 2010 12:33, samie wrote: > > > sir i am not able to install django development version on my machine > > i am using vista 32 basic.. > > > problem is occurring during svn checkout command,, > > And the problem is? > > -- > Cheers, > Simon B

Re: Forms - Widget - Radioselect - how to set initial value on a static form

2010-06-22 Thread Karen Tracey
On Tue, Jun 22, 2010 at 9:46 PM, Roboto wrote: > I can't seem to find documentation on this anywhere, so I imagine > someone must have run into this. > > if I had a radioselect Yes / No and I wanted the default value to be > 'No', but I'm not loading this data from a database or anything, is > th

Re: Deploying Django with mod_wsgi

2010-06-22 Thread Graham Dumpleton
On Jun 23, 2:35 am, commonzenpython wrote: > it turns out i have the __init__.py , so i changed the path as you > suggested but now i get this error : > > MOD_PYTHON ERROR > > ProcessId:      12182 > Interpreter:    'ashtangayogavideo.com' > > ServerName:     'ashtangayogavideo.com' > DocumentRo

Re: Fields validating as optional

2010-06-22 Thread Jonathan Hayward
Thanks, Dan and Daniel. On Tue, Jun 22, 2010 at 3:45 PM, Daniel Roseman wrote: > On Jun 22, 9:11 pm, Jonathan Hayward > wrote: > > What is the preferred way to make e.g. a TextField that will pass > validation > > if it is left empty? I've seen two approaches apparently referenced in > the > > d

Forms - Widget - Radioselect - how to set initial value on a static form

2010-06-22 Thread Roboto
I can't seem to find documentation on this anywhere, so I imagine someone must have run into this. if I had a radioselect Yes / No and I wanted the default value to be 'No', but I'm not loading this data from a database or anything, is there a method to just insert an initial value so that the htm

How to options by limited_choices_to ?

2010-06-22 Thread cat in a tub
Hi All, I want to built a django application for hardware compatibility testing Some hardwares are compatible with certain mother board. And attributes of each hardware are different (I use a ugly table to store attributes), which are compatible with Hardware types, such as MEM as SIZE, HDD has Fi

virtual currency / check-in apps

2010-06-22 Thread Greg Pelly
Can anyone recommend any apps/tools for implementing either virtual currency or "check-ins" in Django? Thanks, Greg -- 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 unsubscr

Search near people with geoposition or charfield

2010-06-22 Thread Alexandre González
Hi! I like to user something as django-people have to search people near to me. I have a charfield in my model that could be a address as "Salamanca, Spain" or a GPS position sended by the mobile app. Where can I start to read about that? And please, don't say me that read the django-people code

Re: Fields validating as optional

2010-06-22 Thread Daniel Roseman
On Jun 22, 9:11 pm, Jonathan Hayward wrote: > What is the preferred way to make e.g. a TextField that will pass validation > if it is left empty? I've seen two approaches apparently referenced in the > documentation: > >     additional_comments = models.TextField(required = False) > >     addition

Re: Fields validating as optional

2010-06-22 Thread Dan Harris
Jonathan, I think what you are running into is the differences between how models are declared vs how forms are declared. In models you declare the fields as blank=True and/or null=True to specify that the data stored in the database can be left blank. Something like this: class MyModel(models.Mo

Fields validating as optional

2010-06-22 Thread Jonathan Hayward
What is the preferred way to make e.g. a TextField that will pass validation if it is left empty? I've seen two approaches apparently referenced in the documentation: additional_comments = models.TextField(required = False) additional_comments = models.TextField(blank = True) and run int

Re: Random

2010-06-22 Thread Javier Guerra Giraldez
On Tue, Jun 22, 2010 at 12:30 PM, Waleria wrote: > my application doesn't use DBnot able to do this without using the > Random? ... without DB? you only need some unique identifier. it can be random, or an UUID, if you can track it, maybe in a cookie, or passed on URL parameters, or if you'r

Re: Random

2010-06-22 Thread Waléria Antunes David
in my application the file .dat and the image...i save in a directory in my computer.so i'm having problem when two people access the same time. On Tue, Jun 22, 2010 at 3:01 PM, orokusaki wrote: > Name each person's files using: > > import uuid > filename = uuid.uuid4() > > > On Jun 22,

Re: Random

2010-06-22 Thread Waléria Antunes David
i don't understand... On Tue, Jun 22, 2010 at 3:01 PM, orokusaki wrote: > Name each person's files using: > > import uuid > filename = uuid.uuid4() > > > On Jun 22, 11:30 am, Waleria wrote: > > my application doesn't use DBnot able to do this without using the > > Random? ... without DB? >

Re: Random

2010-06-22 Thread orokusaki
Name each person's files using: import uuid filename = uuid.uuid4() On Jun 22, 11:30 am, Waleria wrote: > my application doesn't use DBnot able to do this without using the > Random? ... without DB? > > On 22 jun, 14:22, Javier Guerra Giraldez wrote: > > > On Tue, Jun 22, 2010 at 12:11 PM,

Re: Random

2010-06-22 Thread Waleria
my application doesn't use DBnot able to do this without using the Random? ... without DB? On 22 jun, 14:22, Javier Guerra Giraldez wrote: > On Tue, Jun 22, 2010 at 12:11 PM, Waleria wrote: > > I have a system that generate graphs and files .dat. However,  i'm > > having a problem, when two

Re: Random

2010-06-22 Thread Javier Guerra Giraldez
On Tue, Jun 22, 2010 at 12:11 PM, Waleria wrote: > I have a system that generate graphs and files .dat. However,  i'm > having a problem, when two people access the system simultaneously may > happen that the graph of a person to replace the second person, what > can I do to make it not happen?

Random

2010-06-22 Thread Waleria
Hello Guys, I have a system that generate graphs and files .dat. However, i'm having a problem, when two people access the system simultaneously may happen that the graph of a person to replace the second person, what can I do to make it not happen? -- You received this message because you are

Re: Question regarding subdomains of a single project

2010-06-22 Thread orokusaki
Oh my god! Thanks Dan. I didn't know you could do this. That is absolutely perfect. Mark On Jun 22, 9:38 am, Dan Harris wrote: > Check out this from djangosnippets:http://djangosnippets.org/snippets/1509/ > > It allows you to specify multiple URLconfs and then choose which you > are going to use

Re: Deploying Django with mod_wsgi

2010-06-22 Thread commonzenpython
it turns out i have the __init__.py , so i changed the path as you suggested but now i get this error : MOD_PYTHON ERROR ProcessId: 12182 Interpreter:'ashtangayogavideo.com' ServerName: 'ashtangayogavideo.com' DocumentRoot: '/home/ashtanga/public_html' URI:'/ash/' Loc

Re: Question regarding subdomains of a single project

2010-06-22 Thread Dan Harris
Check out this from djangosnippets: http://djangosnippets.org/snippets/1509/ It allows you to specify multiple URLconfs and then choose which you are going to use based on the domain name. This would mean that each of your subdomain gets a different URLconf which sounds like what you may be lookin

Re: Question regarding subdomains of a single project

2010-06-22 Thread Venkatraman S
On Tue, Jun 22, 2010 at 8:06 PM, M Rotch wrote: > I'm setting up a website with multiple subdomains, and one thing I > notice right away (and is expected) is that each subdomain has access > to all of the URLs of the website (of course some will require logins > still). > > hmmm. I think its the

Re: Sorting objects according to a field from a foreign field

2010-06-22 Thread Benedict Verheyen
On 22/06/2010 16:42, Daniel Roseman wrote: > > As described in the documentation [1], you use the double-underscore > syntax for sorting across relationships. > Call.objects.all().order_by('-priority__weight') > > [1]:http://docs.djangoproject.com/en/1.2/ref/models/querysets/#order- > by-fiel

Re: Sorting objects according to a field from a foreign field

2010-06-22 Thread Daniel Roseman
On Jun 22, 3:34 pm, Benedict Verheyen wrote: > I have an issue sorting objects. > First, let me explain the models i'm using: > > class Call(models.Model): >     ... >     priority = models.ForeignKey(Priority) > > class Priority(models.Model): >     title=models.CharField(max_length=30) >     des

Question regarding subdomains of a single project

2010-06-22 Thread M Rotch
I'm setting up a website with multiple subdomains, and one thing I notice right away (and is expected) is that each subdomain has access to all of the URLs of the website (of course some will require logins still). If I have: http://fooaccount.projectmanagersoftware.com I wouldn't want them to

Sorting objects according to a field from a foreign field

2010-06-22 Thread Benedict Verheyen
I have an issue sorting objects. First, let me explain the models i'm using: class Call(models.Model): ... priority = models.ForeignKey(Priority) class Priority(models.Model): title=models.CharField(max_length=30) description=models.CharField(max_length=255) weight=models.Inte

Re: Deploying Django with mod_wsgi

2010-06-22 Thread backdoc
nothing. it's empty On Tue, Jun 22, 2010 at 8:41 AM, commonzenpython wrote: > thanks, but what should be inside the __init__.py file ? > > -- > 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...@go

Re: Deploying Django with mod_wsgi

2010-06-22 Thread commonzenpython
thanks, but what should be inside the __init__.py file ? -- 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: not able to install django development version

2010-06-22 Thread Horst Gutmann
The checkout works for me. Are you perhaps behind some HTTP proxy or firewall that blocks certain HTTP commands? You could also try one of the project mirrors on github or bitbucket. Perhaps you have more luck downloading one of these: http://github.com/django/django http://bitbucket.org/mirror/dj

Re: not able to install django development version

2010-06-22 Thread Simon Brunning
On 22 June 2010 12:33, samie wrote: > sir i am not able to install django development version on my machine > i am using vista 32 basic.. > > problem is occurring during svn checkout command,, And the problem is? -- Cheers, Simon B. -- You received this message because you are subscribed to t

not able to install django development version

2010-06-22 Thread samie
sir i am not able to install django development version on my machine i am using vista 32 basic.. problem is occurring during svn checkout command,, plz help me out.. "" C:\Python26\development\python>svn co http://code.djangoproject.com/svn/django/t runk/ django-trunk svn: OPTIONS of 'http:/

re need to hire at programmer

2010-06-22 Thread Martino
I need a programmer expert in web python Django and know how to integrate with front end CSS3 Please send me an email or call me Martin, 310.592.8152 mvinc...@sgprollc.com http://sgprollc.com -- You received this message because you are subscribed to the Google Groups "Django users" group. T

Django-registration and backend

2010-06-22 Thread Pep
Hi everybody ! I'm installing django-registration but I have a problem in my server while it works with the runserver. When I want to go to the register view, the debug mode tell me that : register() got an unexpected keyword argument 'backend' Anybody have an idea ? Thanks ! PEP -- You rece

RE: Django-Mysql

2010-06-22 Thread Sells, Fred
I had no problem configuring it under CentOs, have not tried Windows (yet) but here's my settings file DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'mds30', 'USER': '', # Not used 'PASSWORD'

Re: Force ContentType id

2010-06-22 Thread donato.gr
Thanks, I'll have a look On 22 Giu, 11:01, Simon Brunning wrote: > On 22 June 2010 09:58, donato.gr wrote: > > > I found some topics about tools such as 'django evolution' but I was > > wondering if Django itself provides a simpler way to make simple > > alterations... > > It's not built in to D

Re: escapejs inside {% trans %}

2010-06-22 Thread donato.gr
Thanks, I'll try it! On 21 Giu, 15:19, Tom Evans wrote: > On Mon, Jun 21, 2010 at 2:17 PM, donato.gr wrote: > > Hi, > > I had this code in a template file: > > alert('{% trans "a string" %}') > > > It gave error when translated bacause the translated string had a ' > > inside. So, I replaced " w

Re: outer join in orm

2010-06-22 Thread euan.godd...@googlemail.com
I concur about the weakness in Django, when it is, as you say, a relatively simple SQL statement to pull in that data. I'd go for the list comp idea if you've got a small data set. Alternatively you could select all the answers and then use itertools.groupby to group by question. That's also effic

Re: Django-Mysql

2010-06-22 Thread euan.godd...@googlemail.com
Do you absolutely need to use MySQL? I've found for development that sqlite is the most hassle-free. I use OS X for development at home and it is the easiest option. The only drawback is that if you have multiple clients accessing the DB you can get locking issues. If it's just you, then you're sor

Re: Django c _imaging module not installed

2010-06-22 Thread euan.godd...@googlemail.com
Are you doing some image related work in Django admin? We have had lots of trouble with libjpeg and PIL. We use PIL 1.1.6 and libjpeg 6. Our install process requires using apt to install the libjpeg62-dev package before installing PIL 1.1.6. If you're using a Debian based OS, I'd remove your cust

django-autofixture giving import error (no module named keyczar)

2010-06-22 Thread watad
hi all did anyone used django-autofixture , i followed the instructions on this link : http://pypi.python.org/pypi/django-autofixture/0.2.2 i installed django-autofixture added the 'autofixture' to my INSTALLED_APPS for example my app name is company , my model name is product i use this command :

Re: Force ContentType id

2010-06-22 Thread Simon Brunning
On 22 June 2010 09:58, donato.gr wrote: > I found some topics about tools such as 'django evolution' but I was > wondering if Django itself provides a simpler way to make simple > alterations... It's not built in to Django, but it sounds like you want South - . -- Ch

Re: Force ContentType id

2010-06-22 Thread donato.gr
Thank you, your explanation was very clear and useful. > > Or, is there a way to run a syncdb to apply changes without losing > > data? Our software product is under development and sometimes we have the need to change a model definition (e.g. rename a field or change its definition): is there a

Django c _imaging module not installed

2010-06-22 Thread appel268576
Hi there. For the last week or so I have been having real issues with getting Django / python and libjpeg to play nice. However successfully followed loads of threads and comments and got my own solution. Secondly I have applied this solution so that it works successfully on my production server.

Re: One to many django pagination

2010-06-22 Thread jx jx
Oh, i guess i didn't define my models using the "through" relationship. Thanks for the help! :) On Tue, Jun 22, 2010 at 4:10 PM, euan.godd...@googlemail.com < euan.godd...@gmail.com> wrote: > If i understand you correctly you've got a couple of solutions. You > can define a "through" relationship

Re: djapian not working with apach2

2010-06-22 Thread watad
thanks a lot Graham!!! :) i used absolute path and it is working fine On Jun 22, 3:01 am, Graham Dumpleton wrote: > On Jun 22, 12:03 am, watad wrote: > > > > > > > hi all, > > > im using djapian for my search , it seems to work fine when i run it > > in django development server > > but when i c

Re: djapian not working with apach2

2010-06-22 Thread watad
thanks Skylar i have used chmod 777 -R for /index , but it didnt work maybe because as u said the owner of the web process is different than the user im using anyway i used the absolute path as Graham suggested down and it is working fine thank you for your quick response On Jun 21, 9:59 pm, Skyl

Re: automatic documentation (docutils) does not pull in class methods?

2010-06-22 Thread euan.godd...@googlemail.com
You could try using Spinhx if you don't think docutils gives you enough flexibility. The autodoc extension is great. On Jun 22, 5:24 am, pk wrote: > Answering my own question -- it is django.contrib.admindocs.view that > limits the admindocs view to only list methods on a model that has a > singl

Re: One to many django pagination

2010-06-22 Thread euan.godd...@googlemail.com
If i understand you correctly you've got a couple of solutions. You can define a "through" relationship between Student and Teacher usinf Techer_profile as the "through" table (http://docs.djangoproject.com/ en/dev/topics/db/models/#extra-fields-on-many-to-many-relationships). Then you should be ab

Re: Deploying Django with mod_wsgi

2010-06-22 Thread Kenneth Gonsalves
On Tuesday 22 June 2010 11:08:00 commonzenpython wrote: > PythonPath "['/home/ashtanga/public_html/ash'] + sys.path" > PythonPath "['/home/ashtanga/public_html/'] + sys.path" and make sure you have an __init__.py file in your 'ash' directory -- Regards Kenneth Gonsalves Senior Associate NRC-FOS

Re: Deploying Django with mod_wsgi

2010-06-22 Thread commonzenpython
thanks, i have read your post and i am beginning to understand this better, i am also trying mod_python as an alternative my project path is the same /home/ashtanga/public_html/ash insdie the ash is my Django project and iside it i have my settings.py and urls.py, i have added the following script

Django-Mysql

2010-06-22 Thread Eduan
When installing Django-Mysql i get this error. I thought it was because I didn't have setuptools. But now I downloaded it and installed it. I am running windows 7 home basic. Here is all the apps versions: Django-1.2.1 MySQL-python-1.2.3 Python 2.6 mysql-5.5.3-m3-win32 This is the error I get: s