Installing Pinax 0.7 on Ubuntu

2013-03-25 Thread Christos Jonathan Hayward
I've been working to make a 0.7 Pinax social project work with current
versions of Django and Pinax, and it's been a time sink: we're talking zero
to sixty for one week and counting for a timesaver for the web framework
for perfectionists with deadlines. I realized today that I was maybe
halfway through an ersatz port of the project and my virtualenv to current
versions of Python and Django.

In other words, my approach has been a losing approach.

Is there any way that I can forcibly install Pinax 0.7, with a
corresponding Python version, on my Ubuntu machine? Part of the difficulty
is that I don't know how to get Pinax 0.7; it's not available from its
original URL, and there are dozens of websites offering a free download for
Pinax 0.7, but when you drill down they link to the official site. Meaning
I haven't found an independent Pinax 0.7 source tarball.

*Does anyone happen to have a Pinax 0.7.x source tarball available?*

And can anyone tell me what version of Django would work best with that
Pinax?

And if Python 2.7.3 is going to cause problems, what version of Python
should I have Django running on?

I've certainly identified a losing way to get a Pinax social project up. A
couple of them, actually, if you count pulling the pinax-soclal-project
stub from the official site and then try to do anything more social then
edit a minimal account profile.

I made a tarball snapshot before trying to "make it work together." Now I
was wondering if people could help me with what I hope is a winning
approach, installing 0.7 and dependencies.

Thanks,

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

*Amazon <http://amazon.com/author/cjshayward>* • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
*Professional<http://jonathanhayward.com/>
* • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




An alternate cry for help

2013-03-23 Thread Christos Jonathan Hayward
I wrote earlier asking if someone could correct my ignorance to go from
Pinax building blocks to a working site. Since then, I searched Safari, and
found five references to Pinax, at
http://my.safaribooksonline.com/search?q=Pinax . One is a tangent in a
Django book I wrote; three are Python books I didn't write; and one is an
iPhone JavaScript book that includes 'pinax' in a Greek-English lexicon's
URL.

I realized after posting the original post below that although I'm an avid
learner my ignorance of Pinax may be a bit of a challenge to straighten
out. So besides the possibility of educating me to really know how to put
Pinax sites together, could someone preassemble a complete social site that
just needs database setup, a syncdb, and a gunicorn invocation? It would be
nice to have the earlier Pinax Social Project reimplemented using the new
tools, as opposed to the pinax-social-project which is a set of building
blocks to complete a social project. It seems the general approach is to
turn over better and better building blocks to the user, but the
already-working sensible default has its merits, and I'd appreciate those
merits after a day of struggling with old Pinax, new Pinax, borrowed Pinax,
blue Pinax, not getting any responses with good learning resources, and
searching Safari and recognizing that O'Reilly's whole Safari does not
contain as much information about Pinax as the email you are reading, not
enough by half, and that kind of makes my ignorance a less changeable
condition. If I'm ignorant about Django but have the Django documentation
and the Django book, I can reduce my ignorance. Here I don't see how I can
reduce my ignorance, and my thoughts turn to an evaluation that working
Pinax is excellent, not-configured Pinax that you don't know how to improve
is worth very little, and Liferat is mediocre but works, in its own special
way.

*After a day or so of losing at trying to make pinax-social-network 1.0
have the merits of Pinax social-project 0.5 or .7, I'd like to ask how to
cut with the grain instead of against it.*

*The earlier version came as a fully functional site: you could override
and customize if you want, but it came "batteries included", as a room with
well-chosen pegs on the walls, pictures hanging on the hooks, and furniture
as needed. You could replace as much of the room's initial contents as you
wanted, but it came as a furnished room.*

*Pinax-social-network 1.0 is not a furnished room. It has pegs, and the
pegs are about as well-placed as you could ask for, but if you want
pictures on those pegs, it's on you to put pictures on the pegs. And there
is space you can put furniture in the room; the room is left empty so you
can put whatever furniture you want in. And the room comes with elegantly
placed lorem ipsum graffiti on the walls, to motivate you to paint or
wallpaper the walls to meet your taste. It comes "batteries removed."*

*So... what are the resources, and how does one go about, making a social
network here? Do I just take it as a bit of Django putty? I expect I'd do a
lot of reinventing the wheel if I just use Django knowledge. Is there a
tutorial that shows how to make a live site out of one of Pinax's projects?*

*I spent a bit of time reading about Liferat Liferay before remembering how
painful it was even when I knew it well. The problem here may just be that
I am ignorant about Pinax, and ignorance is a changeable condition.*

*So let's say I know something about Python, something about Django and
something about older, fully assembled versions of Pinax, but not how to
take a starter Pinax project and make a finished site out of it. I'm
ignorant on that point. How can I cure my ignorance? What resources are out
there so I can get what was so easily in reach in older versions of Pinax?*

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

*Amazon <http://amazon.com/author/cjshayward>* • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
*Professional<http://jonathanhayward.com/>
* • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegrou

As posted on StackOverflow

2013-03-22 Thread Christos Jonathan Hayward
After a day or so of losing at trying to make pinax-social-network 1.0 have
the merits of Pinax social-project 0.5 or .7, I'd like to ask how to cut
with the grain instead of against it.

The earlier version came as a fully functional site: you could override and
customize if you want, but it came "batteries included", as a room with
well-chosen pegs on the walls, pictures hanging on the hooks, and furniture
as needed. You could replace as much of the room's initial contents as you
wanted, but it came as a furnished room.

Pinax-social-network 1.0 is not a furnished room. It has pegs, and the pegs
are about as well-placed as you could ask for, but if you want pictures on
those pegs, it's on you to put pictures on the pegs. And there is space you
can put furniture in the room; the room is left empty so you can put
whatever furniture you want in. And the room comes with elegantly placed
lorem ipsum graffiti on the walls, to motivate you to paint or wallpaper
the walls to meet your taste. It comes "batteries removed."

So... what are the resources, and how does one go about, making a social
network here? Do I just take it as a bit of Django putty? I expect I'd do a
lot of reinventing the wheel if I just use Django knowledge. Is there a
tutorial that shows how to make a live site out of one of Pinax's projects?

I spent a bit of time reading about Liferat Liferay before remembering how
painful it was even when I knew it well. The problem here may just be that
I am ignorant about Pinax, and ignorance is a changeable condition.

So let's say I know something about Python, something about Django and
something about older, fully assembled versions of Pinax, but not how to
take a starter Pinax project and make a finished site out of it. I'm
ignorant on that point. How can I cure my ignorance? What resources are out
there so I can get what was so easily in reach in older versions of Pinax?

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

*Amazon <http://amazon.com/author/cjshayward>* • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
*Professional<http://jonathanhayward.com/>
* • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Up-to-date Pinax Social Network *working*?

2013-03-22 Thread Christos Jonathan Hayward
I'vd found pinax-social-project but it's bleeding; it doesn't offer even a
styled page, just a page that fails to load CSS and JavaScripts and comes
out POSH bare as bare can be.

I've put a tarball of my current version at
http://JonathansCorner.com/project/stornge.tgz, was wondering if you could
give me any help to load static content appropriately (it doesn't work to
copy the line that loads media and change it to point to static values).

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

*Amazon <http://amazon.com/author/cjshayward>* • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
*Professional<http://jonathanhayward.com/>
* • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Up-to-date Pinax social network?

2013-03-22 Thread Christos Jonathan Hayward
I look at http://pinaxproject.com/ and see lots of Legos I could use to
build a social network. Is there a current pre-built or HOWTO social
network project that I could use to get a Pinax social network up and
running in two hours or less, including stupid user mistakes on my part?

I have a Pinax 0.5 social network core, and I could fall back on that if
needed, but that is really a losing solution unless the free-of-effort
social network has been phased out in favor of bigger and better sites.

I know that Pinax was intended as a tabula rasa with batteries/Legos
included and not as a system whose features are best showcased in what
happens to be a social network, but I have more easily gotten a social
network running on 0.5 than more recent releases.

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

*Amazon <http://amazon.com/author/cjshayward>* • Author
Bio<http://jonathanscorner.com/author/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Fan Page <http://fan.cjshayward.com/> • Google
Plus<http://jonathanscorner.com/plus>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
*Professional<http://jonathanhayward.com/>
* • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
If you read just *one* of my books, you'll want *The Best of Jonathan's
Corner <http://www.amazon.com/dp/1478219912>*.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.




Re: Where are the 2+ places user_id is defined?

2012-02-15 Thread Christos Jonathan Hayward
P.S. The source is at http://JonathansCorner.com/project/pim.tgz.

On Wed, Feb 15, 2012 at 3:40 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I forgot to specify where. The traceback is on a '''python manage.py
> syncdb''', and happens immediately after the password is entered twice.
>
>
> On Wed, Feb 15, 2012 at 3:39 PM, Christos Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> I'm getting an error:
>>
>> Traceback (most recent call last):
>>   File "manage.py", line 14, in 
>> execute_manager(settings)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 438, in execute_manager
>> utility.execute()
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 379, in execute
>> self.fetch_command(subcommand).run_from_argv(self.argv)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 191, in run_from_argv
>> self.execute(*args, **options.__dict__)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 220, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 351, in handle
>> return self.handle_noargs(**options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
>> line 109, in handle_noargs
>> emit_post_sync_signal(created_models, verbosity, interactive, db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/sql.py",
>> line 190, in emit_post_sync_signal
>> interactive=interactive, db=db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
>> line 70, in create_superuser
>> call_command("createsuperuser", interactive=True)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
>> line 166, in call_command
>> return klass.execute(*args, **defaults)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
>> line 220, in execute
>> output = self.handle(*args, **options)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
>> line 134, in handle
>> User.objects.create_superuser(username, email, password)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>> line 140, in create_superuser
>> u = self.create_user(username, email, password)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
>> line 136, in create_user
>> user.save(using=self._db)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 460, in save
>> self.save_base(using=using, force_insert=force_insert,
>> force_update=force_update)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
>> line 570, in save_base
>> created=(not record_exists), raw=raw, using=using)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
>> line 172, in send
>> response = receiver(signal=self, sender=sender, **named)
>>   File "/Users/jonathan/pim/accounts/models.py", line 12, in
>> create_user_profile
>> UserProfile.objects.create(user = instance)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
>> line 138, in create
>> return self.get_query_set().create(**kwargs)
>>   File
>> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
>> line 360, in create
>> obj.save(force_insert=True, usin

Re: Where are the 2+ places user_id is defined?

2012-02-15 Thread Christos Jonathan Hayward
I forgot to specify where. The traceback is on a '''python manage.py
syncdb''', and happens immediately after the password is entered twice.

On Wed, Feb 15, 2012 at 3:39 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I'm getting an error:
>
> Traceback (most recent call last):
>   File "manage.py", line 14, in 
> execute_manager(settings)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 438, in execute_manager
> utility.execute()
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 379, in execute
> self.fetch_command(subcommand).run_from_argv(self.argv)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 191, in run_from_argv
> self.execute(*args, **options.__dict__)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 220, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 351, in handle
> return self.handle_noargs(**options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/commands/syncdb.py",
> line 109, in handle_noargs
> emit_post_sync_signal(created_models, verbosity, interactive, db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/sql.py",
> line 190, in emit_post_sync_signal
> interactive=interactive, db=db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/__init__.py",
> line 70, in create_superuser
> call_command("createsuperuser", interactive=True)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/__init__.py",
> line 166, in call_command
> return klass.execute(*args, **defaults)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/core/management/base.py",
> line 220, in execute
> output = self.handle(*args, **options)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/management/commands/createsuperuser.py",
> line 134, in handle
> User.objects.create_superuser(username, email, password)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
> line 140, in create_superuser
> u = self.create_user(username, email, password)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py",
> line 136, in create_user
> user.save(using=self._db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 460, in save
> self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 570, in save_base
> created=(not record_exists), raw=raw, using=using)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/dispatch/dispatcher.py",
> line 172, in send
> response = receiver(signal=self, sender=sender, **named)
>   File "/Users/jonathan/pim/accounts/models.py", line 12, in
> create_user_profile
> UserProfile.objects.create(user = instance)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/manager.py",
> line 138, in create
> return self.get_query_set().create(**kwargs)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/query.py",
> line 360, in create
> obj.save(force_insert=True, using=self.db)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 460, in save
> self.save_base(using=using, force_insert=force_insert,
> force_update=force_update)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/models/base.py",
> line 553, in save_base
> result = manager._insert(values, return_id=update_pk, using=using)
>   File
> "/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/db/mod

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
If I import models, it crashes. The top-level project is pim; under that I
have models.py, which contains UserProfile. Specifying pim.UserProfile and
pim.models.UserProfile gets two different error messages. Do I need to
create a separate application under pim and load ".UserProfile"?

On Tue, Feb 14, 2012 at 12:32 PM, Kevin Anthony
<kevin.s.anth...@gmail.com>wrote:

> Did you include the module in your settings.py?
>
> Kevin
> Please excuse brevity, sent from phone
> On Feb 14, 2012 1:27 PM, "Christos Jonathan Hayward" <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> Thank you, little master and creecode. I tried 'pim.UserProfile' and
>> 'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile',
>> which it looks like the documentation calls for, I get:
>>
>> SiteProfileNotAvailable at /
>>
>> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project 
>> settings
>>
>>  Request Method: GET Request URL: http://localhost:8000/ Django Version:
>> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value:
>>
>> Unable to load the profile model, check AUTH_PROFILE_MODULE in your project 
>> settings
>>
>>  Exception Location: 
>> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
>> in get_profile, line 380 Python Executable:/usr/local/bin/python Python
>> Version:2.7.0 Python Path:
>>
>> ['/Users/jonathan/pim',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
>>  '/usr/local/Cellar/python/2.7/lib/python27.zip',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
>>  '/usr/local/lib/python2.7/site-packages',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
>>
>>  Server time: Tue, 14 Feb 2012 12:17:42 -0600
>>
>>
>> With 'pim.models.UserProfile' I get a slightly different:
>>
>> SiteProfileNotAvailable at /
>>
>> app_label and model_name should be separated by a dot in the 
>> AUTH_PROFILE_MODULE setting
>>
>>  Request Method: GET Request URL: http://localhost:8000/ Django Version:
>> 1.3.1 Exception Type: SiteProfileNotAvailable Exception Value:
>>
>> app_label and model_name should be separated by a dot in the 
>> AUTH_PROFILE_MODULE setting
>>
>>  Exception Location: 
>> /usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
>> in get_profile, line 373 Python Executable:/usr/local/bin/python Python
>> Version:2.7.0 Python Path:
>>
>> ['/Users/jonathan/pim',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
>>  '/usr/local/Cellar/python/2.7/lib/python27.zip',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
>>  '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
>>  '/usr/local/lib/python2.7/site-packages',
>>  
>> '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']
>>
>>  Server time: Tue, 14 Feb 2012 12:25:41 -0600
>>
>>
>> "pim" is the name of the project. Do I need to create a distinct
>> application within that project?
>>
>> On Tue, Feb 14, 2012 at 12:20 PM, creecode <creec...@gmail.com> wrote:
>>
>>> Hello Jonathan,
>>>
>>> See the "Storing additional information about 
>&g

Re: Registering a user profile

2012-02-14 Thread Christos Jonathan Hayward
Thank you, little master and creecode. I tried 'pim.UserProfile' and
'pim.models.UserProfile' and they both errored out. With 'pim.UserProfile',
which it looks like the documentation calls for, I get:

SiteProfileNotAvailable at /

Unable to load the profile model, check AUTH_PROFILE_MODULE in your
project settings

Request Method:GETRequest URL:http://localhost:8000/Django
Version:1.3.1Exception
Type:SiteProfileNotAvailableException Value:

Unable to load the profile model, check AUTH_PROFILE_MODULE in your
project settings

Exception 
Location:/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
in get_profile, line 380Python Executable:/usr/local/bin/pythonPython
Version:2.7.0Python Path:

['/Users/jonathan/pim',
 
'/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
 '/usr/local/Cellar/python/2.7/lib/python27.zip',
 '/usr/local/Cellar/python/2.7/lib/python2.7',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
 '/usr/local/lib/python2.7/site-packages',
 
'/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']

Server time:Tue, 14 Feb 2012 12:17:42 -0600


With 'pim.models.UserProfile' I get a slightly different:

SiteProfileNotAvailable at /

app_label and model_name should be separated by a dot in the
AUTH_PROFILE_MODULE setting

Request Method:GETRequest URL:http://localhost:8000/Django
Version:1.3.1Exception
Type:SiteProfileNotAvailableException Value:

app_label and model_name should be separated by a dot in the
AUTH_PROFILE_MODULE setting

Exception 
Location:/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/django/contrib/auth/models.py
in get_profile, line 373Python Executable:/usr/local/bin/pythonPython
Version:2.7.0Python Path:

['/Users/jonathan/pim',
 
'/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/distribute-0.6.14-py2.7.egg',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/pip-0.8.1-py2.7.egg',
 '/usr/local/Cellar/python/2.7/lib/python27.zip',
 '/usr/local/Cellar/python/2.7/lib/python2.7',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-darwin',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac',
 '/usr/local/Cellar/python/2.7/lib/python2.7/plat-mac/lib-scriptpackages',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-tk',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-old',
 '/usr/local/Cellar/python/2.7/lib/python2.7/lib-dynload',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages',
 '/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/PIL',
 '/usr/local/lib/python2.7/site-packages',
 
'/usr/local/Cellar/python/2.7/lib/python2.7/site-packages/setuptools-0.6c11-py2.7.egg-info']

Server time:Tue, 14 Feb 2012 12:25:41 -0600


"pim" is the name of the project. Do I need to create a distinct
application within that project?

On Tue, Feb 14, 2012 at 12:20 PM, creecode <creec...@gmail.com> wrote:

> Hello Jonathan,
>
> See the "Storing additional information about 
> users<https://docs.djangoproject.com/en/1.3/topics/auth/#storing-additional-information-about-users>"
> section in the docs.  There it mentions the expected format of
> AUTH_PROFILE_MODULE.
>
> I suspect what you need to do is wrap your UserProfile model up in it's
> own app if it isn't in one already.  Alternately you need to change the
> "models" in AUTH_PROFILE_MODULE to the name of your app.
>
> Let us know if that works for you.
>
> Toodle-lo..
> creecode
>
>
>  --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To view this discussion on the web visit
> https://groups.google.com/d/msg/django-users/-/HSX4NGpn66kJ.
>
> To post to this group, send email to django-users@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> •
*Email<christos.jonathan.hayw...@gmail.com>
* • Facebook <http://www.facebook.com/christos.jonathan.hayward> • Google
Plus <http://jonathanscorner.com/plus> • *Kindle +
Books!*<http:/

Email settings to use localhost's email

2011-09-13 Thread Christos Jonathan Hayward
I have a Pinax social project that earlier was holding emails as rejected
(they came from webmaster@localhost), and near the beginning of settings.py
added:

DEFAULT_FROM_EMAIL = 'Orthodox Network <cjshayw...@orthodox-network.com>'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'mail.orthodox-network.com'
EMAIL_HOST_USER = 'cjshayward' # Mailbox name from
https://my.webfaction.com/mailbox/list
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 25
EMAIL_SUBJECT_PREFIX = '[Orthodox Network] '

There were earlier seven emails from friends who had tried to confirm their
email address; when I originally did:

python manage.py send_mail
python manage.py retry_deferred

it gave error messages and didn't send the messages.

Now I added to the settings.py:


DEFAULT_FROM_EMAIL = 'Orthodox Network <cjshayw...@orthodox-network.com>'
EMAIL_BACKEND = 'django.core.mail.backends.smtp.EmailBackend'
EMAIL_USE_TLS = True
EMAIL_HOST = 'mail.orthodox-network.com'
EMAIL_HOST_USER = 'cjshayward' # Mailbox name from
https://my.webfaction.com/mailbox/list
EMAIL_HOST_PASSWORD = ''
EMAIL_PORT = 25
EMAIL_SUBJECT_PREFIX = '[Orthodox Network] '

it ran without reported error, but none of my users have reported receiving
the expected email.

The VPS is set up to allow Mail; the following appears to work:

$ Mail cjshayw...@pobox.com
Subject: Test
Test
.
Cc:

Which brings me to my question: *How can I tell Django to use the VPS's
regular sendmail to power send_mail, retry_deferred, and emit_notices?*
*
*
Thanks in advance.

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
LinkedIn<http://www.linkedin.com/in/jonathanhayward>
 • Orthodox Network <http://orthodox-network.com/>
(Profile<http://orthodox-network.com/profiles/profile/cjshayward/>)
• Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Where is "base.html" that "templates/site_base.html" extends?

2011-09-09 Thread Christos Jonathan Hayward
Thanks for both responses; I have what I need now.

On Fri, Sep 9, 2011 at 9:09 AM, Leonardo Giordani <
giordani.leona...@gmail.com> wrote:

> Hi Christos,
>
> if you put
>
> {% extends "somefile.html" %}
>
> in your template, Django expects to find it in one of the directories
> specified in your TEMPLATE_DIRS variable in settings.py.
> They are considered in the order they are written, so the base.html you are
> extending is the first you find in this sequence.
>
> Hope this helps, feel free to reply
>
> 2011/9/9 Christos Jonathan Hayward <christos.jonathan.hayw...@gmail.com>
>
>> "site_base.html", directly under the templates folder, extends a
>> "base.html".
>>
>> Where is the base.html? I see several under the project heirarchy
>> somewhere, and I'd like to know which one of them site_base.html extends (if
>> it does so), or else where I can go to edit site_base.html.
>>
>> --
>> [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
>> Christos Jonathan Hayward, an Orthodox Christian author.
>>
>> Author Bio <http://jonathanscorner.com/author/> • 
>> Books<http://cjshayward.com/>
>>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
>> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>>  • Google Plus <http://jonathanscorner.com/plus> • 
>> LinkedIn<http://www.linkedin.com/in/jonathanhayward>
>>  • Twitter <http://twitter.com/JonathansCorner> • 
>> *Web<http://jonathanscorner.com/>
>> * • What's New? <http://jonathanscorner.com/>
>> I invite you to visit my "theology, literature, and other creative works"
>> site.
>>
>>  --
>> 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, send email to
>> django-users+unsubscr...@googlegroups.com.
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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, send email to
> django-users+unsubscr...@googlegroups.com.
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
LinkedIn<http://www.linkedin.com/in/jonathanhayward>
 • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Where is "base.html" that "templates/site_base.html" extends?

2011-09-09 Thread Christos Jonathan Hayward
"site_base.html", directly under the templates folder, extends a
"base.html".

Where is the base.html? I see several under the project heirarchy somewhere,
and I'd like to know which one of them site_base.html extends (if it does
so), or else where I can go to edit site_base.html.

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
LinkedIn<http://www.linkedin.com/in/jonathanhayward>
 • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Integrating django-honeypot with Pinax

2011-09-08 Thread Christos Jonathan Hayward
Breadcrumb note: someone on the list pointed out the middleware described at
the bottom of django-honeypot's homepage. That was what I wanted.

On Thu, Sep 8, 2011 at 1:21 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I would like to incorporate django-honeypot (
> https://github.com/sunlightlabs/django-honeypot) into a Pinax site so
> there's less spam; the project was cloned from the social network.
>
> The basic instructions for django-honeypot are "Add X to your settings.py,
> do Y to templates containing forms you want to honeypot, and do Z to views
> servicing those templates."
>
> However, after looking through my Pinax project and the virtual
> environment, I don't see where the templates and views are for me to do Y
> and Z to.
>
> Where should I be looking to appropriately change templates and views to
> lessen the load of spam?
>
> --
>  [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> Author Bio <http://jonathanscorner.com/author/> • 
> Books<http://cjshayward.com/>
>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • Google Plus <http://jonathanscorner.com/plus> • 
> LinkedIn<http://www.linkedin.com/in/jonathanhayward>
>  • Twitter <http://twitter.com/JonathansCorner> • 
> *Web<http://jonathanscorner.com/>
> * • What's New? <http://jonathanscorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site.
>
>


-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
LinkedIn<http://www.linkedin.com/in/jonathanhayward>
 • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Integrating django-honeypot with Pinax

2011-09-08 Thread Christos Jonathan Hayward
I would like to incorporate django-honeypot (
https://github.com/sunlightlabs/django-honeypot) into a Pinax site so
there's less spam; the project was cloned from the social network.

The basic instructions for django-honeypot are "Add X to your settings.py,
do Y to templates containing forms you want to honeypot, and do Z to views
servicing those templates."

However, after looking through my Pinax project and the virtual environment,
I don't see where the templates and views are for me to do Y and Z to.

Where should I be looking to appropriately change templates and views to
lessen the load of spam?

-- 
 [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • Google Plus <http://jonathanscorner.com/plus> •
LinkedIn<http://www.linkedin.com/in/jonathanhayward>
 • Twitter <http://twitter.com/JonathansCorner> •
*Web<http://jonathanscorner.com/>
* • What's New? <http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Not calling clean() properly

2010-09-14 Thread Christos Jonathan Hayward
Thank you.

On Tue, Sep 14, 2010 at 3:01 AM, Daniel Roseman <dan...@roseman.org.uk>wrote:

> On Sep 13, 10:50 pm, Christos Jonathan Hayward
> <christos.jonathan.hayw...@gmail.com> wrote:
> > Other attempts to write a clean that would run a print statement and then
> > call to_python(), validate(), and run_validators() did not result in that
> > print statement being called.
> >
> > Am I missing something about data being cleaned? The hooks I've tried to
> > override don't seem to be being called.
> >
>
> You don't say what is supposed to be calling clean. Are you using a
> form? If not, read this:
> http://docs.djangoproject.com/en/1.2/ref/validators/#how-validators-are-run
> --
> DR.
>
> --
> 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...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Not calling clean() properly

2010-09-13 Thread Christos Jonathan Hayward
Other attempts to write a clean that would run a print statement and then
call to_python(), validate(), and run_validators() did not result in that
print statement being called.

Am I missing something about data being cleaned? The hooks I've tried to
override don't seem to be being called.

On Mon, Sep 13, 2010 at 3:44 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I have a TextURLField defined below, and I am trying to get the clean() to
> prepend http:// to all entries that do not contain a ':'. In other words,
> if someone enters "google.com", I'd like to store "http://google.com;.
>
> Right now it appears not to be making any difference; if I enter an FQDN
> then it just stores the FQDN and nothing more.
>
> What I have is:
>
> class TextURLField(models.URLField):
> def clean(self, value):
> if not u':' in value:
> value = u'http://' + value
> value = self.to_python(value)
> self.validate(value)
> self.run_validators(value)
> return value
> def get_internal_type(self):
> return u'TextField'
> def __init__(self, *arguments, **keywords):
> models.URLField.__init__(self, *arguments, **keywords)
>
>
> Any suggestions?
>
> --
> [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> Author Bio <http://jonathanscorner.com/author/> • 
> Books<http://cjshayward.com/>
>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • 
> Twitter<http://twitter.com/JonathansCorner>
>  • *Web <http://jonathanscorner.com/>* • What's 
> New?<http://jonathanscorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site.
>
>


-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Not calling clean() properly

2010-09-13 Thread Christos Jonathan Hayward
I have a TextURLField defined below, and I am trying to get the clean() to
prepend http:// to all entries that do not contain a ':'. In other words, if
someone enters "google.com", I'd like to store "http://google.com;.

Right now it appears not to be making any difference; if I enter an FQDN
then it just stores the FQDN and nothing more.

What I have is:

class TextURLField(models.URLField):
def clean(self, value):
if not u':' in value:
value = u'http://' + value
value = self.to_python(value)
self.validate(value)
self.run_validators(value)
return value
def get_internal_type(self):
return u'TextField'
def __init__(self, *arguments, **keywords):
models.URLField.__init__(self, *arguments, **keywords)


Any suggestions?

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Gotcha with ?generic foreign keys?

2010-09-13 Thread Christos Jonathan Hayward
I'm working on tracking changes and am running into trouble with the
many-to-many fields. I can straightforwardly track and edit one-to-one
fields, and many-to-one, and they behave straightforwardly. However, when I
try to do a many-to-many field, the present issue I'm running into is that I
save an Entity instance in the EditTrail, and when I read it, it is a Tag,
and I'm really not sure how my code could be reassigning it to an unrelated
class. I'm wondering if I've misunderstood the semantics for generic foreign
keys and am trying to push two widgets into a one widget slot.

The model is:

class EditTrail(models.Model):
change_set = models.IntegerField()
change_type = models.CharField(max_length = 1, choices = EDIT_CHOICES)
content_object = generic.GenericForeignKey(u'content_type',
u'object_id')
content_type = models.ForeignKey(ContentType)
field_name = models.TextField(null = True, blank = True)
foreign_key_added = generic.GenericForeignKey()
foreign_key_deleted = generic.GenericForeignKey()
in_effect = models.BooleanField()
instance = generic.GenericForeignKey()
object_id = models.PositiveIntegerField()
session = models.TextField(null = True, blank = True)
text_after = models.TextField(null = True, blank = True)
text_before = models.TextField(null = True, blank = True)
timestamp = models.DateTimeField(default = datetime.datetime.now, blank
=   True)
username = models.TextField(null = True, blank = True)
def format_timestamp(self):
return directory.functions.format_timestamp(self.timestamp)


Any comments on how either I am misunderstanding how to use
GenericForeignKeys, or how I might otherwise be clobbering one model type
with another?

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Filter for non-True NullBooleanField

2010-09-12 Thread Christos Jonathan Hayward
Thanks, and noted for the future. I went with a regular BooleanField
defaulting to False.

On Sat, Sep 11, 2010 at 7:08 AM, Preston Holmes <pres...@ptone.com> wrote:

>
>
> On Sep 10, 2:43 pm, Christos Jonathan Hayward
> <christos.jonathan.hayw...@gmail.com> wrote:
> > P.S. Setting:
> >
> > .filter(is_invisible__in = [False, None])
>
> how about:
>
> .exclude(is_invisible__exact = True)
>
> >
> > is not working as intended; I seem to be getting no matches when I should
> be
> > getting matches.
> >
> > On Fri, Sep 10, 2010 at 4:19 PM, Christos Jonathan Hayward <
> >
> >
> >
> >
> >
> > christos.jonathan.hayw...@gmail.com> wrote:
> > > How can I filter for instances having a NullBooleanField that is not
> True
> > > (i.e. is either False or a null)?
> >
> > > --
> > > [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> > > Christos Jonathan Hayward, an Orthodox Christian author.
> >
> > > Author Bio <http://jonathanscorner.com/author/> • Books<
> http://cjshayward.com/>
> > >  • *Email <christos.jonathan.hayw...@gmail.com>* • Facebook<
> http://www.facebook.com/christos.jonathan.hayward>
> > >  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • Twitter<
> http://twitter.com/JonathansCorner>
> > >  • *Web <http://jonathanscorner.com/>* • What's New?<
> http://jonathanscorner.com/>
> > > I invite you to visit my "theology, literature, and other creative
> works"
> > > site.
> >
> > --
> > [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> > Christos Jonathan Hayward, an Orthodox Christian author.
> >
> > Author Bio <http://jonathanscorner.com/author/> • Books<
> http://cjshayward.com/>
> >  • *Email <christos.jonathan.hayw...@gmail.com>* •
> > Facebook<http://www.facebook.com/christos.jonathan.hayward>
> >  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
> > Twitter<http://twitter.com/JonathansCorner>
> >  • *Web <http://jonathanscorner.com/>* • What's
> > New?<http://jonathanscorner.com/>
> > I invite you to visit my "theology, literature, and other creative works"
> > site.
>
> --
> 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...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Filter for non-True NullBooleanField

2010-09-10 Thread Christos Jonathan Hayward
P.S. Setting:

.filter(is_invisible__in = [False, None])

is not working as intended; I seem to be getting no matches when I should be
getting matches.

On Fri, Sep 10, 2010 at 4:19 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> How can I filter for instances having a NullBooleanField that is not True
> (i.e. is either False or a null)?
>
> --
> [image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> Author Bio <http://jonathanscorner.com/author/> • 
> Books<http://cjshayward.com/>
>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • 
> Twitter<http://twitter.com/JonathansCorner>
>  • *Web <http://jonathanscorner.com/>* • What's 
> New?<http://jonathanscorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site.
>
>


-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Filter for non-True NullBooleanField

2010-09-10 Thread Christos Jonathan Hayward
How can I filter for instances having a NullBooleanField that is not True
(i.e. is either False or a null)?

-- 
[image: Christos Jonathan Hayward] <http://jonathanscorner.com/>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://jonathanscorner.com/author/> • Books<http://cjshayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://jonathanscorner.com/>* • What's
New?<http://jonathanscorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Breaking many-to-many connections

2010-08-31 Thread Christos Jonathan Hayward
I finally pinned down the problem; it was in an unrelated area.

Thanks,

On Tue, Aug 31, 2010 at 5:59 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I have an Entity which has a many-to-many field "tags" to Tags. I'm trying
> to pin down a bug, and wanted a sanity check:
>
> entity = directory.models.Entity.objects.get(id =
>   int(search.group(1)))
> entity.tags.remove(directory.models.Tag.objects.get(id =
>   int(search.group(2
> entity.save()
>
> Is the code above, with the .tags.remove() code, enough, or do both the
> Entity and the Tag need to have a call to break the link?
>
> --
> [image: Christos Jonathan Hayward] <http://JonathansCorner.com>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> Author Bio <http://JonathansCorner.com/author/> • 
> Books<http://CJSHayward.com/>
>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • 
> Twitter<http://twitter.com/JonathansCorner>
>  • *Web <http://JonathansCorner.com/>* • What's 
> New?<http://JonathansCorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site.
>
>


-- 
[image: Christos Jonathan Hayward] <http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Breaking many-to-many connections

2010-08-31 Thread Christos Jonathan Hayward
I have an Entity which has a many-to-many field "tags" to Tags. I'm trying
to pin down a bug, and wanted a sanity check:

entity = directory.models.Entity.objects.get(id =
  int(search.group(1)))
entity.tags.remove(directory.models.Tag.objects.get(id =
  int(search.group(2
entity.save()

Is the code above, with the .tags.remove() code, enough, or do both the
Entity and the Tag need to have a call to break the link?

-- 
[image: Christos Jonathan Hayward] <http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Error working on many-to-many lookups

2010-08-26 Thread Christos Jonathan Hayward
Thanks.

On Thu, Aug 26, 2010 at 9:08 AM, Alex Robbins <alexander.j.robb...@gmail.com
> wrote:

> Jonathan,
>
> Pretty much any time you use __exact='text', you could use
> ='text' instead. I think the orm treats those two cases the
> same. (It adds __exact if there isn't another lookup specified.
>
> Alex
>
> On Aug 25, 1:37 pm, Christos Jonathan Hayward
> <christos.jonathan.hayw...@gmail.com> wrote:
> > I think I found the problem; for the record, I wanted text__exact, not
> > text__equals.
> >
> > On Wed, Aug 25, 2010 at 1:27 PM, Christos Jonathan Hayward <
> >
> >
> >
> > christos.jonathan.hayw...@gmail.com> wrote:
> > > I am trying to get a many-to-many tagging setup working, and I am
> getting
> > > an error which may or may not be an issue with many-to-many
> specifically. An
> > > Entity has a many-to-many field to Tag models; a Tag model only has one
> > > (declared) field, text, a TextField. My code:
> >
> > > tag = directory.models.Tag.objects.filter(text__equals = name)[0]
> >
> > > is getting:
> >
> > > Exception Value: Join on field 'text' not permitted. Did you misspell
> > > 'equals' for the lookup type?
> >
> > > Is text a reserved word here, or do I need to prepend the model name?
> I'm
> > > trying to get the first Tag, if any exists, where the text field equals
> a
> > > name I am testing against.
> >
> > > --
> > > [image: Christos Jonathan Hayward] <http://JonathansCorner.com>
> > > Christos Jonathan Hayward, an Orthodox Christian author.
> >
> > > Author Bio <http://JonathansCorner.com/author/> • Books<
> http://CJSHayward.com/>
> > >  • *Email <christos.jonathan.hayw...@gmail.com>* • Facebook<
> http://www.facebook.com/christos.jonathan.hayward>
> > >  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • Twitter<
> http://twitter.com/JonathansCorner>
> > >  • *Web <http://JonathansCorner.com/>* • What's New?<
> http://JonathansCorner.com/>
> > > I invite you to visit my "theology, literature, and other creative
> works"
> > > site.
> >
> > --
> > [image: Christos Jonathan Hayward] <http://JonathansCorner.com>
> > Christos Jonathan Hayward, an Orthodox Christian author.
> >
> > Author Bio <http://JonathansCorner.com/author/> • Books<
> http://CJSHayward.com/>
> >  • *Email <christos.jonathan.hayw...@gmail.com>* •
> > Facebook<http://www.facebook.com/christos.jonathan.hayward>
> >  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
> > Twitter<http://twitter.com/JonathansCorner>
> >  • *Web <http://JonathansCorner.com/>* • What's
> > New?<http://JonathansCorner.com/>
> > I invite you to visit my "theology, literature, and other creative works"
> > site.
>
> --
> 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...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>


-- 
[image: Christos Jonathan Hayward] <http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Error working on many-to-many lookups

2010-08-25 Thread Christos Jonathan Hayward
I think I found the problem; for the record, I wanted text__exact, not
text__equals.

On Wed, Aug 25, 2010 at 1:27 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> I am trying to get a many-to-many tagging setup working, and I am getting
> an error which may or may not be an issue with many-to-many specifically. An
> Entity has a many-to-many field to Tag models; a Tag model only has one
> (declared) field, text, a TextField. My code:
>
> tag = directory.models.Tag.objects.filter(text__equals = name)[0]
>
>
> is getting:
>
> Exception Value: Join on field 'text' not permitted. Did you misspell
> 'equals' for the lookup type?
>
>
> Is text a reserved word here, or do I need to prepend the model name? I'm
> trying to get the first Tag, if any exists, where the text field equals a
> name I am testing against.
>
> --
> [image: Christos Jonathan Hayward] <http://JonathansCorner.com>
> Christos Jonathan Hayward, an Orthodox Christian author.
>
> Author Bio <http://JonathansCorner.com/author/> • 
> Books<http://CJSHayward.com/>
>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • 
> Twitter<http://twitter.com/JonathansCorner>
>  • *Web <http://JonathansCorner.com/>* • What's 
> New?<http://JonathansCorner.com/>
> I invite you to visit my "theology, literature, and other creative works"
> site.
>
>


-- 
[image: Christos Jonathan Hayward] <http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Error working on many-to-many lookups

2010-08-25 Thread Christos Jonathan Hayward
I am trying to get a many-to-many tagging setup working, and I am getting an
error which may or may not be an issue with many-to-many specifically. An
Entity has a many-to-many field to Tag models; a Tag model only has one
(declared) field, text, a TextField. My code:

tag = directory.models.Tag.objects.filter(text__equals = name)[0]


is getting:

Exception Value: Join on field 'text' not permitted. Did you misspell
'equals' for the lookup type?


Is text a reserved word here, or do I need to prepend the model name? I'm
trying to get the first Tag, if any exists, where the text field equals a
name I am testing against.

-- 
[image: Christos Jonathan Hayward] <http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.



Re: Migration: AlreadyRegistered

2010-08-18 Thread Christos Jonathan Hayward
I'm not using virtualenv. django.contrib.admin wants a
DJANGO_SETTINGS_MODULE to be set:

Inner Sanctum ~/directory $ python
Python 2.6.1 (r261:67515, Feb 11 2010, 00:51:29)
[GCC 4.2.1 (Apple Inc. build 5646)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import django.contrib.admin
Traceback (most recent call last):
  File "", line 1, in 
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/__init__.py",
line 1, in 
from django.contrib.admin.helpers import ACTION_CHECKBOX_NAME
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/helpers.py",
line 1, in 
from django import forms
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/forms/__init__.py",
line 17, in 
from models import *
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/forms/models.py",
line 6, in 
from django.db import connections
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/db/__init__.py",
line 14, in 
if not settings.DATABASES:
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/utils/functional.py",
line 276, in __getattr__
self._setup()
  File
"/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/conf/__init__.py",
line 38, in _setup
raise ImportError("Settings cannot be imported, because environment
variable %s is undefined." % ENVIRONMENT_VARIABLE)
ImportError: Settings cannot be imported, because environment variable
DJANGO_SETTINGS_MODULE is undefined.
>>>

On Wed, Aug 18, 2010 at 1:00 AM, Sam Lai <samuel@gmail.com> wrote:

> This error looks like an import error in disguise. (
> http://code.djangoproject.com/browser/django/tags/releases/1.2.1/django/utils/importlib.py
> )
>
> Fire up the python interpreter shell, and trying importing the
> django.contrib.admin module manually and see if you get any errors.
>
> Django seems to be installed ok according to your python path. Are you
> using virtualenv at all?
>
>
> On 18 August 2010 12:23, Christos Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> I realized there may have been some pre-existing stuff in the directory,
>> so I renamed it and extracted fresh from tarball. I got an error I had seen
>> earlier but couldn't reproduce:
>>
>> AttributeError at /
>>
>> 'module' object has no attribute 'register'
>>
>>  Request Method:GET Request URL:http://localhost:8000/ Django Version:
>> 1.2.1 Exception Type:AttributeError Exception Value:
>>
>> 'module' object has no attribute 'register'
>>
>>  Exception 
>> Location:/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/utils/importlib.py
>> in import_module, line 35 Python Executable:/usr/bin/python Python
>> Version:2.6.1 Python Path:['/Users/jonathan/directory',
>> '/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg',
>> '/Library/Python/2.6/site-packages/tagging-0.2.1-py2.6.egg',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
>> '/Library/Python/2.6/site-packages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']
>>  Server
>> time:Tue, 17 Aug 2010 21:20:53 -0500
>>
>> On Tue, Aug 17, 2010 at 8:39 PM, Christos Jonathan Hayward <
>> christos.jonathan.hayw...@gmail.com> wrote:
>>
>>> Thank you; I'm not seeing how. My admin.py reads:
>>>
>>> import django.contrib.admin
>>> import directory.models
>>> import tagging
>>>
>>> django.contrib.admin.autodiscover()
>>> django.contrib.admin.site.register(directory.models.Entity)
>>> django.contrib.admin.site.register(directory.models.Location)
>>> tagging.register

Re: Migration: AlreadyRegistered

2010-08-17 Thread Christos Jonathan Hayward
I realized there may have been some pre-existing stuff in the directory, so
I renamed it and extracted fresh from tarball. I got an error I had seen
earlier but couldn't reproduce:

AttributeError at /

'module' object has no attribute 'register'

Request Method:GETRequest URL:http://localhost:8000/Django
Version:1.2.1Exception
Type:AttributeErrorException Value:

'module' object has no attribute 'register'

Exception 
Location:/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/utils/importlib.py
in import_module, line 35Python Executable:/usr/bin/pythonPython Version:
2.6.1Python Path:['/Users/jonathan/directory',
'/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg',
'/Library/Python/2.6/site-packages/tagging-0.2.1-py2.6.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
'/Library/Python/2.6/site-packages',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']Server
time:Tue, 17 Aug 2010 21:20:53 -0500
On Tue, Aug 17, 2010 at 8:39 PM, Christos Jonathan Hayward <
christos.jonathan.hayw...@gmail.com> wrote:

> Thank you; I'm not seeing how. My admin.py reads:
>
> import django.contrib.admin
> import directory.models
> import tagging
>
> django.contrib.admin.autodiscover()
> django.contrib.admin.site.register(directory.models.Entity)
> django.contrib.admin.site.register(directory.models.Location)
> tagging.register(directory.models.Entity)
>
>
> Commenting the tagging.register() call doesn't seem to make a difference.
>
> On Tue, Aug 17, 2010 at 8:27 PM, Sam Lai <samuel@gmail.com> wrote:
>
>> It means somehow you're calling this line in an admin.py file twice -
>>
>> admin.site.register(Entity)
>>
>> Check the admin.py file for the app that contains the Entity model.
>>
>> On 18 August 2010 10:57, Christos Jonathan Hayward <
>> christos.jonathan.hayw...@gmail.com> wrote:
>>
>>> I am trying to migrate from one server to another: I tarred it up on the
>>> Linux server, untarred on a Mac, got one or two complaints about missing
>>> packages, and when I had resolved them, got the error below.
>>>
>>> Entity is the name of one of my models. What does this mean, and how is
>>> this issue addressed? (I had been actively developing on the old server and
>>> don't remember seeing this error.)
>>>
>>> AlreadyRegistered at /
>>>
>>> The model Entity is already registered
>>>
>>>  Request Method:GET Request URL:http://localhost:8000/ Django Version:
>>> 1.2.1 Exception Type:AlreadyRegistered Exception Value:
>>>
>>> The model Entity is already registered
>>>
>>> Exception 
>>> Location:/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/sites.py
>>> in register, line 78 Python Executable:/usr/bin/python Python Version:
>>> 2.6.1 Python Path:['/Users/jonathan/directory',
>>> '/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg',
>>> '/Library/Python/2.6/site-packages/tagging-0.2.1-py2.6.egg',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
>>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
>>> '/Library/Python/2.6/site-packages',
>>> '/System/

Re: Migration: AlreadyRegistered

2010-08-17 Thread Christos Jonathan Hayward
Thank you; I'm not seeing how. My admin.py reads:

import django.contrib.admin
import directory.models
import tagging

django.contrib.admin.autodiscover()
django.contrib.admin.site.register(directory.models.Entity)
django.contrib.admin.site.register(directory.models.Location)
tagging.register(directory.models.Entity)


Commenting the tagging.register() call doesn't seem to make a difference.

On Tue, Aug 17, 2010 at 8:27 PM, Sam Lai <samuel@gmail.com> wrote:

> It means somehow you're calling this line in an admin.py file twice -
>
> admin.site.register(Entity)
>
> Check the admin.py file for the app that contains the Entity model.
>
> On 18 August 2010 10:57, Christos Jonathan Hayward <
> christos.jonathan.hayw...@gmail.com> wrote:
>
>> I am trying to migrate from one server to another: I tarred it up on the
>> Linux server, untarred on a Mac, got one or two complaints about missing
>> packages, and when I had resolved them, got the error below.
>>
>> Entity is the name of one of my models. What does this mean, and how is
>> this issue addressed? (I had been actively developing on the old server and
>> don't remember seeing this error.)
>>
>> AlreadyRegistered at /
>>
>> The model Entity is already registered
>>
>>  Request Method:GET Request URL:http://localhost:8000/ Django Version:
>> 1.2.1 Exception Type:AlreadyRegistered Exception Value:
>>
>> The model Entity is already registered
>>
>> Exception 
>> Location:/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/sites.py
>> in register, line 78 Python Executable:/usr/bin/python Python Version:
>> 2.6.1 Python Path:['/Users/jonathan/directory',
>> '/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg',
>> '/Library/Python/2.6/site-packages/tagging-0.2.1-py2.6.egg',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
>> '/Library/Python/2.6/site-packages',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
>> '/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']
>>  Server
>> time:Tue, 17 Aug 2010 19:53:40 -0500
>> --
>> [image: Christos Jonathan Hayward ← An Orthodox Christian 
>> author.]<http://JonathansCorner.com>
>> Christos Jonathan Hayward, an Orthodox Christian author.
>>
>> Author Bio <http://JonathansCorner.com/author/> • 
>> Books<http://CJSHayward.com/>
>>  • *Email <christos.jonathan.hayw...@gmail.com>* • 
>> Facebook<http://www.facebook.com/christos.jonathan.hayward>
>>  • LinkedIn <http://www.linkedin.com/in/jonathanhayward> • 
>> Twitter<http://twitter.com/JonathansCorner>
>>  • *Web <http://JonathansCorner.com/>* • What's 
>> New?<http://JonathansCorner.com/>
>> I invite you to visit my "theology, literature, and other creative works"
>> site.
>>
>>  --
>> 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...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
>> .
>> For more options, visit this group at
>> http://groups.google.com/group/django-users?hl=en.
>>
>
>  --
> 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...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>



-- 
[image: Christos Jonathan Hayward ← An Orthodox Christian
author.]<http://JonathansCorner.com>
Chri

Migration: AlreadyRegistered

2010-08-17 Thread Christos Jonathan Hayward
I am trying to migrate from one server to another: I tarred it up on the
Linux server, untarred on a Mac, got one or two complaints about missing
packages, and when I had resolved them, got the error below.

Entity is the name of one of my models. What does this mean, and how is this
issue addressed? (I had been actively developing on the old server and don't
remember seeing this error.)

AlreadyRegistered at /

The model Entity is already registered

Request Method:GETRequest URL:http://localhost:8000/Django
Version:1.2.1Exception
Type:AlreadyRegisteredException Value:

The model Entity is already registered

Exception 
Location:/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg/django/contrib/admin/sites.py
in register, line 78Python Executable:/usr/bin/pythonPython Version:2.6.1Python
Path:['/Users/jonathan/directory',
'/Library/Python/2.6/site-packages/Django-1.2.1-py2.6.egg',
'/Library/Python/2.6/site-packages/tagging-0.2.1-py2.6.egg',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python26.zip',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-darwin',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/plat-mac/lib-scriptpackages',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-tk',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-old',
'/System/Library/Frameworks/Python.framework/Versions/2.6/lib/python2.6/lib-dynload',
'/Library/Python/2.6/site-packages',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/PyObjC',
'/System/Library/Frameworks/Python.framework/Versions/2.6/Extras/lib/python/wx-2.8-mac-unicode']Server
time:Tue, 17 Aug 2010 19:53:40 -0500
-- 
[image: Christos Jonathan Hayward ← An Orthodox Christian
author.]<http://JonathansCorner.com>
Christos Jonathan Hayward, an Orthodox Christian author.

Author Bio <http://JonathansCorner.com/author/> • Books<http://CJSHayward.com/>
 • *Email <christos.jonathan.hayw...@gmail.com>* •
Facebook<http://www.facebook.com/christos.jonathan.hayward>
 • LinkedIn <http://www.linkedin.com/in/jonathanhayward> •
Twitter<http://twitter.com/JonathansCorner>
 • *Web <http://JonathansCorner.com/>* • What's
New?<http://JonathansCorner.com/>
I invite you to visit my "theology, literature, and other creative works"
site.

-- 
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...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.