Directory structure & common functions

2006-08-14 Thread Michal
Hello, I have question about directory structure. Look at this please: / /app1 /app2 /app3 /templates At the root there is files like urls.py, settings.py, etc. There are also many subdirectories with applications, and subdirectory with templates. Now, I have some common

Re: creating a super user

2006-08-14 Thread Bryan Chow
Hi Yun, Make sure that 'django.contrib.admin' is in INSTALLED_APPS in your project's settings.py file. Hope this helps. Bryan On 8/14/06, yun <[EMAIL PROTECTED]> wrote: > I'm currently working through the tutorial using the lastest > development verison of django, downloaded from subversion.

Re: creating a super user

2006-08-14 Thread limodou
On 8/15/06, yun <[EMAIL PROTECTED]> wrote: > > I'm currently working through the tutorial using the lastest > development verison of django, downloaded from subversion. I've > installed django on an Ubuntu 6.06 linux box, and was wondering why I > wasn't prompted to create a super user account whe

creating a super user

2006-08-14 Thread yun
I'm currently working through the tutorial using the lastest development verison of django, downloaded from subversion. I've installed django on an Ubuntu 6.06 linux box, and was wondering why I wasn't prompted to create a super user account when I first tryed '>manage.py syncdb'. I ask, because I

Re: Django neophyte question.

2006-08-14 Thread limodou
On 8/15/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/14/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > > > Hi Gloria. > > > > welcome to django. > > Heheh. Welcome indeed. 10 helpful answers in under 20 minutes. ;-) > My GOD! -- I like python! My Blog: http://www.donews.net/limodou My

Re: Django neophyte question.

2006-08-14 Thread Jeremy Dunck
On 8/14/06, Ian Holsman <[EMAIL PROTECTED]> wrote: > > Hi Gloria. > > welcome to django. Heheh. Welcome indeed. 10 helpful answers in under 20 minutes. ;-) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django

Re: Django neophyte question.

2006-08-14 Thread Scott Anderson
Gloria, Try: python manage.py runserver dev.blah.server.com: or python manage.py runserver 11.22.33.44: where 11.22.33.44 is the external numeric IP address of dev.blah.server.com. Regards, -scott On Mon, 2006-08-14 at 20:11 -0700, Gloria wrote: > Hi. I am a Python geek who has bee

Re: Django neophyte question.

2006-08-14 Thread Jay Klehr
When I run the dev server from my remote server, I do it like this: python manage.py runserver my.domainname.com:8000 Then I can access it through http://my.domainname.com:8000 my.domainname.com isn't setup anywhere else either (like in Apache or anything), but www.domainname.com is. Jay Glo

Re: Django neophyte question.

2006-08-14 Thread Ian Holsman
Hi Gloria.welcome to django.you need to specify the ip# when you run the development server, otherwise it will run on 127.0.0.1 (localhost)which can not be accessed from outside the machine.try> django-admin.py runserver 192.168.1.2:or > django-admin.py runserver dev.blah_server.com:and it

Re: Django neophyte question.

2006-08-14 Thread Bryan Chow
Hi Gloria, For the Django development server to be accessible externally, you must specify the IP address or 0.0.0.0, e.g. manage.py runserver 0.0.0.0: Hope this helps. Bryan On 8/14/06, Gloria <[EMAIL PROTECTED]> wrote: > Hi. I am a Python geek who has been in the CherryPy/PythonPaste w

Re: Django neophyte question.

2006-08-14 Thread Jeremy Dunck
On 8/14/06, Gloria <[EMAIL PROTECTED]> wrote: > > Hi. I am a Python geek who has been in the CherryPy/PythonPaste world > for the past year. I have decided to give Django a serious look, and I > have a simple question. > > After running this command: > > [EMAIL PROTECTED] wi_2> python manage.py ru

Re: Django neophyte question.

2006-08-14 Thread limodou
On 8/15/06, Gloria <[EMAIL PROTECTED]> wrote: > > Hi. I am a Python geek who has been in the CherryPy/PythonPaste world > for the past year. I have decided to give Django a serious look, and I > have a simple question. > > After running this command: > > [EMAIL PROTECTED] wi_2> python manage.py ru

Django neophyte question.

2006-08-14 Thread Gloria
Hi. I am a Python geek who has been in the CherryPy/PythonPaste world for the past year. I have decided to give Django a serious look, and I have a simple question. After running this command: [EMAIL PROTECTED] wi_2> python manage.py runserver Validating models... 0 errors found. Django ve

Re: Django 0.95 on Dreamhost

2006-08-14 Thread Apple
> i know this sounds stupid, but could you start from the beginning again, > and try it exactly like Jeff's tutorial says? I tried this approach. I followed every step from Jeff's tutorial (even with same subdomain and directories for django projects & src etc). At the end I still get the same

Re: A google search engine front end in django - Tutorial

2006-08-14 Thread [EMAIL PROTECTED]
I've been using the SOAP way in PHP. This web_search module is so simple so I've used it to make some tutorials. It can search in few engines and dmoz so it could be usefull sometimes. --~--~-~--~~~---~--~~ You received this message because you are subscribed to t

Re: VMWare image for running/developing Django

2006-08-14 Thread Michael
Hi all,It is posssible to setup Qemu ( platform independent ) http://fabrice.bellard.free.fr/qemu/and run djanog on it.I've test in with debian etch ,python2.3.5 ,django-trunk+sqlite3, no apache -run as django dev server.The whole image around 200mb with qcow  compressed formatwithout compr = 449mb

Re: Perplexing many-to-many template error (bug?)

2006-08-14 Thread SmileyChris
I forgot to mention, from a shell I can access the M2M property fine, so it seems like a template problem: >>> p = Person.objects.get(pk=1) >>> p >>> p.projects >>> p.projects.all() [] --~--~-~--~~~---~--~~ You received this message because you are subscribed t

Re: subdomains in django

2006-08-14 Thread Ian Holsman
I'm not sure what you are asking.what do you want django to do with the subdomain?if it is a different site, you can do this via virtual hosts in apache.if you bob.example.com to be 'bobs' blog and 'sue.example.com' to be sue's blogyou can acomplish this via mod-rewrite without having to resort to

subdomains in django

2006-08-14 Thread a
can you point out how to do this in django and in python thanks a bunch --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To uns

javascript options

2006-08-14 Thread a
guys i m trying to figure out which javascript toolkit to use i m now trying to figure out which to use between The major contenders are: Dojo Mochikit and prototype [rails fame] i would love to find out which is very pythonic and clean if you can also tell about your experience of using one of

Perplexing many-to-many template error (bug?)

2006-08-14 Thread SmileyChris
Perplexing many-to-many problem === When attempting to iterate a many-to-many relationship of a context variable, I am receiving a weird template error. Any help would be greatly appreciated! My Models - Person() projects = models.ManyToManyField(Task, bla

Re: 1062, "Duplicate entry '1' for key 2"

2006-08-14 Thread Malcolm Tredinnick
On Mon, 2006-08-14 at 22:42 +, cyberco wrote: > Somehow creating 2 instances of a model constantly gives me the > following error: > > -- > 1062, "Duplicate entry '1' for key 2" > -- > > The code in the view method is: > > -- > def new(request): > t = T(userID=request.us

Re: list_display containing ForeignKey create a dead loop.

2006-08-14 Thread Malcolm Tredinnick
On Mon, 2006-08-14 at 09:03 -0700, 一首诗 wrote: > Hi all, > > I met a problem. > > When I added a Foreign Key field to list_display, django falls into a > dead loop and used up memories. > > When I removed the field, it's all OK. > > I don't think it's my code's problem because I've tested the _

Re: A google search engine front end in django - Tutorial

2006-08-14 Thread Deryck Hodge
On 8/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > I've just finished a tutorial about a simple google front end in > Django. > read it on the wiki: http://code.djangoproject.com/wiki/searchengine Hi. Interesting stuff. I've done a bit of Google hacking myself and I'd caution against

Re: Strange 'caching' issue

2006-08-14 Thread Malcolm Tredinnick
On Mon, 2006-08-14 at 10:40 -0700, hernan43 wrote: > First let me say that I loathe using the term 'caching' to describe > this problem as it probably has nothing to do with caching. But my > primitive vocabulary is at a loss for a better word. > > I have a very simple Django blog app that I'm us

Question and a problem about FileField

2006-08-14 Thread Vizcayno
Question: === After saving a record that includes a file attachment (in a FileField), how can I open the the attached file directly from my django application? Problem: == Please, check next model.py: from django.db import models from django.db import models class MaeDocs(models.Model):

1062, "Duplicate entry '1' for key 2"

2006-08-14 Thread cyberco
Somehow creating 2 instances of a model constantly gives me the following error: -- 1062, "Duplicate entry '1' for key 2" -- The code in the view method is: -- def new(request): t = T(userID=request.user.id) t.save() -- It seems that userID should be unique, but

Re: Django 0.95 on Dreamhost

2006-08-14 Thread gabor
Apple wrote: > >>> python hello.fcgi > output: > WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! > WSGIServer: missing FastCGI param SERVER_NAME required by WSGI! > WSGIServer: missing FastCGI param SERVER_PORT required by WSGI! > WSGIServer: missing FastCGI param SERVER_PROTOC

A google search engine front end in django - Tutorial

2006-08-14 Thread [EMAIL PROTECTED]
I've just finished a tutorial about a simple google front end in Django. read it on the wiki: http://code.djangoproject.com/wiki/searchengine --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Re: Re: Odd error with ./manage.py runserver

2006-08-14 Thread Jon Atkinson
Jeremy, Thanks for the solution, I had a module in middleware_classes rather than installed_apps. --Jon On 14/08/06, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > On 8/14/06, Jon Atkinson <[EMAIL PROTECTED]> wrote: > > TypeError: 'module' object is not callable > > > > If I hit reload, everything

Re: Shell not picking up db changes

2006-08-14 Thread cyberco
Wow, that does the trick! Thank you very much. I'm not exactly sure what this command does, though --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to djang

Re: Strange 'caching' issue

2006-08-14 Thread hernan43
I don't think this is it. If I restart Apache then the post will appear. I would think that it had to do with my browser's cache, but clearing the cache doesn't help, plus if I use a browser that has never been to my site, I have the same problem. It almost seems as if the response is cached some

Re: Strange 'caching' issue

2006-08-14 Thread Rock
I forget the details, but this has something to do with your time and/or timezone setup. The default blog app doesn't post items that are set "in the future". The time you set by seleting "now" in the admin may or may not be the time that you think it should be because of the server clock and time

Re: How would I do this with Djangol?

2006-08-14 Thread John M
HBTaylor wrote: > I'm not sure about your models, but I assume it is something like the > following: > > from django.db import models > > class Holding(models.Model): > symbol = models.CharField(maxlength=10) > > def __str__(self): > return self.symbol > > def _get_latest_pric

Re: SuspiciousOperation: User tampered with session cookie

2006-08-14 Thread Tom Davis
Although old, I'd like to point out that at least in my case this wasn't a Dapper + PHP5 issue, it was a Deb + PHP5 issue, so the problem seems to lie with the PHP5/Django pairing. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the G

Re: EnvironmentError?

2006-08-14 Thread Steven Armstrong
On 08/14/06 18:55, Tom Davis wrote: > I am having a problem getting Django to work properly on my server. I > have Apache setup with mod_python using Python 2.4. I put in the > Location stuff in my Apache config, and when I go to the directory I > get this: >

Strange 'caching' issue

2006-08-14 Thread hernan43
First let me say that I loathe using the term 'caching' to describe this problem as it probably has nothing to do with caching. But my primitive vocabulary is at a loss for a better word. I have a very simple Django blog app that I'm using to learn more about the Django framework. I notice that w

EnvironmentError?

2006-08-14 Thread Tom Davis
I am having a problem getting Django to work properly on my server. I have Apache setup with mod_python using Python 2.4. I put in the Location stuff in my Apache config, and when I go to the directory I get this: --- Mod_python error: "PythonHandl

Re: Anyone at LinuxWorld next week?

2006-08-14 Thread Deryck Hodge
On 8/12/06, Deryck Hodge <[EMAIL PROTECTED]> wrote: > I put in for space for a BOF yesterday, but I haven't heard anything > yet. I don't know if it being such short notice will be a problem or > not. When I hear something, I'll let you know. BOFs don't start > until Tuesday night, so even if I

Re: Odd error with ./manage.py runserver

2006-08-14 Thread Jeremy Dunck
On 8/14/06, Jon Atkinson <[EMAIL PROTECTED]> wrote: > TypeError: 'module' object is not callable > > If I hit reload, everything starts to work fine again, but it's > annoying to have to reload my browser twice after each change I make. > Any ideas? It looks like you've specified a module instead

list_display containing ForeignKey create a dead loop.

2006-08-14 Thread 一首诗
Hi all, I met a problem. When I added a Foreign Key field to list_display, django falls into a dead loop and used up memories. When I removed the field, it's all OK. I don't think it's my code's problem because I've tested the __str__ function of both models related by the Foreign Key. Could

Re: Django 0.95 on Dreamhost

2006-08-14 Thread Apple
> generally this means that you should put in some url-rewriting... hm.. maybe this has something to do with it. I got the following warnings prior to the index exception WSGIServer: missing FastCGI param REQUEST_METHOD required by WSGI! WSGIServer: missing FastCGI param SERVER_NAME required by

Re: Shell not picking up db changes

2006-08-14 Thread Miguel Hernández
Hi cyberco,On 8/13/06, cyberco <[EMAIL PROTECTED]> wrote:> Is there a way to pick up the changes without restarting the shell? Try to commit the current transaction:import django.dbdjango.db.connection._commit()-- Obstáculos es lo que ves cuando apartas la vista del objetivo. --~--~-~--~---

Re: cache anonymous error with request.user ?

2006-08-14 Thread Nebojsa Djordjevic
[EMAIL PROTECTED] wrote: > MIDDLEWARE_CLASSES = ( > 'django.middleware.cache.CacheMiddleware', > 'django.middleware.common.CommonMiddleware', > 'django.contrib.sessions.middleware.SessionMiddleware', > 'django.contrib.auth.middleware.AuthenticationMiddleware', > 'django.middlew

Odd error with ./manage.py runserver

2006-08-14 Thread Jon Atkinson
Hi, I'm getting a strange error when I run my application via the built in testing server. Each time I modify a source file, and the server reloads my views, the first request I make to the server prints the following to stderr: Traceback (most recent call last): File "/sw/lib/python2.4/site-

Re: Shell not picking up db changes

2006-08-14 Thread cyberco
Yes, but the disadvantage of using 'import x.y.z as mymodel' instead of 'import x.y.z'b is that instead of using a = A() I have to say a = mymodel.A(). --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users"

Re: custom manipulator - TextField or SelectField in RadioSelectField?

2006-08-14 Thread Chris Kelly
Hi John,thanks for the response. I was thinking about this overnight and I'd have to agree, it'd probably be best to use a "hybrid" approach as you were mentioning (I'm already breaking out the radiobuttons into an on-template loop: it wouldn't be much more than that, I'd assume). thanks again,-Chr

Re: custom manipulator - TextField or SelectField in RadioSelectField?

2006-08-14 Thread John Sutherland
Hi Chris, I'd say there were two ways to handle this. The data that you really want is the number of rows, you radios are really just to help the user choose a value. Option #1 -- Use a custom field. You can create your own custom field type, but this is probably overkill for this application.

Re: Authentication, error "DoesNotExist at /accounts/login/", part 2

2006-08-14 Thread James Bennett
On 8/14/06, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > 1. Created a new site > 2. Removed example.com from the list of sites > 3. Tried to use authentication and got the error "DoesNotExist at > /accounts/login/" > 4. Deleted and rebuilt the database, authentication works. Did you actually de

Re: Shell not picking up db changes

2006-08-14 Thread Jeff Forcier
However, keep in mind Pedro's example, where he uses "import x.y.z as a" and then later calls "reload(a)". In other words, using the "as" functionality of import lets you have the best of both worlds--reload() will work, and you can still get a single-word binding in your namespace for your Model

Authentication, error "DoesNotExist at /accounts/login/", part 2

2006-08-14 Thread Andres . Luga
Hi, the following happened to me also: 1. Created a new site 2. Removed example.com from the list of sites 3. Tried to use authentication and got the error "DoesNotExist at /accounts/login/" 4. Deleted and rebuilt the database, authentication works. Regards, Andres blue_beastie wrote on 29 Jun 2

Re: Can i have a field to be set as current user id automatically in admin ?

2006-08-14 Thread Bryan Chow
I believe that this is currently not supported in admin. Some users have worked around this limitation by stashing the User object in thread local storage. http://code.djangoproject.com/wiki/CookBookThreadlocalsAndUser http://lukeplant.me.uk/blog.php?id=1107301634 Bryan On 8/14/06, yi huang

Can i have a field to be set as current user id automatically in admin ?

2006-08-14 Thread yi huang
Something like auto_now option of DateField , Can i have a 'auto_current_user' field ?thanks. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@goo

Re: imbricated tags

2006-08-14 Thread Laundro
The French word "imbriqué" means embedded :) --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, s

Re: Chain filters on ManyToManyField

2006-08-14 Thread Laundro
I'm working from the top of my head here (I'm at work), but wouldn't ANDing two Q's be a solution? I remember having constructed a QuerySet of two Q's &'ed together, as in qs = (Q() & Q()), and then evaluating qs. --~--~-~--~~~---~--~~ You received this message be

Re: Django 0.95 on Dreamhost

2006-08-14 Thread Gábor Farkas
Apple wrote: > Hi has anyone tried running Django 0.95 on Dreamhost? I only tried to > setup a simple project following the dreamhost's wiki. I am getting a > string index out of range exception on common.py: hi, generally this means that you should put in some url-rewriting... just for the

Re: Getting properties of parent objects into a template

2006-08-14 Thread mediumgrade
And I am a 'tard. I had pluralized the name of my author foreign key so that the actualy name of the foreign key was "authors" and not "author". Once I used {{ entry.authors.name }}, everything was fine. Still learning here, Dave --~--~-~--~~~---~--~~ Yo

Re: Getting properties of parent objects into a template

2006-08-14 Thread limodou
On 8/14/06, mediumgrade <[EMAIL PROTECTED]> wrote: > > Yes, that would be the relationship and that was actually the first > thing I tried. The template gets passed an "array" of "entry" objects. > Within the template, I loop through them printing the headline, portion > of the body, and the creat