Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.

#1 Jan. 2, 2011 21:25:22

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


Hi,
I'm having a issue with Django's dev server. I did a "django-admin.py
startproject" then "manage.py startapp home", then added the app in
settings.py and in urls.py. The app only has a index function in
views.py which is mapped to / and just renders a simple html template.
What happens is that sometimes(and this is often) when i load the page
in a broswer (tryed Chrome and Firefox) or refresh it, the page starts
loading but it never finishes. And if i hit the browser's stop button
i get this in the console



Exception happened during processing of request from ('127.0.0.1',
52495)
Traceback (most recent call last):
File "C:\Python26\lib\SocketServer.py", line 283, in
_handle_request_noblock
self.process_request(request, client_address)
File "C:\Python26\lib\SocketServer.py", line 309, in process_request
self.finish_request(request, client_address)
File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "C:\Python26\lib\site-packages\django\core\servers
\basehttp.py", line 562, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "C:\Python26\lib\SocketServer.py", line 618, in __init__
self.finish()
File "C:\Python26\lib\SocketServer.py", line 661, in finish
self.wfile.flush()
File "C:\Python26\lib\socket.py", line 297, in flush
self._sock.sendall(buffer(data, write_offset, buffer_size))
error: An established connection was aborted by the
software in your host machine
----------------------------------------


Any idea what's causing this? As it really cripples my dev time.
I'm on a Windows 7 32bit machine

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#2 Jan. 3, 2011 00:03:49

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


The exception you're seeing is just a response to stopping the request in
the browser. The real problem is that your view function is hanging. Could
you post the source to the view (and the substantial parts of your
template)? Very hard to offer suggestions without the right data.

- Craig -

On Sun, Jan 2, 2011 at 16:25, daniels <daniels0...@gmail.com> wrote:

> Hi,
> I'm having a issue with Django's dev server. I did a "django-admin.py
> startproject" then "manage.py startapp home", then added the app in
> settings.py and in urls.py. The app only has a index function in
> views.py which is mapped to / and just renders a simple html template.
> What happens is that sometimes(and this is often) when i load the page
> in a broswer (tryed Chrome and Firefox) or refresh it, the page starts
> loading but it never finishes. And if i hit the browser's stop button
> i get this in the console
>
>
>
> Exception happened during processing of request from ('127.0.0.1',
> 52495)
> Traceback (most recent call last):
> File "C:\Python26\lib\SocketServer.py", line 283, in
> _handle_request_noblock
> self.process_request(request, client_address)
> File "C:\Python26\lib\SocketServer.py", line 309, in process_request
> self.finish_request(request, client_address)
> File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
> self.RequestHandlerClass(request, client_address, self)
> File "C:\Python26\lib\site-packages\django\core\servers
> \basehttp.py", line 562, in __init__
> BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
> File "C:\Python26\lib\SocketServer.py", line 618, in __init__
> self.finish()
> File "C:\Python26\lib\SocketServer.py", line 661, in finish
> self.wfile.flush()
> File "C:\Python26\lib\socket.py", line 297, in flush
> self._sock.sendall(buffer(data, write_offset, buffer_size))
> error: An established connection was aborted by the
> software in your host machine
> ----------------------------------------
>
>
> Any idea what's causing this? As it really cripples my dev time.
> I'm on a Windows 7 32bit machine
>
> --
> 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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#3 Jan. 3, 2011 00:06:20

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


You'll probably want to install the Django debug toolbar (https://github.com/robhudson/django-debug-toolbar) at some point, though it
doesn't help much with views that hang or throw exceptions.

- Craig -

On Sun, Jan 2, 2011 at 16:25, daniels <daniels0...@gmail.com> wrote:

> Hi,
> I'm having a issue with Django's dev server. I did a "django-admin.py
> startproject" then "manage.py startapp home", then added the app in
> settings.py and in urls.py. The app only has a index function in
> views.py which is mapped to / and just renders a simple html template.
> What happens is that sometimes(and this is often) when i load the page
> in a broswer (tryed Chrome and Firefox) or refresh it, the page starts
> loading but it never finishes. And if i hit the browser's stop button
> i get this in the console
>
>
>
> Exception happened during processing of request from ('127.0.0.1',
> 52495)
> Traceback (most recent call last):
> File "C:\Python26\lib\SocketServer.py", line 283, in
> _handle_request_noblock
> self.process_request(request, client_address)
> File "C:\Python26\lib\SocketServer.py", line 309, in process_request
> self.finish_request(request, client_address)
> File "C:\Python26\lib\SocketServer.py", line 322, in finish_request
> self.RequestHandlerClass(request, client_address, self)
> File "C:\Python26\lib\site-packages\django\core\servers
> \basehttp.py", line 562, in __init__
> BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
> File "C:\Python26\lib\SocketServer.py", line 618, in __init__
> self.finish()
> File "C:\Python26\lib\SocketServer.py", line 661, in finish
> self.wfile.flush()
> File "C:\Python26\lib\socket.py", line 297, in flush
> self._sock.sendall(buffer(data, write_offset, buffer_size))
> error: An established connection was aborted by the
> software in your host machine
> ----------------------------------------
>
>
> Any idea what's causing this? As it really cripples my dev time.
> I'm on a Windows 7 32bit machine
>
> --
> 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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#4 Jan. 3, 2011 08:00:31

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


Here are the relevant files:

myproject/urls.py
----------
from django.conf.urls.defaults import *
from django.conf import settings

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
(r'^$', include('myproject.apps.acasa.urls')),

# Dev only
(r'^media/(?P<path>.*)$', 'django.views.static.serve',
{'document_root': settings.MEDIA_ROOT}),

# Uncomment the admin/doc line below to enable admin
documentation:
# (r'^admin/doc/', include('django.contrib.admindocs.urls')),

# Uncomment the next line to enable the admin:
# (r'^admin/', include(admin.site.urls)),
)



myproject/apps/acasa/urls.py
-------------------------------------------
from django.conf.urls.defaults import *

urlpatterns = patterns('myproject.apps.acasa.views',
(r'^$', 'index'),
)



myproject/apps/acasa/views.py
---------------------------------------------
from django.template import RequestContext
from django.shortcuts import render_to_response


def index(request):
return render_to_response('acasa/default.html',
context_instance=RequestContext(request))



myproject/templates/base.html
--------------------------------------------
<!DOCTYPE html>
<html>
<head>
<title>Myproject - {% block title %}{% endblock %}</title>
<meta charset="utf-8" />
<meta name="description" content="TODO add description here" />
<meta name="keywords" content="some, keyword, here" />
<meta name="robots" content="all, index, follow" />
<link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
media="all" />
<script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></
script>
</head>
<body>
<div id="page-background">
{% block content %}
{% endblock %}
</div>
</body>
</html>


myproject/templates/acasa/default.html
---------------------------------------------------------
{% extends "base.html" %}
{% block title %}Acasă{% endblock %}
{% block content %}
Hello World!
{% endblock %}

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#5 Jan. 3, 2011 15:43:57

Tiago A.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


Hi,

Your files seem fine, I believe.
Have you found the cause? What version of python and django are you
using? I also have this issue but it is not often enough for me to
worry too much. Killing the server and restarting it solves it for
me..

BR,
--------

On 3 Jan, 08:00, daniels <daniels0...@gmail.com> wrote:
> Here are the relevant files:
>
> myproject/urls.py
> ----------
> from django.conf.urls.defaults import *
> from django.conf import settings
>
> # Uncomment the next two lines to enable the admin:
> # from django.contrib import admin
> # admin.autodiscover()
>
> urlpatterns = patterns('',
>     (r'^$', include('myproject.apps.acasa.urls')),
>
>     # Dev only
>     (r'^media/(?P<path>.*)$', 'django.views.static.serve',
> {'document_root': settings.MEDIA_ROOT}),
>
>     # Uncomment the admin/doc line below to enable admin
> documentation:
>     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
>     # Uncomment the next line to enable the admin:
>     # (r'^admin/', include(admin.site.urls)),
> )
>
> myproject/apps/acasa/urls.py
> -------------------------------------------
> from django.conf.urls.defaults import *
>
> urlpatterns = patterns('myproject.apps.acasa.views',
>     (r'^$', 'index'),
> )
>
> myproject/apps/acasa/views.py
> ---------------------------------------------
> from django.template  import RequestContext
> from django.shortcuts import render_to_response
>
> def index(request):
>     return render_to_response('acasa/default.html',
>         context_instance=RequestContext(request))
>
> myproject/templates/base.html
> --------------------------------------------
> <!DOCTYPE html>
> <html>
> <head>
>     <title>Myproject - {% block title %}{% endblock %}</title>
>     <meta charset="utf-8" />
>     <meta name="description" content="TODO add description here" />
>     <meta name="keywords" content="some, keyword, here" />
>     <meta name="robots" content="all, index, follow" />
>     <link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
> media="all" />
>     <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></
> script>
> </head>
> <body>
>     <div id="page-background">
>         {% block content %}
>         {% endblock %}
>     </div>
> </body>
> </html>
>
> myproject/templates/acasa/default.html
> ---------------------------------------------------------
> {% extends "base.html" %}
> {% block title %}Acasă{% endblock %}
> {% block content %}
> Hello World!
> {% endblock %}

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#6 Jan. 3, 2011 19:09:45

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


Hi,
Unfortunately i did not found the case, and i'm getting it pretty
often, about 3 out of 5 times i refresh the page.
If i leave it loading and i don't stop it it stays like that for about
30-40 seconds and then the page loads.
I just don't understand what is causing this.
I've restarted the server like 10 time or more from the first time i
got this and i'm still getting it every time i run it.

My Python version is : ActivePython 2.6.6.17 (ActiveState Software
Inc.) based on
Python 2.6.6 (r266:84292, Nov 24 2010, 09:16:51) on
win32

and Django: (1, 2, 3, 'final', 0)

I did a lot of dev on Windows 7 before but i never had this issue. So
my thoughts are that this is either
related to this Django version or Python version.


On Jan 3, 5:43 pm, Tiago Almeida <tiago.b.alme...@gmail.com> wrote:
> Hi,
>
> Your files seem fine, I believe.
> Have you found the cause? What version of python and django are you
> using? I also have this issue but it is not often enough for me to
> worry too much. Killing the server and restarting it solves it for
> me..
>
> BR,
> --------
>
> On 3 Jan, 08:00, daniels <daniels0...@gmail.com> wrote:
>
>
>
>
>
>
>
> > Here are the relevant files:
>
> > myproject/urls.py
> > ----------
> > from django.conf.urls.defaults import *
> > from django.conf import settings
>
> > # Uncomment the next two lines to enable the admin:
> > # from django.contrib import admin
> > # admin.autodiscover()
>
> > urlpatterns = patterns('',
> >     (r'^$', include('myproject.apps.acasa.urls')),
>
> >     # Dev only
> >     (r'^media/(?P<path>.*)$', 'django.views.static.serve',
> > {'document_root': settings.MEDIA_ROOT}),
>
> >     # Uncomment the admin/doc line below to enable admin
> > documentation:
> >     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> >     # Uncomment the next line to enable the admin:
> >     # (r'^admin/', include(admin.site.urls)),
> > )
>
> > myproject/apps/acasa/urls.py
> > -------------------------------------------
> > from django.conf.urls.defaults import *
>
> > urlpatterns = patterns('myproject.apps.acasa.views',
> >     (r'^$', 'index'),
> > )
>
> > myproject/apps/acasa/views.py
> > ---------------------------------------------
> > from django.template  import RequestContext
> > from django.shortcuts import render_to_response
>
> > def index(request):
> >     return render_to_response('acasa/default.html',
> >         context_instance=RequestContext(request))
>
> > myproject/templates/base.html
> > --------------------------------------------
> > <!DOCTYPE html>
> > <html>
> > <head>
> >     <title>Myproject - {% block title %}{% endblock %}</title>
> >     <meta charset="utf-8" />
> >     <meta name="description" content="TODO add description here" />
> >     <meta name="keywords" content="some, keyword, here" />
> >     <meta name="robots" content="all, index, follow" />
> >     <link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
> > media="all" />
> >     <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></
> > script>
> > </head>
> > <body>
> >     <div id="page-background">
> >         {% block content %}
> >         {% endblock %}
> >     </div>
> > </body>
> > </html>
>
> > myproject/templates/acasa/default.html
> > ---------------------------------------------------------
> > {% extends "base.html" %}
> > {% block title %}Acasă{% endblock %}
> > {% block content %}
> > Hello World!
> > {% endblock %}

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#7 Jan. 3, 2011 19:36:58

W. C.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


I'm currently developing on Windows 7 (64-bit) with stock Python 2.6.6
(32-bit) and Django 1.2.3, and having no problems when running the Django
development server from the command line.

I'd recommend using the normal Python (http://www.python.org/download/releases/2.6.6/) instead of ActivePython and
see if that improves things.

- Craig -

On Mon, Jan 3, 2011 at 14:09, daniels <daniels0...@gmail.com> wrote:

> Hi,
> Unfortunately i did not found the case, and i'm getting it pretty
> often, about 3 out of 5 times i refresh the page.
> If i leave it loading and i don't stop it it stays like that for about
> 30-40 seconds and then the page loads.
> I just don't understand what is causing this.
> I've restarted the server like 10 time or more from the first time i
> got this and i'm still getting it every time i run it.
>
> My Python version is : ActivePython 2.6.6.17 (ActiveState Software
> Inc.) based on
> Python 2.6.6 (r266:84292, Nov 24 2010, 09:16:51) on
> win32
>
> and Django: (1, 2, 3, 'final', 0)
>
> I did a lot of dev on Windows 7 before but i never had this issue. So
> my thoughts are that this is either
> related to this Django version or Python version.
>
>
> On Jan 3, 5:43 pm, Tiago Almeida <tiago.b.alme...@gmail.com> wrote:
> > Hi,
> >
> > Your files seem fine, I believe.
> > Have you found the cause? What version of python and django are you
> > using? I also have this issue but it is not often enough for me to
> > worry too much. Killing the server and restarting it solves it for
> > me..
> >
> > BR,
> > --------
> >
> > On 3 Jan, 08:00, daniels <daniels0...@gmail.com> wrote:
> >
> >
> >
> >
> >
> >
> >
> > > Here are the relevant files:
> >
> > > myproject/urls.py
> > > ----------
> > > from django.conf.urls.defaults import *
> > > from django.conf import settings
> >
> > > # Uncomment the next two lines to enable the admin:
> > > # from django.contrib import admin
> > > # admin.autodiscover()
> >
> > > urlpatterns = patterns('',
> > > (r'^$', include('myproject.apps.acasa.urls')),
> >
> > > # Dev only
> > > (r'^media/(?P<path>.*)$', 'django.views.static.serve',
> > > {'document_root': settings.MEDIA_ROOT}),
> >
> > > # Uncomment the admin/doc line below to enable admin
> > > documentation:
> > > # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> >
> > > # Uncomment the next line to enable the admin:
> > > # (r'^admin/', include(admin.site.urls)),
> > > )
> >
> > > myproject/apps/acasa/urls.py
> > > -------------------------------------------
> > > from django.conf.urls.defaults import *
> >
> > > urlpatterns = patterns('myproject.apps.acasa.views',
> > > (r'^$', 'index'),
> > > )
> >
> > > myproject/apps/acasa/views.py
> > > ---------------------------------------------
> > > from django.template import RequestContext
> > > from django.shortcuts import render_to_response
> >
> > > def index(request):
> > > return render_to_response('acasa/default.html',
> > > context_instance=RequestContext(request))
> >
> > > myproject/templates/base.html
> > > --------------------------------------------
> > > <!DOCTYPE html>
> > > <html>
> > > <head>
> > > <title>Myproject - {% block title %}{% endblock %}</title>
> > > <meta charset="utf-8" />
> > > <meta name="description" content="TODO add description here" />
> > > <meta name="keywords" content="some, keyword, here" />
> > > <meta name="robots" content="all, index, follow" />
> > > <link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
> > > media="all" />
> > > <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></
> > > script>
> > > </head>
> > > <body>
> > > <div id="page-background">
> > > {% block content %}
> > > {% endblock %}
> > > </div>
> > > </body>
> > > </html>
> >
> > > myproject/templates/acasa/default.html
> > > ---------------------------------------------------------
> > > {% extends "base.html" %}
> > > {% block title %}Acasă{% endblock %}
> > > {% block content %}
> > > Hello World!
> > > {% endblock %}
>
> --
> 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.
For more options, visit this group athttp://groups.google.com/group/django-users?hl=en.

Offline

#8 Jan. 3, 2011 21:26:21

d.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


I just tested with sock Python 2.6.6 from the link you gave me and
also tried with Python 2.7
and I'm still having this issue. It is really weird. Like i said 3 out
of 5 page refresh the browser hangs,
and if i press stop button i get the same exception trowed.

:(

On Jan 3, 9:36 pm, "W. Craig Trader" <craig.tra...@gmail.com> wrote:
> I'm currently developing on Windows 7 (64-bit) with stock Python 2.6.6
> (32-bit) and Django 1.2.3, and having no problems when running the Django
> development server from the command line.
>
> I'd recommend using the normal Python
> (http://www.python.org/download/releases/2.6.6/) instead of ActivePython and
> see if that improves things.
>
> - Craig -
>
>
>
>
>
>
>
> On Mon, Jan 3, 2011 at 14:09, daniels <daniels0...@gmail.com> wrote:
> > Hi,
> > Unfortunately i did not found the case, and i'm getting it pretty
> > often, about 3 out of 5 times i refresh the page.
> > If i leave it loading and i don't stop it it stays like that for about
> > 30-40 seconds and then the page loads.
> > I just don't understand what is causing this.
> > I've restarted the server like 10 time or more from the first time i
> > got this and i'm still getting it every time i run it.
>
> > My Python version is : ActivePython 2.6.6.17 (ActiveState Software
> > Inc.) based on
> > Python 2.6.6 (r266:84292, Nov 24 2010, 09:16:51) on
> > win32
>
> > and Django: (1, 2, 3, 'final', 0)
>
> > I did a lot of dev on Windows 7 before but i never had this issue. So
> > my thoughts are that this is either
> > related to this Django version or Python version.
>
> > On Jan 3, 5:43 pm, Tiago Almeida <tiago.b.alme...@gmail.com> wrote:
> > > Hi,
>
> > > Your files seem fine, I believe.
> > > Have you found the cause? What version of python and django are you
> > > using? I also have this issue but it is not often enough for me to
> > > worry too much. Killing the server and restarting it solves it for
> > > me..
>
> > > BR,
> > > --------
>
> > > On 3 Jan, 08:00, daniels <daniels0...@gmail.com> wrote:
>
> > > > Here are the relevant files:
>
> > > > myproject/urls.py
> > > > ----------
> > > > from django.conf.urls.defaults import *
> > > > from django.conf import settings
>
> > > > # Uncomment the next two lines to enable the admin:
> > > > # from django.contrib import admin
> > > > # admin.autodiscover()
>
> > > > urlpatterns = patterns('',
> > > >     (r'^$', include('myproject.apps.acasa.urls')),
>
> > > >     # Dev only
> > > >     (r'^media/(?P<path>.*)$', 'django.views.static.serve',
> > > > {'document_root': settings.MEDIA_ROOT}),
>
> > > >     # Uncomment the admin/doc line below to enable admin
> > > > documentation:
> > > >     # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> > > >     # Uncomment the next line to enable the admin:
> > > >     # (r'^admin/', include(admin.site.urls)),
> > > > )
>
> > > > myproject/apps/acasa/urls.py
> > > > -------------------------------------------
> > > > from django.conf.urls.defaults import *
>
> > > > urlpatterns = patterns('myproject.apps.acasa.views',
> > > >     (r'^$', 'index'),
> > > > )
>
> > > > myproject/apps/acasa/views.py
> > > > ---------------------------------------------
> > > > from django.template  import RequestContext
> > > > from django.shortcuts import render_to_response
>
> > > > def index(request):
> > > >     return render_to_response('acasa/default.html',
> > > >         context_instance=RequestContext(request))
>
> > > > myproject/templates/base.html
> > > > --------------------------------------------
> > > > <!DOCTYPE html>
> > > > <html>
> > > > <head>
> > > >     <title>Myproject - {% block title %}{% endblock %}</title>
> > > >     <meta charset="utf-8" />
> > > >     <meta name="description" content="TODO add description here" />
> > > >     <meta name="keywords" content="some, keyword, here" />
> > > >     <meta name="robots" content="all, index, follow" />
> > > >     <link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
> > > > media="all" />
> > > >     <script type="text/javascript" src="{{ MEDIA_URL }}js/jquery.js"></
> > > > script>
> > > > </head>
> > > > <body>
> > > >     <div id="page-background">
> > > >         {% block content %}
> > > >         {% endblock %}
> > > >     </div>
> > > > </body>
> > > > </html>
>
> > > > myproject/templates/acasa/default.html
> > > > ---------------------------------------------------------
> > > > {% extends "base.html" %}
> > > > {% block title %}Acasă{% endblock %}
> > > > {% block content %}
> > > > Hello World!
> > > > {% endblock %}
>
> > --
> > 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...@google
> > groups.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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#9 Jan. 3, 2011 21:29:03

Brian B.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


Have you tried using pdb to debug the call as it arrives? You could step
through the code, line by line that way to see what is hanging.

My 2 cents,
Brian

On Mon, Jan 3, 2011 at 4:26 PM, daniels <daniels0...@gmail.com> wrote:

> I just tested with sock Python 2.6.6 from the link you gave me and
> also tried with Python 2.7
> and I'm still having this issue. It is really weird. Like i said 3 out
> of 5 page refresh the browser hangs,
> and if i press stop button i get the same exception trowed.
>
> :(
>
> On Jan 3, 9:36 pm, "W. Craig Trader" <craig.tra...@gmail.com> wrote:
> > I'm currently developing on Windows 7 (64-bit) with stock Python 2.6.6
> > (32-bit) and Django 1.2.3, and having no problems when running the Django
> > development server from the command line.
> >
> > I'd recommend using the normal Python (
>http://www.python.org/download/releases/2.6.6/) instead of ActivePython
> and
> > see if that improves things.
> >
> > - Craig -
> >
> >
> >
> >
> >
> >
> >
> > On Mon, Jan 3, 2011 at 14:09, daniels <daniels0...@gmail.com> wrote:
> > > Hi,
> > > Unfortunately i did not found the case, and i'm getting it pretty
> > > often, about 3 out of 5 times i refresh the page.
> > > If i leave it loading and i don't stop it it stays like that for about
> > > 30-40 seconds and then the page loads.
> > > I just don't understand what is causing this.
> > > I've restarted the server like 10 time or more from the first time i
> > > got this and i'm still getting it every time i run it.
> >
> > > My Python version is : ActivePython 2.6.6.17 (ActiveState Software
> > > Inc.) based on
> > > Python 2.6.6 (r266:84292, Nov 24 2010, 09:16:51) on
> > > win32
> >
> > > and Django: (1, 2, 3, 'final', 0)
> >
> > > I did a lot of dev on Windows 7 before but i never had this issue. So
> > > my thoughts are that this is either
> > > related to this Django version or Python version.
> >
> > > On Jan 3, 5:43 pm, Tiago Almeida <tiago.b.alme...@gmail.com> wrote:
> > > > Hi,
> >
> > > > Your files seem fine, I believe.
> > > > Have you found the cause? What version of python and django are you
> > > > using? I also have this issue but it is not often enough for me to
> > > > worry too much. Killing the server and restarting it solves it for
> > > > me..
> >
> > > > BR,
> > > > --------
> >
> > > > On 3 Jan, 08:00, daniels <daniels0...@gmail.com> wrote:
> >
> > > > > Here are the relevant files:
> >
> > > > > myproject/urls.py
> > > > > ----------
> > > > > from django.conf.urls.defaults import *
> > > > > from django.conf import settings
> >
> > > > > # Uncomment the next two lines to enable the admin:
> > > > > # from django.contrib import admin
> > > > > # admin.autodiscover()
> >
> > > > > urlpatterns = patterns('',
> > > > > (r'^$', include('myproject.apps.acasa.urls')),
> >
> > > > > # Dev only
> > > > > (r'^media/(?P<path>.*)$', 'django.views.static.serve',
> > > > > {'document_root': settings.MEDIA_ROOT}),
> >
> > > > > # Uncomment the admin/doc line below to enable admin
> > > > > documentation:
> > > > > # (r'^admin/doc/', include('django.contrib.admindocs.urls')),
> >
> > > > > # Uncomment the next line to enable the admin:
> > > > > # (r'^admin/', include(admin.site.urls)),
> > > > > )
> >
> > > > > myproject/apps/acasa/urls.py
> > > > > -------------------------------------------
> > > > > from django.conf.urls.defaults import *
> >
> > > > > urlpatterns = patterns('myproject.apps.acasa.views',
> > > > > (r'^$', 'index'),
> > > > > )
> >
> > > > > myproject/apps/acasa/views.py
> > > > > ---------------------------------------------
> > > > > from django.template import RequestContext
> > > > > from django.shortcuts import render_to_response
> >
> > > > > def index(request):
> > > > > return render_to_response('acasa/default.html',
> > > > > context_instance=RequestContext(request))
> >
> > > > > myproject/templates/base.html
> > > > > --------------------------------------------
> > > > > <!DOCTYPE html>
> > > > > <html>
> > > > > <head>
> > > > > <title>Myproject - {% block title %}{% endblock %}</title>
> > > > > <meta charset="utf-8" />
> > > > > <meta name="description" content="TODO add description here" />
> > > > > <meta name="keywords" content="some, keyword, here" />
> > > > > <meta name="robots" content="all, index, follow" />
> > > > > <link rel="stylesheet" href="{{ MEDIA_URL }}css/style.css"
> > > > > media="all" />
> > > > > <script type="text/javascript" src="{{ MEDIA_URL
> }}js/jquery.js"></
> > > > > script>
> > > > > </head>
> > > > > <body>
> > > > > <div id="page-background">
> > > > > {% block content %}
> > > > > {% endblock %}
> > > > > </div>
> > > > > </body>
> > > > > </html>
> >
> > > > > myproject/templates/acasa/default.html
> > > > > ---------------------------------------------------------
> > > > > {% extends "base.html" %}
> > > > > {% block title %}Acasă{% endblock %}
> > > > > {% block content %}
> > > > > Hello World!
> > > > > {% endblock %}
> >
> > > --
> > > 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>
> <django-users%2bunsubscr...@google groups.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.
>
>


--
Brian Bouterse
ITng Services

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

#10 Jan. 3, 2011 21:35:44

Shawn M.
Registered: 2009-11-02
Reputation: +  0  -
Profile   Send e-mail  

Django dev server issue


On Jan 3, 2011, at 4:28 PM, Brian Bouterse wrote:

> Have you tried using pdb to debug the call as it arrives? You could step
> through the code, line by line that way to see what is hanging.
>
> My 2 cents,
> Brian

I enthusiastically second this. If you're unfamiliar with pdb, check out this
slice of awesome:http://blog.doughellmann.com/2010/09/pymotw-pdb-interactive-debugger.htmlIncidentally, the Python doc page has just a bit that's not in the tutorial.
The only thing that springs to mind is the 'skip' argument, but you might want
to skim it. The debugger is a fantastic tool to have in your toolbox.http://docs.python.org/library/pdbShawn

--
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 athttp://groups.google.com/group/django-users?hl=en.

Offline

Board footer

Moderator control

Enjoy the 16th of August
PoweredBy

The Forums are managed by develissimo stuff members, if you find any issues or misplaced content please help us to fix it. Thank you! Tell us via Contact Options
Leave a Message
Welcome to Develissimo Live Support