On Wednesday, December 22, 2010 06:44:47 pm John Fabiani wrote:
> Hi,
> I had a working website for about the last 2 weeks.  I was using a test
> database (Postgres).  I am also using SVN for my code and have tried to
> revert back many versions and I still get these new errors.
> 
> The error first appeared as datetime has no Attribute 'None' for a line in
> my views.py
> user = User.objects.create_user(c.registration_id, c.email,
> request.POST['txtPassword'])
> 
> The error was from in django/contrib/auth/models.py
> now = datetime.datetime.now()
> 
> No datetime?? But the module imports the datetime module at the top.  This
> is django code and I made no changes to the code.
> 
> So I added the following just for testing (just in case I had re-defined
> datetime):
> try:
>           now = datetime.datetime.now()
>       except:
>           import datetime
>           now = datetime.datetime.now()
> 
> But now in the same module I get a new error:
> 
> TypeError: 'NoneType' object is not callable for
> salt = get_hexdigest(algo, str(random.random()), str(random.random()))[:5]
> 
> This is crazy!  I can not understand what has happened!
> 
> I'm hoping someone understands this better than I do!
> 
> Just running
> python manage.py runserver
> I get a 500.
> 
> I'm on openSUSE 11.3, python 2.6.5, django 1.2.3 (was on 1.2.1).  I really
> need help!
> 
> Johnf

I'm guessing but could this have something to do with my imports?
from django.shortcuts import render_to_response, get_object_or_404
from django.http import Http404, HttpResponseRedirect, HttpResponse
from django.db import connection, transaction
from django.contrib.auth.models import User
from pesweb.esclient.models import Client, CellCarrier, CCTransactions
from pesweb.course.models import Course
import random
import datetime
import time
import json
import cc
import pycurl

Johnf

-- 
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.

Reply via email to