Afrikaans
Akan
Albanian
Amharic
Arabic
Armenian
Azerbaijani
Basque
Belarusian
Bemba
Bengali
Bihari
Bosnian
Breton
Bulgarian
Cambodian
Catalan
Cebuano
Cherokee
Chichewa
Chinese (Simplified)
Chinese (Traditional)
Corsican
Croatian
Czech
Danish
Dutch
English
Esperanto
Estonian
Ewe
Faroese
Filipino
Finnish
French
Frisian
Ga
Galician
Georgian
German
Greek
Guarani
Gujarati
Haitian Creole
Hausa
Hawaiian
Hebrew
Hindi
Hmong
Hungarian
Icelandic
Igbo
Indonesian
Interlingua
Irish
Italian
Japanese
Javanese
Kannada
Kazakh
Kinyarwanda
Kirundi
Kongo
Korean
Krio (Sierra Leone)
Kurdish
Kurdish (Soranî)
Kyrgyz
Laothian
Latin
Latvian
Lingala
Lithuanian
Lozi
Luganda
Luo
Luxembourgish
Macedonian
Malagasy
Malay
Malayalam
Maltese
Maori
Marathi
Mauritian Creole
Moldavian
Mongolian
Myanmar (Burmese)
Montenegrin
Nepali
Nigerian Pidgin
Northern Sotho
Norwegian
Norwegian (Nynorsk)
Occitan
Oriya
Oromo
Pashto
Polish
Portuguese (Brazil)
Portuguese (Portugal)
Punjabi
Quechua
Romanian
Romansh
Runyakitara
Russian
Samoan
Scots Gaelic
Serbian
Serbo-Croatian
Sesotho
Setswana
Seychellois Creole
Shona
Sindhi
Sinhalese
Slovak
Slovenian
Somali
Spanish
Spanish (Latin American)
Sundanese
Swahili
Swedish
Tajik
Tamil
Tatar
Telugu
Thai
Tigrinya
Tonga
Tshiluba
Tumbuka
Turkish
Turkmen
Twi
Uighur
Ukrainian
Urdu
Uzbek
Vietnamese
Welsh
Wolof
Xhosa
Yiddish
Yoruba
Zulu
So let's now make and run the migrations.
So I'll reach out to manage.py and call make migrations.
And it crashes.
Probably because I have a typo, yeah.
Post that should be models.model, not models.
And that's what this error is telling me
that there is no models class I can use.
So a simple typo in the models.py file,
which I fixed now, and then I can repeat make migrations
and I get another error.
On_delete=SET_NULL, but cannot be null.
And that makes a lot of sense.
I want to set this author field to null
if a related author is deleted
but I haven't added null equals true here,
which I need to do though
to allow Django and SQL to write null values to that field.
So now I add null equals true here and now with that
we can again try making those migrations.
And now this worked.
Now, I also want to run the migrations
and they are for all now call migrate.
By the way if you didn't have a DBE SQLite free file yet,
it should have created one automatically.
If you're facing any problems there,
just create one manually
as shown to you earlier in the course,
and try migrating thereafter.
With that here, it ran all these default migrations
for the admin area for example,
and then also my custom blog migrations here.
And that means that now
we got that initial database structure
and these core tables set up.
Therefore, now let's create a super user
so that we can log into that admin area.
And we do this with Python3 in my case, manage.py,
and then create super user, hit enter and pick a username
followed by some email address,
and then a password.
And I'm again, using a rather insecure one
which is why I'm getting this warning.
Of course, you can pick a more secure one
but I'll confirm my insecure one here.
Now this super user is created
and now we can try logging into admin.
It should work
because if we have a look at our main project wide URLs,
we have this admin URL here as well.
So if we now start our development server again
with manage.py run server.
I should be able to visit local host 8,000 slash admin.
And I am able to do that.
Now, if I enter max
and my super insecure password, I can log in.
And I also see all my data here already, my models,
because I did register them for administration.
Now let's get started working with that.
Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.