Re: website path

2011-04-20 Thread Jacob Kaplan-Moss
2011/4/20 Ján Vorčák :
>    PythonHandler django.core.handlers.modpython

You really, really, really should upgrade to mod_wsgi. mod_python is a
dead project, and support for it be removed  from Django in the
future. More importantly, you're not going to find a whole lot of
people who can help you out with mod_python. That is, I've seen this
problem before, but it's been so long since I've switched away that I
can't recall what the solution is.

If you absolutely can't switch, read
http://docs.djangoproject.com/en/dev/howto/deployment/modpython/#basic-configuration
very carefully, especially the parts about `django.root`. My guess is
that you've got something slightly wrong there, though what you've
posted looks correct to me.

Good luck,

Jacob

-- 
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: website path

2011-04-20 Thread Ján Vorčák
Hi,

Thank you for your answer

Here's my httpd.conf


SetHandler python-program
PythonHandler django.core.handlers.modpython
SetEnv DJANGO_SETTINGS_MODULE settings
PythonOption django.root /django-application
PythonDebug On
PythonPath "['/root/xvorcak_dir/django/mysite/'] + sys.path"


and here's part of my urls.py

   (r'^$', 'tasks.views.index'),
# task CRUD
(r'^tasks/new', 'tasks.views.new'),
(r'^tasks/add', 'tasks.views.add'),



(r'^submittions$', 'tasks.views.submittions'),
(r'^mytasks', 'tasks.views.mytasks'),

(r'^accounts/login/$', 'django.contrib.auth.views.login',
{'template_name': 'login.html'}),

Thank you so much

On Apr 20, 4:26 am, Jacob Kaplan-Moss  wrote:
> 2011/4/19 Ján Vorčák :
>
> > I've installed a django on my server (running on apache), but I've
> > configured it to run using url like
> >www.mydomain.com/django-application/
>
> > Now when I access some url from django using absolute url it
> > automatically redirects me to
> >www.mydomain.com/someapplication
> > instead of
> >www.mydomain.com/django-application/someapplication
>
> This sounds like a problem I've seen when using Django under
> mod_python -- are you using mod_python?
>
> Either way, can you share your Apache config and the relevent
> URLconfs? It's hard to figure out what's wrong without all the
> details.
>
> Jacob

-- 
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: website path

2011-04-19 Thread Jacob Kaplan-Moss
2011/4/19 Ján Vorčák :
> I've installed a django on my server (running on apache), but I've
> configured it to run using url like
> www.mydomain.com/django-application/
>
> Now when I access some url from django using absolute url it
> automatically redirects me to
> www.mydomain.com/someapplication
> instead of
> www.mydomain.com/django-application/someapplication

This sounds like a problem I've seen when using Django under
mod_python -- are you using mod_python?

Either way, can you share your Apache config and the relevent
URLconfs? It's hard to figure out what's wrong without all the
details.

Jacob

-- 
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: website path

2011-04-19 Thread Jeff Blaine
How to avoid hardcoding URL paths in your templates:

http://docs.djangoproject.com/en/1.3/ref/templates/builtins/#url

Maybe that helps some?

I don't think I can be of more help.  I'm too new.

-- 
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: website path

2011-04-19 Thread Ján Vorčák
Hi
Thank you for your response

Yeah I've already read that,
But in urls.py I have to explicitly say that my url is like django-
application/someaplication
My point is that I want to avoid writing django-application inside
each url (+ in the template Link


On Apr 19, 11:03 pm, Jeff Blaine  wrote:
> I imagine you need to configure your urls.py
>
> I suggest going through the whole tutorial, starting at the following page.
>  This is all
> explained there.
>
> http://docs.djangoproject.com/en/1.3/intro/tutorial01/

-- 
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: website path

2011-04-19 Thread Jeff Blaine
I imagine you need to configure your urls.py

I suggest going through the whole tutorial, starting at the following page. 
 This is all
explained there.

http://docs.djangoproject.com/en/1.3/intro/tutorial01/

-- 
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.