DrkSephy / django-hackathon-starter

A boilerplate for Django web applications
1.61k stars 298 forks source link

Add landing/homepage #32

Closed KatherineMichel closed 8 years ago

KatherineMichel commented 8 years ago

Hi,

I think you should add a landing/homepage. For one thing, it's counter-intuitive to start a project on a local server and have an error where index.html would usually be, though I see that you have already used index.html in the app. Could do something like this at a project level in hackathon-starter/urls.py:

from django.conf.urls import patterns, include, url from django.contrib import admin from django.views.generic import TemplateView

urlpatterns = patterns('', url(r'^$', TemplateView.as_view(template_name='homepage.html'), name="homepage"), url(r'^hackathon/', include('hackathon.urls')), url(r'^admin/', include(admin.site.urls)),

url(r'^openid/(.*)', SessionConsumer()),

)

And add templates (with homepage.html) and static directories:

hackathon-starter/
    manage.py
    hackathon-starter/
        __init__.py
        settings.py
        urls.py
        wsgi.py
    hackathon/
            app-level-files
    static/ 
    templates/
        homepage.html

Of course the homepage.html would provide a link to (/hackathon) index.html. What do you think?

DrkSephy commented 8 years ago

Thank you for this, I appreciate the feedback and suggestions!. I decided to go ahead and simply make the landing page to be configured to localhost:8000 (the default route), instead of /hackathon. It should have always been that way to begin with, honestly.

KatherineMichel commented 8 years ago

Good idea. I did not know if you were open to doing it that way :)