Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[#37] - Added simple home page, templates folder and modify settings and... #39

Merged
merged 3 commits into from
Apr 1, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion sandbox/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,7 @@

STATIC_URL = '/static/'

TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'accounts/templates'), )
TEMPLATE_DIRS = (os.path.join(BASE_DIR, 'templates'),
)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

a co z places/templates ?
ps. skoro to trzeba dodać to jakim cudem to wrześniej działało ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nie trzeba tego dodawać, wystarczy dodać aplikację do INSTALLED_APPS i samo będzie znajdywało szablony w folderze "templates" w aplikacji.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To jest zewnętrzny katalog, dodany poza aplikację, dlatego trzeba to dodać inaczej nie przeszukuje tego katalogu (nie ma aplikacji) to jest luźny katalog.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No ale mówimy tutaj przecież o "accounts/templates", a accounts to jest przecież aplikacja.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aaaa, ok, no tak to jest niepotrzebne, ale to już było dodane wcześniej. Można to usunąć i zostawić sam wpis z templates. 👍

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

dzięki :)


AUTH_USER_MODEL = 'accounts.User'
2 changes: 2 additions & 0 deletions sandbox/urls.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.views.generic import TemplateView

urlpatterns = patterns('',
url(r'^admin/', include(admin.site.urls)),
url(r'^$', TemplateView.as_view(template_name='index.html'), name='home'),
url(r'^accounts/', include('accounts.urls', namespace='accounts')),
url(r'^places/', include('places.urls', namespace='places'))
)
8 changes: 8 additions & 0 deletions templates/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
<html>
<head>
<title>Sandbox</title>
</head>
<body>
Welcome
</body>
</html>