This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSTALLED_APPS = [ | |
'django.contrib.admin', | |
'django.contrib.auth', | |
'django.contrib.contenttypes', | |
'django.contrib.sessions', | |
'django.contrib.messages', | |
'django.contrib.staticfiles', | |
'hello' | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from django.conf.urls import url, include | |
from django.contrib import admin | |
urlpatterns = [ | |
url(r'^admin/', admin.site.urls), | |
url(r'^', include('hello.urls')), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hello/urls.py | |
from django.conf.urls import url | |
from helloimport views | |
urlpatterns = [ | |
url(r'^$', views.HomePageView.as_view()), | |
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# hello/views.py | |
from django.shortcuts import render | |
from django.views.generic import TemplateView | |
# Create your views here. | |
class HomePageView(TemplateView): | |
def get(self, request, **kwargs): | |
return render(request, 'index.html', context=None) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- hello/templates/index.html --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Howdy!</title> | |
</head> | |
<body> | |
<h1>Howdy! I am Learning Django!</h1> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!-- hello/templates/index.html --> | |
<!DOCTYPE html> | |
<html> | |
<head> | |
<meta charset="utf-8"> | |
<title>Hello World!</title> | |
</head> | |
<body> | |
<h1>Hello World!<br> I am Learning Django!</h1> | |
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@Component({ | |
selector: "Cerca", | |
moduleId: module.id, | |
templateUrl: "./cerca.component.html" | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<Page > | |
<TabView id="tabViewContainer" class="icon" > | |
<StackLayout *tabItem="{title: 'Home'}"> | |
<Home></Home> | |
</StackLayout> | |
<StackLayout *tabItem="{title: 'Cerca'}"> | |
<Cerca></Cerca> | |
</StackLayout> | |
<StackLayout *tabItem="{title: 'Impostazioni'}"> | |
<Impostazioni></Impostazioni> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Example of var keyword visibility | |
if ( true ) { | |
var x = 20; | |
} | |
function set() { | |
var x = 50; | |
// Write the values in the console | |
console.log(x); // Result : 50 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
function set() { | |
var x = 50; | |
var y = 30; | |
} | |
// Call the set() function | |
set(); |
OlderNewer