From the course: Learning Django
Unlock the full course today
Join today to access over 22,600 courses taught by industry experts or purchase this course individually.
Import CSV data
- [Instructor] While the database contains the tables we've defined, it currently doesn't have any data. To have some data to work with as we build our application, I'd like to use a script that loads data from a CSV file. I've provided this script and CSV file in the Exercise Files folder for the course. Now, I'd like to open this folder on the left side of the screen. Next, I'll open our project folder and put it on the right side of the screen. And finally, I'll double-click wisdompets so that we're inside the wisdompets folder where the manage.py file is. The first thing I'd like to do is copy the pet data CSV file over from the Exercise Files and into our working folder so that it's a sibling with the manage.py file. Next, I'd like to copy over a Django management command that I've written. To do this, I need to copy this management folder from the Exercise Files folder into the adoptions app folder. To confirm the…
Practice while you learn with exercise files
Download the files the instructor uses to teach the course. Follow along and learn by watching, listening and practicing.
Contents
-
-
-
-
Models, routing, views, and templates3m 55s
-
(Locked)
Django models1m 19s
-
(Locked)
Django fields3m 46s
-
(Locked)
Implement model and fields5m 24s
-
(Locked)
Django migrations6m 5s
-
(Locked)
Import CSV data6m 24s
-
(Locked)
Work with the Django admin7m 18s
-
(Locked)
Query data with the Django ORM6m 42s
-
-
-
-