Discussion:
Why I can't pass anything to my html? Django 2.1
Rookies DJ
2018-11-12 03:41:00 UTC
Permalink
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see

from django.shortcuts import render
from zigview.models import tank_system

def index(request):
return render(request,'FrounterWeb/includes.html')

def login(requset):
return render(requset, 'FrounterWeb/login.html')


def timedex(requset):
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)


Here my models

from django.db import models


class user(models.Model):
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)


class tank_system(models.Model):
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)


Here my HTML that i try pass variable in

<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>

</table>


My HTML body structures

Web

├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html

This my urls files;

from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView

urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/8123c3d9-e972-426f-9b1f-46a463b98548%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Tosin Ayoola
2018-11-12 12:44:17 UTC
Permalink
halo,
working on a contact us form to receive information from the user but my
issue is the data doesn't get save to the database and i'm not getting any
error message can anyone help out
below is my view an forms.py
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/8123c3d9-e972-426f-9b1f-46a463b98548%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/8123c3d9-e972-426f-9b1f-46a463b98548%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAHLKn72vc8NQ1OvR46Dg3Uf_EZEfp2zfNbwCRHja%2B6XHZqWx5w%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Cuneyt Mertayak
2018-11-12 13:26:48 UTC
Permalink
The content for the `render` method is supposed to be a
dictionary: https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments

So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})

Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.

Hope it helps!
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/7973bb6a-6b32-468f-9c21-a2c5c47e8880%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Cuneyt Mertayak
2018-11-12 13:27:41 UTC
Permalink
vvv Typo: read "context" instead of "content" vvv
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
amit pant
2018-11-12 15:38:34 UTC
Permalink
you need to make dictionary for display variables using html
Post by Cuneyt Mertayak
vvv Typo: read "context" instead of "content" vvv
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF2Ah_H%3DP7sJDXYPsg2SMiqVKUFe9cUFRkej%3DQ-rn_2XdkgSRQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Rookies DJ
2018-11-15 02:21:11 UTC
Permalink
Hi Amit pant

I'm sorry how do that (make dictionary for display variables using html)

Maybe you could give me some sample code?
Post by amit pant
you need to make dictionary for display variables using html
Post by Cuneyt Mertayak
vvv Typo: read "context" instead of "content" vvv
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views
into html, but every time I run my code, it works but it doesn't display
the variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/0ccdcf5d-1d90-41e4-be33-f3684dace2b1%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b6acf5ff-b2cb-4769-bdf0-67e7b5104bcc%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rookies DJ
2018-11-13 08:29:03 UTC
Permalink
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Thx for help
Cuneyt Mertayak

but it didn't work, appreciate the reply, but suspect that the whiten the
request to return there nothing, is the whole code become empty, that my
believes
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/45d9f4af-4807-4692-8d6e-dcc7ab14818a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Omar Abou Mrad
2018-11-13 09:07:01 UTC
Permalink
We would require more information;
What errors do you get?
What are you seeing?

Either way, this is not correct: tank = tank_system.object.get(id(5))
It should be: tank = tank_system.object.get(id=5)

I suggest going through the django tutorial if you haven't already.
Post by Rookies DJ
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Thx for help
Cuneyt Mertayak
but it didn't work, appreciate the reply, but suspect that the whiten the
request to return there nothing, is the whole code become empty, that my
believes
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/45d9f4af-4807-4692-8d6e-dcc7ab14818a%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/45d9f4af-4807-4692-8d6e-dcc7ab14818a%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFwtXp1aegZkZBNXqMXZfqs%2Bo_YhJonxd%2BN4P4ecRahEuqsqrA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Rookies DJ
2018-11-14 06:39:47 UTC
Permalink
Hi Omar Abou Mrad thanks for helping me,

Please read the ones in red:

What are you seeing?
My Web page as I want but, i'm missing the key value form my database

What errors do you get?
no errors everything working fine

in summary i'm not having any errors but i can't see anything form my
database

My project goal is retrieve a data form the database and display on web-page

But i can't pass any value form my database into my html page

Thanks help Omar Abou Mrad
Post by Omar Abou Mrad
We would require more information;
What errors do you get?
What are you seeing?
Either way, this is not correct: tank = tank_system.object.get(id(5))
It should be: tank = tank_system.object.get(id=5)
I suggest going through the django tutorial if you haven't already.
Post by Rookies DJ
Post by Cuneyt Mertayak
https://docs.djangoproject.com/en/2.1/topics/http/shortcuts/#optional-arguments
So change it to this render(requset, "FrounterWeb/body.html",{'tank': tank})
Also in the template file you want to display the properties of the ORM
(tank_system) object I guess, change them to <td>{{tank.EC}}</td>, <td>
{{tank. temp}}</td>, respectively.
Hope it helps!
Thx for help
Cuneyt Mertayak
but it didn't work, appreciate the reply, but suspect that the whiten
the request to return there nothing, is the whole code become empty, that
my believes
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an
<javascript:>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit
https://groups.google.com/d/msgid/django-users/45d9f4af-4807-4692-8d6e-dcc7ab14818a%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/45d9f4af-4807-4692-8d6e-dcc7ab14818a%40googlegroups.com?utm_medium=email&utm_source=footer>
.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/40fc4541-5242-4b21-897e-b064bcde519b%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Rookies DJ
2018-11-17 13:16:59 UTC
Permalink
*Answer:*

Hi everyone Thanks for helping me but I found out my mistake and the cause
of the problems;
The problems are my URL, is not calling my def in views
Post by Rookies DJ
I been trying 2 weeks on trying to pass variables form Django views into
html, but every time I run my code, it works but it doesn't display the
variable I see
from django.shortcuts import render
from zigview.models import tank_system
return render(request,'FrounterWeb/includes.html')
return render(requset, 'FrounterWeb/login.html')
tank = tank_system.object.get(id(5))
print(tank)
return render(requset, "FrounterWeb/body.html",tank)
Here my models
from django.db import models
username = models.CharField(max_length=50)
password = models.CharField(max_length=50)
Ph = models.DecimalField(max_digits=2, decimal_places=1)
EC = models.DecimalField(max_digits=2, decimal_places=1)
temp = models.DecimalField(max_digits=2, decimal_places=0)
level = models.IntegerField(primary_key=True, default=0)
data = models.DateTimeField(auto_now=True)
Here my HTML that i try pass variable in
<table align="right" style="width:80%">
<tr>
<th>Time</th>
<th>Tank level</th>
<th>EC</th>
<th>pH</th>
<th>room temptures</th>
<th>Water temptrure</th>
</tr>
<tr>
<td>22.30</td>
<td>900 lits</td>
<td>{{tank}}</td>
<td>7.3</td>
<td>{{tank}}</td>
<td>24</td>
</tr>
</table>
My HTML body structures
Web
├── templates
│ ├── index.hmtl
│ │ └── includes
│ ├── body.hml
│ ├── header.html
This my urls files;
from django.contrib import admin
from django.urls import include, path
from django.views.generic.base import TemplateView
urlpatterns = [
path(r'^admin/$', admin.site.urls),
path('account', include('django.contrib.auth.urls')),
path('', include('zigview.urls')),
path(r'', TemplateView.as_view(template_name='index.html'), name = 'myapp'),
]
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+***@googlegroups.com.
To post to this group, send email to django-***@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/a037ca51-72fe-40d8-ab62-b1e7cd56f676%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Continue reading on narkive:
Loading...