List Info

Thread: Almost there: A little help in how template dirs under Linux




Almost there: A little help in how template dirs under Linux
user name
2006-06-29 04:01:01
After 2 weeks I was able to setup django under CentOS 3 ;)

Now, I'm so close... I can see the login screen of admin
but the admin
media files and my media and the templates are not loading
:(

This is under lighttpd with the lastest svn code with the
new fastcgi:

lighttp:

server.document-root        =
"/root/vulcano/jhonWeb/data/files/"

#### fastcgi module

fastcgi.server = (
                "/main.fcgi" => (
                        "main" => (
                                "host" =>
"127.0.0.1",
                                "port" =>
3033,
                                "check-local"
=> "disable"
                        )
                ),
                "/admin.fcgi" => (
                        "admin" => (
                                "socket" =>
"/tmp/admin.socket",
                                "check-local"
=> "disable"
                        )
                )
)

alias.url = (
    "/media/" =>
"/root/django_src/django/contrib/admin/media/",
)

url.rewrite-once = (
    "^(/media.*)$" => "$1",
    "^/favicon\.ico$" =>
"/media/favicon.ico",
    "^(/.*)$" => "/main.fcgi$1",
    "^(/admin.*)$" =>
"/admin.fcgi$1",
)


* Settings file:

#Determinar si esta en el servidor de desarrollo o de
produccion...
if os.name=='nt':
    BASE_DIR = 'E:\\Proyectos\\Python\\jhonWeb\\'
else:
    BASE_DIR = '/root/vulcano/jhonWeb/'

SITE_ID = 1

# Absolute path to the directory that holds media.
# Example: "/home/media/media.lawrence.com/"
if os.name=='nt':
    MEDIA_ROOT = BASE_DIR + 'data\\files\\'
else:
    MEDIA_ROOT = BASE_DIR + 'data/files/'

# URL prefix for admin media -- CSS, JavaScript and images.
Make sure
to use a
# trailing slash.
# Examples: "http://foo.com/media/"
;, "/media/".
ADMIN_MEDIA_PREFIX = '/media/'

TEMPLATE_DIRS = (
    # Put strings here, like
"/home/html/django_templates".
    # Always use forward slashes, even on Windows.
    'plantillas',
    '/root/vulcano/jhonWeb/plantillas',
)


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-29 04:03:12
I forgot to add this details:

django is installed in /root/django_src

The project is in

/root/vulcano/jhonWeb/


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-29 04:40:41
On 6/28/06, mamcxyz <mamcxyzgmail.com> wrote:
>
> I forgot to add this details:
>
> django is installed in /root/django_src
>
> The project is in
>
> /root/vulcano/jhonWeb/

Surface-level: have you ensured that the user lighty/fcgi is
running
under has access to the template dir?

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-29 14:02:59
How I know? The error is (sorry, I forget the error):

TemplateSyntaxError at /buscar/
Template 'layoutinternal.html' cannot be extended, because
it doesn't
exist
Request Method: 	GET
Request URL: 	http://204.14.107.36/bus
car/
Exception Type: 	TemplateSyntaxError
Exception Value: 	Template 'layoutinternal.html' cannot be
extended,
because it doesn't exist
Exception Location:
	/root/django_src/django/template/loader_tags.py in
get_parent, line 56


So I don't think is a security issue...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-29 14:42:10
Nevermind, is the "feature" of Linux of
case-sensitivity....

Now, I'm working in serve the media files...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-30 09:27:01

On 29 Jun 2006, at 5:03 am, mamcxyz wrote:

>
> I forgot to add this details:
>
> django is installed in /root/django_src
>
> The project is in
>
> /root/vulcano/jhonWeb/

This is a bit off-topic, but you shouldn't really run
things as root,  
if at all possible.

Cheers,

David

-- 
David Reynolds
davidreynoldsfamily.org.uk




--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Almost there: A little help in how template dirs under Linux
user name
2006-06-30 16:32:05
I know... but currently I'm looking how secure the
things...


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the
Google Groups "Django users" group.
To post to this group, send email to django-usersgooglegroups.com
To unsubscribe from this group, send email to
django-users-unsubscribegooglegroups.com
For more options, visit this group at http://gr
oups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

[1-7]

about | contact  Other archives ( Real Estate discussion Medical topics )