san
san

Reputation: 290

Making Django Application localhost/appname Browsable through localhost

My django application running on port 80 apache server and django, which I can browse by typing hxxp://localhost/myapp but i want it to directly browse by using hxxp://localhost. Where should i configure it to browse directly using localhost instead of typing localhost/myapp

xx=tt

Upvotes: 1

Views: 304

Answers (2)

Marco Frattallone
Marco Frattallone

Reputation: 356

try from your project folder:

python manage.py runserver

it starts a very simple webserver running on port 8000 so you can see your site visiting

http://localhost:8000

To have more details see django-admin.py and manage.py

Upvotes: 1

Odif Yltsaeb
Odif Yltsaeb

Reputation: 5656

all urls of your app are probably in your main urls.py or apps urls.py files.

Just edit the main urls.py file from:

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^myapp/', include('myapp.urls')),
)

to

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('myapp.urls')),
)

You will have to handle all the urls in your myapp urls.py then...

Alan

Upvotes: 1

Related Questions