Re: http links without using URLs.py

2009-01-27 Thread May

Thanks!

Ana

On Jan 27, 9:51 am, Adam Stein  wrote:
> Eggs seems to be something related to python packages, not sure exactly
> what they are used for.  I needed the PYTHON_EGG_CACHE because my web
> server could not write to the default egg cache directory and so I had
> it use a temp place.
>
> Perhaps somebody else can better explain eggs.
>
>
>
> On Tue, 2009-01-27 at 09:42 -0800, May wrote:
> > Hello Adam,
>
> > Thanks!  I have already set up several  sections for the
> > django site, so I must not have the syntax quite right for apache to
> > ignore the static links.  I will work on it.  One last question?  What
> > are eggs?
> >                  SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
>
> > Thanks,
> > Ana
>
> > On Jan 27, 9:23 am, Adam Stein  wrote:
> > > I ONLY use it for development with the Django server.  I only set up to
> > > serve static pages when DEBUG = True (as they show toward the bottom of
> > > the page).
>
> > > No need to change links on the production server (apache + mod_python)
> > > because the URLs are a different location than what I have set up for
> > > mod_python.
>
> > > You set up mod_python using  if you are using
> > > Apache.  This tells apache that ONLY what matches the specified location
> > > will use mod_python.
>
> > > An example:
>
> > >         
> > >                 SetHandler python-program
> > >                 PythonHandler django.core.handlers.modpython
> > >                 PythonInterpreter my_arbitrary_unique_name_here
> > >                 PythonPath "['/my/django/code'] + sys.path"
> > >                 SetEnv DJANGO_SETTINGS_MODULE WebSite.settings
> > >                 SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
> > >                 PythonDebug On
> > >         
>
> > > With this setup, only those URLs that have /my_django_site/ will go to
> > > Django (via mod_python).  Any other URLs will get serviced by Apache as
> > > normal.
>
> > > It is quite discouraged to have Django serve static pages on a
> > > production server since it's not meant for that, so it's slow and
> > > inefficient.
>
> > > On Tue, 2009-01-27 at 09:06 -0800, May wrote:
> > > > Hello,
>
> > > > The tutorial suggests not serving the static pages with this method on
> > > > a permanent basis.  Are you using this method for your production
> > > > server?  I'm using windows/apache/modpython and I've tried using the
> > > > IP address and still run into django url requests.  Do you know of a
> > > > way to get apache to override django?
>
> > > > Thanks,
>
> > > > Ana
>
> > > > On Jan 27, 8:55 am, Adam Stein  wrote:
> > > > > Check out:
>
> > > > >http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
>
> > > > > I have Django serve static files during development so that all my 
> > > > > links
> > > > > that don't need to go thru Django work.
>
> > > > > On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > > > > > Hello,
>
> > > > > > I'm converting PHP pages to Django.  I'm using base.html  for my
> > > > > > formatting.  I've included the left-side bar in the base.html, which
> > > > > > includes links that do not require using a database, such as the
> > > > > > "contact us" page.  Since I'm using localhost for testing my link
> > > > > > looks something like this:
>
> > > > > > http://127.0.0.1/contactus.html/"; >Contact Us
>
> > > > > > Since the left-side bar is in base.html when the link is selected
> > > > > > django requires that I place the link in the URL.py and include it 
> > > > > > in
> > > > > > View.py.  I have many links like this and would prefer that the 
> > > > > > links
> > > > > > go directly to the page ignoring the django requests.
>
> > > > > > Is there a simple work around for this, that will allow me to 
> > > > > > continue
> > > > > > to use the convenience of the base.html inheritance?
>
> > > > > > Thanks,
>
> > > > > > Ana
> > > > > > --
>
> > > > > Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> > > > > Disclaimer: Any/All views expressed
> > > > > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> > > > --
>
> > > Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> > > Disclaimer: Any/All views expressed
> > > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> > --
>
> Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> Disclaimer: Any/All views expressed
> here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
--~--~-~--~~~---~--~~
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 at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: http links without using URLs.py

2009-01-27 Thread Adam Stein

Eggs seems to be something related to python packages, not sure exactly
what they are used for.  I needed the PYTHON_EGG_CACHE because my web
server could not write to the default egg cache directory and so I had
it use a temp place.

Perhaps somebody else can better explain eggs.

On Tue, 2009-01-27 at 09:42 -0800, May wrote:
> Hello Adam,
> 
> Thanks!  I have already set up several  sections for the
> django site, so I must not have the syntax quite right for apache to
> ignore the static links.  I will work on it.  One last question?  What
> are eggs?
>  SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
> 
> Thanks,
> Ana
> 
> On Jan 27, 9:23 am, Adam Stein  wrote:
> > I ONLY use it for development with the Django server.  I only set up to
> > serve static pages when DEBUG = True (as they show toward the bottom of
> > the page).
> >
> > No need to change links on the production server (apache + mod_python)
> > because the URLs are a different location than what I have set up for
> > mod_python.
> >
> > You set up mod_python using  if you are using
> > Apache.  This tells apache that ONLY what matches the specified location
> > will use mod_python.
> >
> > An example:
> >
> > 
> > SetHandler python-program
> > PythonHandler django.core.handlers.modpython
> > PythonInterpreter my_arbitrary_unique_name_here
> > PythonPath "['/my/django/code'] + sys.path"
> > SetEnv DJANGO_SETTINGS_MODULE WebSite.settings
> > SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
> > PythonDebug On
> > 
> >
> > With this setup, only those URLs that have /my_django_site/ will go to
> > Django (via mod_python).  Any other URLs will get serviced by Apache as
> > normal.
> >
> > It is quite discouraged to have Django serve static pages on a
> > production server since it's not meant for that, so it's slow and
> > inefficient.
> >
> >
> >
> > On Tue, 2009-01-27 at 09:06 -0800, May wrote:
> > > Hello,
> >
> > > The tutorial suggests not serving the static pages with this method on
> > > a permanent basis.  Are you using this method for your production
> > > server?  I'm using windows/apache/modpython and I've tried using the
> > > IP address and still run into django url requests.  Do you know of a
> > > way to get apache to override django?
> >
> > > Thanks,
> >
> > > Ana
> >
> > > On Jan 27, 8:55 am, Adam Stein  wrote:
> > > > Check out:
> >
> > > >http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
> >
> > > > I have Django serve static files during development so that all my links
> > > > that don't need to go thru Django work.
> >
> > > > On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > > > > Hello,
> >
> > > > > I'm converting PHP pages to Django.  I'm using base.html  for my
> > > > > formatting.  I've included the left-side bar in the base.html, which
> > > > > includes links that do not require using a database, such as the
> > > > > "contact us" page.  Since I'm using localhost for testing my link
> > > > > looks something like this:
> >
> > > > > http://127.0.0.1/contactus.html/"; >Contact Us
> >
> > > > > Since the left-side bar is in base.html when the link is selected
> > > > > django requires that I place the link in the URL.py and include it in
> > > > > View.py.  I have many links like this and would prefer that the links
> > > > > go directly to the page ignoring the django requests.
> >
> > > > > Is there a simple work around for this, that will allow me to continue
> > > > > to use the convenience of the base.html inheritance?
> >
> > > > > Thanks,
> >
> > > > > Ana
> > > > > --
> >
> > > > Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com
> >
> > > > Disclaimer: Any/All views expressed
> > > > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> > > --
> >
> > Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com
> >
> > Disclaimer: Any/All views expressed
> > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> -- 
Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com

Disclaimer: Any/All views expressed
here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]


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



Re: http links without using URLs.py

2009-01-27 Thread May

Hello Adam,

Thanks!  I have already set up several  sections for the
django site, so I must not have the syntax quite right for apache to
ignore the static links.  I will work on it.  One last question?  What
are eggs?
 SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs

Thanks,
Ana

On Jan 27, 9:23 am, Adam Stein  wrote:
> I ONLY use it for development with the Django server.  I only set up to
> serve static pages when DEBUG = True (as they show toward the bottom of
> the page).
>
> No need to change links on the production server (apache + mod_python)
> because the URLs are a different location than what I have set up for
> mod_python.
>
> You set up mod_python using  if you are using
> Apache.  This tells apache that ONLY what matches the specified location
> will use mod_python.
>
> An example:
>
>         
>                 SetHandler python-program
>                 PythonHandler django.core.handlers.modpython
>                 PythonInterpreter my_arbitrary_unique_name_here
>                 PythonPath "['/my/django/code'] + sys.path"
>                 SetEnv DJANGO_SETTINGS_MODULE WebSite.settings
>                 SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
>                 PythonDebug On
>         
>
> With this setup, only those URLs that have /my_django_site/ will go to
> Django (via mod_python).  Any other URLs will get serviced by Apache as
> normal.
>
> It is quite discouraged to have Django serve static pages on a
> production server since it's not meant for that, so it's slow and
> inefficient.
>
>
>
> On Tue, 2009-01-27 at 09:06 -0800, May wrote:
> > Hello,
>
> > The tutorial suggests not serving the static pages with this method on
> > a permanent basis.  Are you using this method for your production
> > server?  I'm using windows/apache/modpython and I've tried using the
> > IP address and still run into django url requests.  Do you know of a
> > way to get apache to override django?
>
> > Thanks,
>
> > Ana
>
> > On Jan 27, 8:55 am, Adam Stein  wrote:
> > > Check out:
>
> > >http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
>
> > > I have Django serve static files during development so that all my links
> > > that don't need to go thru Django work.
>
> > > On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > > > Hello,
>
> > > > I'm converting PHP pages to Django.  I'm using base.html  for my
> > > > formatting.  I've included the left-side bar in the base.html, which
> > > > includes links that do not require using a database, such as the
> > > > "contact us" page.  Since I'm using localhost for testing my link
> > > > looks something like this:
>
> > > > http://127.0.0.1/contactus.html/"; >Contact Us
>
> > > > Since the left-side bar is in base.html when the link is selected
> > > > django requires that I place the link in the URL.py and include it in
> > > > View.py.  I have many links like this and would prefer that the links
> > > > go directly to the page ignoring the django requests.
>
> > > > Is there a simple work around for this, that will allow me to continue
> > > > to use the convenience of the base.html inheritance?
>
> > > > Thanks,
>
> > > > Ana
> > > > --
>
> > > Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> > > Disclaimer: Any/All views expressed
> > > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> > --
>
> Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> Disclaimer: Any/All views expressed
> here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
--~--~-~--~~~---~--~~
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 at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: http links without using URLs.py

2009-01-27 Thread Brian Neal

On Jan 27, 11:06 am, May  wrote:
> Hello,
>
> The tutorial suggests not serving the static pages with this method on
> a permanent basis.  Are you using this method for your production
> server?  I'm using windows/apache/modpython and I've tried using the
> IP address and still run into django url requests.  Do you know of a
> way to get apache to override django?
>
> Thanks,
>
> Ana

You might want to look into using the contributed app Flatpages for
these static pages.

http://docs.djangoproject.com/en/dev/ref/contrib/flatpages/

Alternatively, in an Apache environment, you could use the location
directive to tell Apache not to send requests for certain files in a
certain directory through mod_python. This would be similar to telling
Apache not to send media files through mod_python, as discussed here:

http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#id1

Maybe something like:


SetHandler None


Then put all your static html files in that directory.

BN

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



Re: http links without using URLs.py

2009-01-27 Thread Marco Buttu

On Tue, 2009-01-27 at 08:42 -0800, May wrote:

> I'm converting PHP pages to Django.  I'm using base.html  for my
> formatting.  I've included the left-side bar in the base.html, which
> includes links that do not require using a database, such as the
> "contact us" page.  Since I'm using localhost for testing my link
> looks something like this:
> 
> http://127.0.0.1/contactus.html/"; >Contact Us
> 
> Since the left-side bar is in base.html when the link is selected
> django requires that I place the link in the URL.py and include it in
> View.py.  I have many links like this and would prefer that the links
> go directly to the page ignoring the django requests.

If you want to bypass the view you can try direct_to_template:

http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views-generic-simple-direct-to-template


-- 
Marco Buttu




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



Re: http links without using URLs.py

2009-01-27 Thread Adam Stein

I ONLY use it for development with the Django server.  I only set up to
serve static pages when DEBUG = True (as they show toward the bottom of
the page).

No need to change links on the production server (apache + mod_python)
because the URLs are a different location than what I have set up for
mod_python.

You set up mod_python using  if you are using
Apache.  This tells apache that ONLY what matches the specified location
will use mod_python.

An example:


SetHandler python-program
PythonHandler django.core.handlers.modpython
PythonInterpreter my_arbitrary_unique_name_here
PythonPath "['/my/django/code'] + sys.path"
SetEnv DJANGO_SETTINGS_MODULE WebSite.settings
SetEnv PYTHON_EGG_CACHE /tmp/.python-eggs
PythonDebug On


With this setup, only those URLs that have /my_django_site/ will go to
Django (via mod_python).  Any other URLs will get serviced by Apache as
normal.

It is quite discouraged to have Django serve static pages on a
production server since it's not meant for that, so it's slow and
inefficient.

On Tue, 2009-01-27 at 09:06 -0800, May wrote:
> Hello,
> 
> The tutorial suggests not serving the static pages with this method on
> a permanent basis.  Are you using this method for your production
> server?  I'm using windows/apache/modpython and I've tried using the
> IP address and still run into django url requests.  Do you know of a
> way to get apache to override django?
> 
> Thanks,
> 
> Ana
> 
> On Jan 27, 8:55 am, Adam Stein  wrote:
> > Check out:
> >
> > http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
> >
> > I have Django serve static files during development so that all my links
> > that don't need to go thru Django work.
> >
> >
> >
> > On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > > Hello,
> >
> > > I'm converting PHP pages to Django.  I'm using base.html  for my
> > > formatting.  I've included the left-side bar in the base.html, which
> > > includes links that do not require using a database, such as the
> > > "contact us" page.  Since I'm using localhost for testing my link
> > > looks something like this:
> >
> > > http://127.0.0.1/contactus.html/"; >Contact Us
> >
> > > Since the left-side bar is in base.html when the link is selected
> > > django requires that I place the link in the URL.py and include it in
> > > View.py.  I have many links like this and would prefer that the links
> > > go directly to the page ignoring the django requests.
> >
> > > Is there a simple work around for this, that will allow me to continue
> > > to use the convenience of the base.html inheritance?
> >
> > > Thanks,
> >
> > > Ana
> > > --
> >
> > Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com
> >
> > Disclaimer: Any/All views expressed
> > here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
> -- 
Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com

Disclaimer: Any/All views expressed
here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]


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



Re: http links without using URLs.py

2009-01-27 Thread May

Hello,

The tutorial suggests not serving the static pages with this method on
a permanent basis.  Are you using this method for your production
server?  I'm using windows/apache/modpython and I've tried using the
IP address and still run into django url requests.  Do you know of a
way to get apache to override django?

Thanks,

Ana

On Jan 27, 8:55 am, Adam Stein  wrote:
> Check out:
>
> http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs
>
> I have Django serve static files during development so that all my links
> that don't need to go thru Django work.
>
>
>
> On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> > Hello,
>
> > I'm converting PHP pages to Django.  I'm using base.html  for my
> > formatting.  I've included the left-side bar in the base.html, which
> > includes links that do not require using a database, such as the
> > "contact us" page.  Since I'm using localhost for testing my link
> > looks something like this:
>
> > http://127.0.0.1/contactus.html/"; >Contact Us
>
> > Since the left-side bar is in base.html when the link is selected
> > django requires that I place the link in the URL.py and include it in
> > View.py.  I have many links like this and would prefer that the links
> > go directly to the page ignoring the django requests.
>
> > Is there a simple work around for this, that will allow me to continue
> > to use the convenience of the base.html inheritance?
>
> > Thanks,
>
> > Ana
> > --
>
> Adam Stein @ Xerox Corporation       Email: a...@eng.mc.xerox.com
>
> Disclaimer: Any/All views expressed
> here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]
--~--~-~--~~~---~--~~
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 at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: http links without using URLs.py

2009-01-27 Thread Adam Stein

Check out:

http://docs.djangoproject.com/en/dev/howto/static-files/?from=olddocs

I have Django serve static files during development so that all my links
that don't need to go thru Django work.

On Tue, 2009-01-27 at 08:42 -0800, May wrote:
> Hello,
> 
> I'm converting PHP pages to Django.  I'm using base.html  for my
> formatting.  I've included the left-side bar in the base.html, which
> includes links that do not require using a database, such as the
> "contact us" page.  Since I'm using localhost for testing my link
> looks something like this:
> 
> http://127.0.0.1/contactus.html/"; >Contact Us
> 
> Since the left-side bar is in base.html when the link is selected
> django requires that I place the link in the URL.py and include it in
> View.py.  I have many links like this and would prefer that the links
> go directly to the page ignoring the django requests.
> 
> Is there a simple work around for this, that will allow me to continue
> to use the convenience of the base.html inheritance?
> 
> Thanks,
> 
> Ana
> -- 
Adam Stein @ Xerox Corporation   Email: a...@eng.mc.xerox.com

Disclaimer: Any/All views expressed
here have been proven to be my own.  [http://www.csh.rit.edu/~adam/]


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



http links without using URLs.py

2009-01-27 Thread May

Hello,

I'm converting PHP pages to Django.  I'm using base.html  for my
formatting.  I've included the left-side bar in the base.html, which
includes links that do not require using a database, such as the
"contact us" page.  Since I'm using localhost for testing my link
looks something like this:

http://127.0.0.1/contactus.html/"; >Contact Us

Since the left-side bar is in base.html when the link is selected
django requires that I place the link in the URL.py and include it in
View.py.  I have many links like this and would prefer that the links
go directly to the page ignoring the django requests.

Is there a simple work around for this, that will allow me to continue
to use the convenience of the base.html inheritance?

Thanks,

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