I don't see anything wrong with the code that you posted, other than perhaps
that the initial letter on your module names, Urls.py, Settings.py,
and Models.py,
appear to be in upper case.  That doesn't seem to be causing you a problem,
probably because you are running on a file system that is case preserving but
case insensitive (Windows, the default Mac OS filesystem), but it will cause you
problems in deployment to a *nix hosting provider, so you may as well fix that.
Django it self specially knows about the names settings.py (though you can
override this on the command line, I believe) and models.py (no override that I
know of) and possibly others these days (like admin.py, which may be known
about by django.contrib.admin, but you don't seem to be using that).  You can
specify the name of your root url conf, but you have specified (as is normal)
mysite.urls and not mysite.Urls .

But the problem you are having really feels as though you are somehow running
two python-django processes (maybe both a mod_python and a mod_wsgi --
you only need one) that are getting rotated among, and one of them hasn't
been restarted recently enough to know about the blog app.  Similar would be
if you somehow had two servers running (even on separate machines) behind
a DNS rotor.  Try accessing from the machine itself using "localhost"
in place of
"whatever.com" to check for this last possibility, or from wherever using the IP
address instead of the DNS name.

A bogusly configured cache is also a possibility if you're not using mod_python
or mod_wsgi, but are redirecting through a cache to the development server
running on another port.  In this case test by accessing the actual django
process port directly to see if the problem ever shows.

If you're doing the tutorial, I'd suggest using the django development server
until you have things running well, before throwing apache into the mix.  If
you don't have access to expose the additional port through the firewall of the
serving system, but you're sshing in, you can use ssh port forwarding to get
to it, though this can be a bit slow.  But python runs pretty much everywhere,
so I'd really suggest doing the development on the same computer where you
are running your browser, and then you certainly can access, for example, port
8000.

Good luck, and Happy New Year,
Bill

On Thu, Dec 31, 2009 at 9:12 AM, DizzyDoo <mattlu...@googlemail.com> wrote:
> Hi,
>
> I'm following a tutorial, very simple, all I've done is got my
> database set up, wrote a small and simple blog app and activated the
> admin. I'm running Django 1.1.1 on Apache, on my deployment box.
>
> The problem is seemingly random. I have two blogpost objects
> successfully added to the MySQL database.  Sometimes I can access the
> admin panel, sometimes I cannot. When I cannot, for example,
> accessing /mysite/admin/blog/blogpost/, I get this error
> http://dpaste.com/hold/139625/
>
> If I wait 5 minutes, I can refresh the page, and use the admin panel
> for another five minutes until, once more, these url errors pop up.
>
> Why is this happening? Is it some kind of server misconfiguration, or
> something wrong with some kind of caching? I've tried uninstalling,
> apache and django, and redoing it, but no luck.
>
> Just in case you wanted to take a look at my urls.py, settings.py and
> models.py, here they are:
>
> Urls.py :  http://dpaste.com/hold/139628/
> Settings.py :  http://dpaste.com/hold/139626/
> Models.py :  http://dpaste.com/hold/139627/
>
> Any help is so very welcome, I've wasted too many hours trying to fix
> this.
>
> Thanks,
> Matt
>
> --
>
> 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.
>
>
>

--

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