All language subtitles for 008 Adding Data via Admin_en

af Afrikaans
ak Akan
sq Albanian
am Amharic
ar Arabic
hy Armenian
az Azerbaijani
eu Basque
be Belarusian
bem Bemba
bn Bengali
bh Bihari
bs Bosnian
br Breton
bg Bulgarian
km Cambodian
ca Catalan
ceb Cebuano
chr Cherokee
ny Chichewa
zh-CN Chinese (Simplified)
zh-TW Chinese (Traditional)
co Corsican
hr Croatian
cs Czech
da Danish
nl Dutch
en English
eo Esperanto
et Estonian
ee Ewe
fo Faroese
tl Filipino
fi Finnish
fr French
fy Frisian
gaa Ga
gl Galician
ka Georgian
de German
el Greek
gn Guarani
gu Gujarati
ht Haitian Creole
ha Hausa
haw Hawaiian
iw Hebrew
hi Hindi
hmn Hmong
hu Hungarian
is Icelandic
ig Igbo
id Indonesian
ia Interlingua
ga Irish
it Italian
ja Japanese
jw Javanese
kn Kannada
kk Kazakh
rw Kinyarwanda
rn Kirundi
kg Kongo
ko Korean
kri Krio (Sierra Leone)
ku Kurdish
ckb Kurdish (Soranî)
ky Kyrgyz
lo Laothian
la Latin
lv Latvian
ln Lingala
lt Lithuanian
loz Lozi
lg Luganda
ach Luo
lb Luxembourgish
mk Macedonian
mg Malagasy
ms Malay
ml Malayalam
mt Maltese
mi Maori
mr Marathi
mfe Mauritian Creole
mo Moldavian
mn Mongolian
my Myanmar (Burmese)
sr-ME Montenegrin
ne Nepali
pcm Nigerian Pidgin
nso Northern Sotho
no Norwegian
nn Norwegian (Nynorsk)
oc Occitan
or Oriya
om Oromo
ps Pashto
fa Persian Download
pl Polish
pt-BR Portuguese (Brazil)
pt Portuguese (Portugal)
pa Punjabi
qu Quechua
ro Romanian
rm Romansh
nyn Runyakitara
ru Russian
sm Samoan
gd Scots Gaelic
sr Serbian
sh Serbo-Croatian
st Sesotho
tn Setswana
crs Seychellois Creole
sn Shona
sd Sindhi
si Sinhalese
sk Slovak
sl Slovenian
so Somali
es Spanish
es-419 Spanish (Latin American)
su Sundanese
sw Swahili
sv Swedish
tg Tajik
ta Tamil
tt Tatar
te Telugu
th Thai
ti Tigrinya
to Tonga
lua Tshiluba
tum Tumbuka
tr Turkish
tk Turkmen
tw Twi
ug Uighur
uk Ukrainian
ur Urdu
uz Uzbek
vi Vietnamese
cy Welsh
wo Wolof
xh Xhosa
yi Yiddish
yo Yoruba
zu Zulu

Original subtitles

So let's start working with that data.

And for that, I'll start with the authors

and add a new author.

And I'll add myself here, Maximilian,

Schwarzmuller.

And we got this built in validation, which we saw before.

So if I try to save this here I get an error

is because email address is required,

and here it's also validating if that is an email address

and it tells me if it's not,

because I did set this special field type here,

for post, for author email address has this email field,

that's why we get this email address validation.

But now if I do add some dummy email address here,

I can save this author.

Now I'm not too happy with the output of the author here.

So of course you learn how you can tweak this.

You can override this underscore underscore str,

method here, in the author model or in all models.

And this allows you to change,

how it's represented as a string.

How objects based on that model are represented as a string.

And here we could return first name and last them combined,

and we can again create such a helper method,

as I all did it before in one of the core sections,

we can add a full name,

method here,

where I returned an F string,

where I have self first name, widespace,

self, last name, and then the str method,

we just return the result of calling

self dot full name,

like this.

That's something we can and that is something we did before

in this course as well.

Now, if I save this and reload here,

I have this nicer presentation.

I also wanna work on my posts and I wanna add a new post.

But before we do that,

I want to add a couple of tags to work with.

So here in tags, I will add a,

featured

tag and save this, and add another new tag,

where I say new and save and add another,

and add a hot tag. So that now I got three tags.

And again, I'm not really happy

with how this is represented here?

So of course we can also go to the tag model

and override this str,

special

method here,

to make sure that we return self-taught caption.

So simply the caption stored in the tag

as a string representation for the overall model object.

So now if you reload, we see this.

Now let's work on the posts,

and of course there will face a similar problem

with how it's presented,

but here I'll not add the str method, but instead there,

I later want to tweak our admin panel a little bit

as we all learned it early in the course.

But first of all, let's add a post here

and let's give it a title.

And for this all simply copy one

of my dummy posts titles I created before.

So the data which we have in views.py.

I'll take mountain hiking as a title, and as an excerpt,

I'll take this text here, let's see if it's too long,

maybe we can use it.

As an image name I'll pick this image name

which I used before,

like this.

And as a slug,

it would be nice if that would be auto populated

and that's there also something we'll add soon.

For the moment, I'll manually write it

and copy that slug which I used before.

Now for the content, I wanna to take this content

which I have here, this dummy text

and add to this here.

And whilst I'm here, I'll fix the line breaks,

so that there are some line breaks,

but I don't have this strange indentation.

So,

make it like this,

remove this and just copy this one more time

and get rid of all those paragraphs down there.

So that I have this text here,

and then as an author, I'll assign myself,

and I'll make this featured and hot,

and you can select multiple values here

by holding down command on Mac iOS or control on windows.

And then let's click save here.

So now this post was saved.

Now I will add a second post immediately,

and again, steal my data from here.

Programming is great, and insert this here,

and add this excerpt,

like this. and of course also insert the image name

which I used here, which is this one.

And at the slug, it's still not automatically created

So I'll temporarily still add it myself.

And for the content, I again will use this dummy content,

copy this text, paste it in there,

get rid of the line breaks or these strange indentations

and just repeat this here.

And again, I'll also select myself again,

since I'm the only author and make this new.

We could assign more tags,

but I'll just assign one tag here.

Now we have two posts and we can add a third post,

but before we do that, I wanna tweak the admin panel.

I wanna make sure that here we got multiple columns,

that we can filter here on the right.

And I also want to make sure that when we edit a post,

the slug is auto populated.

And these of course are all things we already did before.

I just want to implement them again

so that we again see them in action.

And we practiced what we learned.

Can't find what you're looking for?
Get subtitles in any language from opensubtitles.com, and translate them here.