Re: about DJANGO_SETTINGS_MODULE

2007-08-26 Thread Graham Dumpleton
On Aug 27, 11:53 am, "James Bennett" <[EMAIL PROTECTED]> wrote: > On 8/26/07, z_axis <[EMAIL PROTECTED]> wrote: > > > File "d:\app\python\Lib\site-packages\django\db\__init__.py", line 7, in > > > le> > > if not settings.DATABASE_ENGINE: > > The lines above tell you what the problem is:

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Brandon Taylor
Hi Joe, Thanks for your help. I don't know how I missed it before, but I grabbed the Python 2.5.1 Universal installer for OS X and replaced my earlier version. I grabbed the 0.96 tarball and installed it into 2.5.1 and viola, it works! Now I'm on to the first tutorial. I'm very excited to see

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Joseph Heck
Use the path settings from my earlier post - that fits perfectly with MacPorts and should do you. -joe On 8/26/07, Brandon Taylor <[EMAIL PROTECTED]> wrote: > > Hi everyone, > > I scrapped my custom install of Python 2.4.4 and Django in favor of an > install from MacPorts. So, now I have Python

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Brandon Taylor
Hi everyone, I scrapped my custom install of Python 2.4.4 and Django in favor of an install from MacPorts. So, now I have Python 2.5.1 and Django installed. But, now when I run python in bash, I get version 2.3.5. Mac Ports has insalled everything to /opt/local/var/macports/software I have

is 40 MB RAM enough?

2007-08-26 Thread Kenneth Gonsalves
Hi, I have a site on WebFaction with 40 MB RAM. It is a very small site in the sense that it is used for administering an organisation, so would have just 2-3 users at a time, mainly doing admin stuff. The only load is when pdf reports are being generated. Leaving apache untweaked, the

Re: about DJANGO_SETTINGS_MODULE

2007-08-26 Thread James Bennett
On 8/26/07, z_axis <[EMAIL PROTECTED]> wrote: > File "d:\app\python\Lib\site-packages\django\db\__init__.py", line 7, in > le> > if not settings.DATABASE_ENGINE: The lines above tell you what the problem is: Django stores data in a database, but you have not filled in the settings which

about DJANGO_SETTINGS_MODULE

2007-08-26 Thread z_axis
hi, friends: I am a newbie of django. I want to learn it in python shell. f:\set DJANGO_SETTINGS_MODULE=f:\z\temp\blog\settings.py f:\python Python 2.5.1 (r251:54863, Apr 18 2007, 08:51:08) [MSC v.1310 32 bit (Intel)] on win32 Type "help", "copyright", "credits" or "license" for more information.

Re: Newbie: How to create different person models that share a profile model?

2007-08-26 Thread Ariel Mauricio Nunez Gomez
I can't think of any "clean solutions" right now. Dirty one's include adding a Role class, or applying the constraints on the database. If you come up with something, please let me know. Ariel. On 8/25/07, Ed Hagen <[EMAIL PROTECTED]> wrote: > > > > That will work -- assigning roles to Users

IntegrityError: datatype mismatch

2007-08-26 Thread Alex
Hello all, I am having an issue with django models and the auto-generated admin page: I apologize if this has already been answered somewhere. /reg/models.py: ''' from django.db import models class Space(models.Model): name = models.CharField(max_length=100, )#unique=True) def

Re: URL dispatcher with filter

2007-08-26 Thread Ned Batchelder
I would think the simplest thing to do is combine the get_object_or_404 and the user_can_access_c calls: def get_allowed_c(request, cid): c = get_object_or_404(C, pk=cid) if user_can_access_c(request.user, c): return c else: # not allowed; act as if user got the wrong

Re: URL dispatcher with filter

2007-08-26 Thread Tim Chase
> What I currently have to do is to define each view (such as to handle > "foo" above) as: > > @login_required > def foo(request, cid): > c = get_object_or_404(C, pk=cid) > if user_can_access_c(request.user, c): > # do something that's allowed > # ... > else: >

URL dispatcher with filter

2007-08-26 Thread tt
I have a unique situation that the traditional urls.py config does not handle very well. Imagine I have URL patterns like this: /c/(?P\d+)/foo /c/(?P\d+)/bar /c/(?P\d+)/abc ... I'm using Django authentication to ensure the user is logged in. But I have to do a custom check to ensure if that

Re: Validation problem with newforms and initial value for URLField

2007-08-26 Thread Shev
Yes, I've created a custom clean method to deal with this for now, thanks. Perhaps the docs should be updated to have a note on that example. On my page, I wanted to include an initial "http://; value so users would not be confused as to what was expected in the field, but the field was also

Re: loaddata issue

2007-08-26 Thread Drasty
It seems like it was an issue with the transition from MySQL to PostgreSQL; I had been using build 6001 (as I noted at the end, sorry it wasn't very obvious), but I just ran svn update and was able to loaddata, although the project will remain on MySQL. On Aug 26, 9:16 am, "Russell Keith-Magee"

Re: loaddata and object query does not exist

2007-08-26 Thread Russell Keith-Magee
On 8/26/07, Kai Kuehne <[EMAIL PROTECTED]> wrote: > > Hi list, > I cannot load my data into the postgres db. > I dumped it on the production server and want to > load it on the dev machine (both SVN 6020): > > $ python manage.py loaddata dump.json > Loading 'dump' fixtures... > Installing json

Re: Using SQL aggregates

2007-08-26 Thread Russell Keith-Magee
On 8/26/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > > How can I display a table of groups and counts, using the DB API? Can > this be wrapped around a model that is tied to a database view? The short answer is that aggregates are a planned, but not yet implemented feature. The ticket

Re: Integrating Selenium unit-tests into Django

2007-08-26 Thread Russell Keith-Magee
On 8/26/07, bsdlogical <[EMAIL PROTECTED]> wrote: > > I can't figure out how to use Django's management code to spawn a > runserver process without calling ./django-admin.py first. I also > can't > figure out how to resolve the double database issue. I've examined the > patch in #2879 and the

Re: loaddata issue

2007-08-26 Thread Russell Keith-Magee
On 8/26/07, Drasty <[EMAIL PROTECTED]> wrote: > > Loading 'courses' fixtures... > Installing xml fixture 'courses' from '/../eeyore/courses/fixtures'. > Problem installing fixture '/../eeyore/courses/fixtures/courses.xml': > node is missing the 'name' attribute This sounds like there is an

Re: inteactive shell, threads & debug

2007-08-26 Thread sandro dentella
As often happens, writing the questions gave me the answer at least to the main problem if not to the single questions on threading. I ended up writing (interactively) a variable in django.conf.settings and modified get user to test for INTERACTIVE_USER if it does not find any user defined in

inteactive shell, threads & debug

2007-08-26 Thread sandro dentella
Hi, First the question, then the explanation why a ask this... 1. Are all the commands issued in an interactive shell run in the same thread? 2. Is it possible to make functions (eg: Model.objects.all()) called within the interactive shell read variables in the interactive

loaddata and object query does not exist

2007-08-26 Thread Kai Kuehne
Hi list, I cannot load my data into the postgres db. I dumped it on the production server and want to load it on the dev machine (both SVN 6020): $ python manage.py loaddata dump.json Loading 'dump' fixtures... Installing json fixture 'dump' from absolute path. Problem installing fixture

Re: Can Django be run on 1and1 ?

2007-08-26 Thread Amirouche
On Aug 25, 8:19 pm, john <[EMAIL PROTECTED]> wrote: > On Aug 25, 7:07 am, Amirouche <[EMAIL PROTECTED]> wrote: > > > As a general advice don't run anything on 1and1.com ; ) > > we have been using 1and1 for email and static type web > hosting for a long time with excellent reliability and low

Re: TyneMCE-like for math, You know one?

2007-08-26 Thread Amirouche
On Aug 26, 1:00 am, "[EMAIL PROTECTED]" <[EMAIL PROTECTED]> wrote: > Thanks. This mathdonalds seens to be very good. Maybe doing some > modifications it should work for what I need. > > I liked an editor named Xina,http://xinha.webfactional.com/wiki/Examples, > good with an math plugin. > This

Re: problems with syncdb

2007-08-26 Thread Amirouche
Looks like the problem comes from the OneToOneField... --~--~-~--~~~---~--~~ 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

problems with syncdb

2007-08-26 Thread Paul Rauch
Hello * I'm using django svn, revision 5991. when trying to save this model, from django.db import models from django.contrib.auth.models import User # Create your models here. class mg_user(models.Model): userid = models.PositiveIntegerField() name = models.CharField(max_length=255) server

SUN PROTECTION

2007-08-26 Thread Salah U Shamsi
* Effective Skin Care, Eye Care Products CLICK TO READ: http://www.12three.info/sun-protection/ -- * --~--~-~--~~~---~--~~ You received this message because you are subscribed

Best wait to avoid collision before inserting a record?

2007-08-26 Thread Kugutsumen
I am using django latest trunk and postgresql 8.2 The domain relation contains 180 million records. class Domain(models.Model): name = models.CharField("domain name", maxlength=255, unique=True) source = models.ForeignKey(History, verbose_name="Source") CREATE TABLE "DNS_domain" (

Re: Validation problem with newforms and initial value for URLField

2007-08-26 Thread Peter Melvyn
On 8/26/07, Shev <[EMAIL PROTECTED]> wrote: > But neither should an initial field value raise an error when > the POSTed data is exactly the same as the starting value; > it should just be ignored and the value discarded. Even if you supply a valid inital value? It does not sound well for me...

Re: SCGI

2007-08-26 Thread Paul Rauch
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Sasha Weberov schrieb: > > > On Aug 23, 9:32 pm, Sasha Weberov <[EMAIL PROTECTED]> wrote: >> I recently setup mod_scgi and found some configuration examples on a >> RoR site to get it working. It seems pretty nice so far, much easier >> to setup

Re: CRUD generic views and new forms

2007-08-26 Thread Nathaniel Whiteinge
The CRUD generic views haven't been updated for newforms yet. In the meantime you can try using this snippet: http://www.djangosnippets.org/snippets/99/ - whiteinge --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: TyneMCE-like for math, You know one?

2007-08-26 Thread Nathaniel Whiteinge
Depending on your ultimate output needs, ASCIIMathML.js may be a good solution: http://www1.chapman.edu/~jipsen/mathml/asciimathdemo.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To

Django Queue Service

2007-08-26 Thread Joseph Heck
For anyone interested, I've made available the code (using Django) to a project that implements a message queue for use with Django (or anything, really) projects. The brilliantly conceived name is "Django Queue Service", and the source is available at http://django-queue-service.googlecode.com/.

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Kenneth Gonsalves
On 26-Aug-07, at 11:51 AM, Brandon Taylor wrote: > -bash: django-admin.py: command not found what happens if you run /usr/local/bin/django-admin.py, that is, with the full path name. If it runs, then it means your path does not contain /usr/local/bin. If it doesnt run, your alias is

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Duc Nguyen
Not sure if this is the solution, but I put my PATH settings in ~/.profile instead of .bash_profile. I didn't make an alias of django_admin.py in /usr/local/bin. I just made sure $DJANGOHOME/bin was part of my PATH. -- Duc On Aug 25, 2007, at 11:21 PM, Brandon Taylor wrote: > > Hi

Re: Help with Django installation on OSX 10.4.10

2007-08-26 Thread Joseph Heck
It is most likely an improper reference in django-admin.py to the location of python - or the "wrong" python. If you invoke python in your terminal, which do you get? BTW: I used the MacPorts install of Python, and I keep the following in my .profile: export

Help with Django installation on OSX 10.4.10

2007-08-26 Thread Brandon Taylor
Hi everyone, I'm just getting started with Django/Python. I have installed Python 2.4.4, and Django from the latest build. I can run 'python' and 'import django' from bash and it does not error out, so I'm assuming my installs are correct. I have made an alias of 'django-admin.py' and placed it