Python Forum
creating a blog, models.py is empty
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
creating a blog, models.py is empty
#1
I'm creating a blog based on Antonio Mele course Packhub course - create a python blog. Wondering why Huh the models.py file is empty instead off Mele version ?
What command do I use to genereate the correct models.py to continue the lessons Smile

[Image: Vej3lm.jpg]
Reply
#2
Please do not post images, rather post your code, output and errors in their entirety between their respective tags. Refer to the BBCode section of the Help Doc.

Also specify what OS you are using and what version of Python.
If it ain't broke, I just haven't gotten to it yet.
OS: Windows 10, openSuse 42.3, freeBSD 11, Raspian "Stretch"
Python 3.6.5, IDE: PyCharm 2018 Community Edition
Reply
#3
Here is the request info:
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit (AMD64)] on win32

i start with to generate the startfiles to build a blog
python manage.py startapp blog
C:\Windows\System32\mysite\blog>ls
__init__.py admin.py migrations models.py tests.py views.py

opening file models.py
from django.db import models is 

# Create your models here.
Reply
#4
It should be empty,you have to fill in database setup for the blog in models.py.
They course do of course have a part for what should be in models.py.
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Question Triying to store values from models Larry1888 1 632 Nov-02-2022, 02:08 AM
Last Post: Pedroski55
  Python3 requests.models.Response ogautier 4 5,221 Feb-17-2022, 04:46 PM
Last Post: ogautier
  How Do I Download Models Using PIP? CopBlaster 3 2,552 May-18-2020, 08:48 PM
Last Post: hussainmujtaba
  Multivariate mixed effects models primeprover 1 2,563 Aug-19-2018, 01:14 PM
Last Post: ketanm
  view_db.models [HELP] Lartos 0 1,883 Jun-14-2018, 03:33 PM
Last Post: Lartos

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020