Electronics & Programming

develissimo

Open Source electronics development and programming

  • You are not logged in.
  • Root
  • » Django
  • » django + cherokee configuration problem [RSS Feed]

#1 Jan. 23, 2011 11:52:06

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

django + cherokee configuration problem


Hi all,
I am running django (1.2.4) project ("myproject") with an app called
"myapp". The tree looks this way:

myproject
|-- __init__.py
|-- myapp
| |-- __init__.py
| |-- models.py
| |-- templates
| | |-- base.html
| | |-- base_menu.html
| |-- tests.py
| |-- views.py
|-- manage.py
|-- settings.py
|-- urls.py
|-- mymedia
| |-- css
`-- js

I also have a "templates" dir in "myapp" to hold templates rendered by views
defined in myapps/views.py. Forexample, I could sucessfully render base.html
from "templates" dir using "index" view defined in myapp/views.py when urlhttp://localhost:8000/indexis accessed. So far so good.

I am porting this "myproject" to work with cherokee (1.0.18 ppa) on ubuntu
10.10 with python2.6.6.

Cherokee web configuration:
I have defined a virtualhost and set the "document root" to
/path/to/myproject/mymedia for It hosts jquery and other css to decorate
base.html
I notice two workers on different ports handling csgi protocol: "python
/path/to/myproject/manage.py runfcgi protocol=scgi host=127.0.0.1
port=57698"
I have followed the config settings as defined athttp://www.cherokee-project.com/doc/cookbook_django.htmlusing SCGI

1) Accessinghttp://localhost/myprojectdisplays the whole hierarchy of
files in the "myproject" which is not what i want to display.
so how do i make "index" function in myapp/views.py render base.html as
before with cherokee ?
2) I find only empty logs in /var/log/cherokee/*.log and unable to find
the cherokee errors if any. how do i find them ?
3) Do I have to modify dir/file permissions to "myproject" recursively to
make it work ?
4) The virtual host defined name does not work (viz., www.example.com) when
used as url in a browser.
5) How do I display (render) "myproject" on the browser usinghttp://localhost/myprojectORhttp://www.example.com? which is the correct
way ?

pls let me know

regards,
KM

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

Offline

#2 Jan. 23, 2011 13:13:14

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

django + cherokee configuration problem


> 1) Accessinghttp://localhost/myprojectdisplays the whole hierarchy of
> files in the "myproject" which is not what i want to display.
> so how do i make "index" function in myapp/views.py render base.html as
> before with cherokee ?

looks like you put your django project root as the path for static root instead
of to mymedia? check your dir settings in the virtual server.

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

Offline

#3 Jan. 23, 2011 13:28:35

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

django + cherokee configuration problem


On Sun, Jan 23, 2011 at 6:42 PM, Ivo Brodien <i...@brodien.de> wrote:

>
> 1) Accessinghttp://localhost/myprojectdisplays the whole hierarchy of
> files in the "myproject" which is not what i want to display.
> so how do i make "index" function in myapp/views.py render base.html
> as before with cherokee ?
>
>
> looks like you put your django project root as the path for static root
> instead of to mymedia? check your dir settings in the virtual server.
>
> No.
The "document root" of the virtual server points to /path/to/mymedia
and the django project root points to /path/to/myproject
but still i have the same issue.
regards,
KM


> --
> 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<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-users@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

  • Root
  • » Django
  • » django + cherokee configuration problem [RSS Feed]

Board footer

Moderator control

Enjoy the 21st 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