1 00:00:00,330 --> 00:00:02,468 Hi, in this video, we are going to create 2 00:00:02,469 --> 00:00:05,812 a new app in our existing Django project. 3 00:00:05,813 --> 00:00:09,268 First, let's have a look how the website looks like. 4 00:00:09,269 --> 00:00:12,210 So in my Terminal, make sure you, 5 00:00:12,211 --> 00:00:14,906 your virtual environment is activated. 6 00:00:14,907 --> 00:00:18,532 Mine is not, because I don't have this parenthesis in 7 00:00:18,533 --> 00:00:22,052 front here, but if I create a new Terminal using 8 00:00:22,053 --> 00:00:24,466 the plus icon or go to Terminal, New, 9 00:00:24,467 --> 00:00:28,092 [No Audio] 10 00:00:28,093 --> 00:00:32,812 my virtual environment is activated now, so I can go ahead and 11 00:00:32,813 --> 00:00:37,233 say, python manage.py run server, 12 00:00:37,234 --> 00:00:40,066 [No Audio] 13 00:00:40,067 --> 00:00:42,128 go to that website 14 00:00:42,129 --> 00:00:44,512 and this is how the website looks like now. 15 00:00:44,513 --> 00:00:48,000 And we're going to have another menu item here, 16 00:00:48,001 --> 00:00:50,992 which is going to contain the translator app. 17 00:00:50,993 --> 00:00:52,480 So let's get to work. 18 00:00:54,130 --> 00:00:59,268 Let's create the app, stop the server from running with 19 00:00:59,269 --> 00:01:08,328 CTRL+C and run python manage.py startapp and 20 00:01:08,329 --> 00:01:10,766 then give a name to the app, 21 00:01:10,767 --> 00:01:14,266 [Audio Typing] 22 00:01:14,267 --> 00:01:15,970 such as translator. 23 00:01:16,570 --> 00:01:24,546 Execute, and a new, translator directory is created. 24 00:01:24,547 --> 00:01:26,332 You can see it in here. 25 00:01:26,333 --> 00:01:31,110 So it's in the same directory with blog. 26 00:01:31,111 --> 00:01:33,290 blog is in the root directory. 27 00:01:33,950 --> 00:01:35,798 translator is also in the root 28 00:01:35,799 --> 00:01:38,272 directory, as you can see here. 29 00:01:38,273 --> 00:01:41,360 Now, once you create an app with startapp, 30 00:01:41,361 --> 00:01:44,196 then you want to register that app in my 31 00:01:44,197 --> 00:01:49,988 site settings, go to settings.py, the djangoproject 32 00:01:49,989 --> 00:01:57,130 settings, and you want to go to, INSTALLED_APPS. 33 00:01:57,131 --> 00:02:00,238 So before we added blog here, when we created 34 00:02:00,239 --> 00:02:03,928 the Blog App, now, after the comma, we want 35 00:02:03,929 --> 00:02:08,907 to add another item to this INSTALLED_APPS list. 36 00:02:08,908 --> 00:02:14,914 So it's a string and the name of this is translator, 37 00:02:14,915 --> 00:02:16,440 translator, yeah. 38 00:02:17,050 --> 00:02:20,396 So this should reflect the name of your app, 39 00:02:20,397 --> 00:02:22,400 and the name of the directory here. 40 00:02:22,401 --> 00:02:24,500 [No Audio] 41 00:02:24,501 --> 00:02:27,510 save, settings.py. 42 00:02:28,490 --> 00:02:32,866 And that is how to create a new empty app in Django. 43 00:02:33,354 --> 00:02:34,932 In the next video, we are going 44 00:02:34,933 --> 00:02:39,666 to start building our HTML template. So see you there.