First time here? Check out the FAQ!
1

direct to www.site.com and remove /questions

How to remove alias /questions so that the site will be direct www.site.com and not www.site.com/questions ?

Centos : dedicated server with python Django daemon

Thx

coldsystem's avatar
31
coldsystem
asked 2013-02-27 15:59:23 -0600
pajju's avatar
565
pajju
updated 2013-03-02 14:33:28 -0600
edit flag offensive 0 remove flag close merge delete

Comments

add a comment see more comments

2 Answers

0

i cant this in My askbot directory

[root@ks3266231 livesite]# ls
askbot        log            settings.py-203022013  static
data.json     manage.py      settings.py-22022013   urls.py
django.wsgi   nohup.out      settings.pyc           urls.pyc
__init__.py   settings.py    settings.py.orig       urls.py-working
__init__.pyc    settings.py-woking     
[root@ks3266231 livesite]#


[root@ks3266231 livesite]# grep  index urls.py
[root@ks3266231 livesite]# grep questions urls.py


[root@ks4000391 liveaskbot0748]# cat urls.py
"""
main url configuration file for the askbot site
"""
from django.conf import settings
from django.conf.urls.defaults import handler404
from django.conf.urls.defaults import handler500
from django.conf.urls.defaults import include
from django.conf.urls.defaults import patterns
from django.conf.urls.defaults import url
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

if getattr(settings, 'ASKBOT_MULTILINGUAL', False) == True:
    from django.conf.urls.i18n import i18n_patterns
    urlpatterns = i18n_patterns('',
        (r'%s' % settings.ASKBOT_URL, include('askbot.urls'))
    )
else:
    urlpatterns = patterns('',
        (r'%s' % settings.ASKBOT_URL, include('askbot.urls'))
    )

urlpatterns += patterns('',
    (r'^admin/', include(admin.site.urls)),
    #(r'^cache/', include('keyedcache.urls')), - broken views disable for now
    (r'^settings/', include('askbot.deps.livesettings.urls')),
    (r'^followit/', include('followit.urls')),
    (r'^tinymce/', include('tinymce.urls')),
    (r'^robots.txt$', include('robots.urls')),
    url( # TODO: replace with django.conf.urls.static ?
        r'^%s(?P<path>.*)$' % settings.MEDIA_URL[1:],
        'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT.replace('\\','/')},
    ),
)

if 'rosetta' in settings.INSTALLED_APPS:
    urlpatterns += patterns('',
                    url(r'^rosetta/', include('rosetta.urls')),
                )
[root@ks4000391 liveaskbot0748]#

cant find this in the urls.py !!!:(

coldsystem's avatar
31
coldsystem
answered 2013-02-28 03:43:00 -0600, updated 2013-02-28 03:48:23 -0600
edit flag offensive 0 remove flag delete link

Comments

1

check the file askbot.urls( inside askbot)

pajju's avatar pajju (2013-03-02 14:36:49 -0600) edit
add a comment see more comments
0

Try this by editing file askbot/urls.py. Lines where urls named 'index' and 'questions' are defined.

We might make the homepage listing questions by default, but we also might use it for other purposes - like show listing of subforums, so the function shown on the main page may in the future depend on the configuration.

Evgeny's avatar
13.2k
Evgeny
answered 2013-02-27 16:16:46 -0600
edit flag offensive 0 remove flag delete link

Comments

add a comment see more comments