├── Video1 ├── .gitignore ├── .npmrc ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── app.html │ ├── film-store.js │ ├── lib │ │ └── index.js │ └── routes │ │ ├── +page.svelte │ │ └── films │ │ ├── +page.svelte │ │ └── [id] │ │ ├── +page.js │ │ └── +page.svelte ├── static │ └── favicon.png ├── svelte.config.js └── vite.config.js ├── Video2 ├── .gitignore ├── .npmrc ├── README.md ├── package-lock.json ├── package.json ├── src │ ├── app.html │ ├── film-store.js │ ├── lib │ │ └── index.js │ └── routes │ │ ├── +page.svelte │ │ └── films │ │ ├── +layout.svelte │ │ ├── +page.svelte │ │ ├── [id] │ │ ├── +page.js │ │ └── +page.svelte │ │ └── add │ │ └── +page.svelte ├── static │ ├── bootstrap.min.css │ └── favicon.png ├── svelte.config.js └── vite.config.js ├── Video3 ├── .gitignore ├── backend │ └── films_backend │ │ ├── films │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ ├── __init__.py │ │ │ └── __pycache__ │ │ │ │ ├── 0001_initial.cpython-310.pyc │ │ │ │ └── __init__.cpython-310.pyc │ │ ├── models.py │ │ ├── serializers.py │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ │ ├── films_backend │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ │ ├── manage.py │ │ ├── media │ │ └── images │ │ │ ├── chinatown.png │ │ │ ├── chinatown_Fn35P07.png │ │ │ ├── godfather.png │ │ │ ├── lebowski.png │ │ │ └── lebowski_cgUa5DP.png │ │ └── requirements.txt └── frontend │ ├── .npmrc │ ├── .svelte-kit │ ├── ambient.d.ts │ ├── generated │ │ ├── client │ │ │ ├── app.js │ │ │ ├── matchers.js │ │ │ └── nodes │ │ │ │ ├── 0.js │ │ │ │ ├── 1.js │ │ │ │ ├── 2.js │ │ │ │ ├── 3.js │ │ │ │ ├── 4.js │ │ │ │ ├── 5.js │ │ │ │ └── 6.js │ │ ├── root.svelte │ │ └── server │ │ │ └── internal.js │ └── tsconfig.json │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app.html │ ├── film-store.js │ ├── lib │ │ └── index.js │ └── routes │ │ ├── +page.svelte │ │ └── films │ │ ├── +layout.svelte │ │ ├── +page.svelte │ │ ├── [id] │ │ ├── +page.js │ │ └── +page.svelte │ │ └── add │ │ └── +page.svelte │ ├── static │ ├── bootstrap.min.css │ └── favicon.png │ ├── svelte.config.js │ └── vite.config.js ├── Video4 ├── .gitignore ├── backend │ └── films_backend │ │ ├── db.sqlite3 │ │ ├── films │ │ ├── __init__.py │ │ ├── admin.py │ │ ├── apps.py │ │ ├── migrations │ │ │ ├── 0001_initial.py │ │ │ └── __init__.py │ │ ├── models.py │ │ ├── serializers.py │ │ ├── tests.py │ │ ├── urls.py │ │ └── views.py │ │ ├── films_backend │ │ ├── __init__.py │ │ ├── asgi.py │ │ ├── settings.py │ │ ├── urls.py │ │ └── wsgi.py │ │ ├── manage.py │ │ ├── media │ │ └── images │ │ │ ├── chinatown.png │ │ │ ├── chinatown_Fn35P07.png │ │ │ ├── chinatown_xu29jRx.png │ │ │ ├── godfather.png │ │ │ ├── lebowski.png │ │ │ ├── lebowski_cgUa5DP.png │ │ │ └── lebowski_xWdJ7pd.png │ │ └── requirements.txt └── frontend │ ├── .npmrc │ ├── .svelte-kit │ ├── ambient.d.ts │ ├── generated │ │ ├── client │ │ │ ├── app.js │ │ │ ├── matchers.js │ │ │ └── nodes │ │ │ │ ├── 0.js │ │ │ │ ├── 1.js │ │ │ │ ├── 2.js │ │ │ │ ├── 3.js │ │ │ │ ├── 4.js │ │ │ │ ├── 5.js │ │ │ │ ├── 6.js │ │ │ │ └── 7.js │ │ ├── root.svelte │ │ └── server │ │ │ └── internal.js │ └── tsconfig.json │ ├── README.md │ ├── package-lock.json │ ├── package.json │ ├── src │ ├── app.html │ ├── film-store.js │ ├── lib │ │ └── index.js │ └── routes │ │ ├── +page.svelte │ │ └── films │ │ ├── +layout.svelte │ │ ├── +page.svelte │ │ ├── [id] │ │ ├── +page.js │ │ ├── +page.svelte │ │ └── update │ │ │ ├── +page.js │ │ │ └── +page.svelte │ │ └── add │ │ └── +page.svelte │ ├── static │ ├── bootstrap.min.css │ └── favicon.png │ ├── svelte.config.js │ └── vite.config.js └── Video5 ├── .gitignore ├── backend └── films_backend │ ├── films │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── migrations │ │ ├── 0001_initial.py │ │ └── __init__.py │ ├── models.py │ ├── serializers.py │ ├── tests.py │ ├── urls.py │ └── views.py │ ├── films_backend │ ├── __init__.py │ ├── asgi.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py │ ├── manage.py │ ├── media │ └── images │ │ ├── chinatown.png │ │ ├── chinatown_6F2WjSA.png │ │ ├── chinatown_Fe85BUC.png │ │ ├── chinatown_Fn35P07.png │ │ ├── chinatown_VjytVFJ.png │ │ ├── chinatown_oXn6KiS.png │ │ ├── chinatown_xu29jRx.png │ │ ├── godfather.png │ │ ├── lebowski.png │ │ ├── lebowski_cgUa5DP.png │ │ └── lebowski_xWdJ7pd.png │ └── requirements.txt └── frontend ├── .npmrc ├── .svelte-kit ├── ambient.d.ts ├── generated │ ├── client │ │ ├── app.js │ │ ├── matchers.js │ │ └── nodes │ │ │ ├── 0.js │ │ │ ├── 1.js │ │ │ ├── 2.js │ │ │ ├── 3.js │ │ │ ├── 4.js │ │ │ ├── 5.js │ │ │ ├── 6.js │ │ │ └── 7.js │ ├── root.svelte │ └── server │ │ └── internal.js └── tsconfig.json ├── README.md ├── package-lock.json ├── package.json ├── src ├── app.html ├── film-store.js ├── lib │ └── index.js └── routes │ ├── +page.svelte │ └── films │ ├── +layout.svelte │ ├── +page.svelte │ ├── [id] │ ├── +page.js │ ├── +page.svelte │ └── update │ │ ├── +page.js │ │ └── +page.svelte │ └── add │ └── +page.svelte ├── static ├── bootstrap.min.css └── favicon.png ├── svelte.config.js └── vite.config.js /Video1/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /Video1/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /Video1/README.md: -------------------------------------------------------------------------------- 1 | # create-svelte 2 | 3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). 4 | 5 | ## Creating a project 6 | 7 | If you're seeing this, you've probably already done this step. Congrats! 8 | 9 | ```bash 10 | # create a new project in the current directory 11 | npm create svelte@latest 12 | 13 | # create a new project in my-app 14 | npm create svelte@latest my-app 15 | ``` 16 | 17 | ## Developing 18 | 19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 20 | 21 | ```bash 22 | npm run dev 23 | 24 | # or start the server and open the app in a new browser tab 25 | npm run dev -- --open 26 | ``` 27 | 28 | ## Building 29 | 30 | To create a production version of your app: 31 | 32 | ```bash 33 | npm run build 34 | ``` 35 | 36 | You can preview the production build with `npm run preview`. 37 | 38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 39 | -------------------------------------------------------------------------------- /Video1/package-lock.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "lockfileVersion": 3, 5 | "requires": true, 6 | "packages": { 7 | "": { 8 | "name": "film-frontend", 9 | "version": "0.0.1", 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | } 16 | }, 17 | "node_modules/@ampproject/remapping": { 18 | "version": "2.2.1", 19 | "resolved": "https://registry.npmjs.org/@ampproject/remapping/-/remapping-2.2.1.tgz", 20 | "integrity": "sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==", 21 | "dev": true, 22 | "dependencies": { 23 | "@jridgewell/gen-mapping": "^0.3.0", 24 | "@jridgewell/trace-mapping": "^0.3.9" 25 | }, 26 | "engines": { 27 | "node": ">=6.0.0" 28 | } 29 | }, 30 | "node_modules/@esbuild/android-arm": { 31 | "version": "0.18.20", 32 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", 33 | "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", 34 | "cpu": [ 35 | "arm" 36 | ], 37 | "dev": true, 38 | "optional": true, 39 | "os": [ 40 | "android" 41 | ], 42 | "engines": { 43 | "node": ">=12" 44 | } 45 | }, 46 | "node_modules/@esbuild/android-arm64": { 47 | "version": "0.18.20", 48 | "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", 49 | "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", 50 | "cpu": [ 51 | "arm64" 52 | ], 53 | "dev": true, 54 | "optional": true, 55 | "os": [ 56 | "android" 57 | ], 58 | "engines": { 59 | "node": ">=12" 60 | } 61 | }, 62 | "node_modules/@esbuild/android-x64": { 63 | "version": "0.18.20", 64 | "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", 65 | "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", 66 | "cpu": [ 67 | "x64" 68 | ], 69 | "dev": true, 70 | "optional": true, 71 | "os": [ 72 | "android" 73 | ], 74 | "engines": { 75 | "node": ">=12" 76 | } 77 | }, 78 | "node_modules/@esbuild/darwin-arm64": { 79 | "version": "0.18.20", 80 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", 81 | "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", 82 | "cpu": [ 83 | "arm64" 84 | ], 85 | "dev": true, 86 | "optional": true, 87 | "os": [ 88 | "darwin" 89 | ], 90 | "engines": { 91 | "node": ">=12" 92 | } 93 | }, 94 | "node_modules/@esbuild/darwin-x64": { 95 | "version": "0.18.20", 96 | "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", 97 | "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", 98 | "cpu": [ 99 | "x64" 100 | ], 101 | "dev": true, 102 | "optional": true, 103 | "os": [ 104 | "darwin" 105 | ], 106 | "engines": { 107 | "node": ">=12" 108 | } 109 | }, 110 | "node_modules/@esbuild/freebsd-arm64": { 111 | "version": "0.18.20", 112 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", 113 | "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", 114 | "cpu": [ 115 | "arm64" 116 | ], 117 | "dev": true, 118 | "optional": true, 119 | "os": [ 120 | "freebsd" 121 | ], 122 | "engines": { 123 | "node": ">=12" 124 | } 125 | }, 126 | "node_modules/@esbuild/freebsd-x64": { 127 | "version": "0.18.20", 128 | "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", 129 | "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", 130 | "cpu": [ 131 | "x64" 132 | ], 133 | "dev": true, 134 | "optional": true, 135 | "os": [ 136 | "freebsd" 137 | ], 138 | "engines": { 139 | "node": ">=12" 140 | } 141 | }, 142 | "node_modules/@esbuild/linux-arm": { 143 | "version": "0.18.20", 144 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", 145 | "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", 146 | "cpu": [ 147 | "arm" 148 | ], 149 | "dev": true, 150 | "optional": true, 151 | "os": [ 152 | "linux" 153 | ], 154 | "engines": { 155 | "node": ">=12" 156 | } 157 | }, 158 | "node_modules/@esbuild/linux-arm64": { 159 | "version": "0.18.20", 160 | "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", 161 | "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", 162 | "cpu": [ 163 | "arm64" 164 | ], 165 | "dev": true, 166 | "optional": true, 167 | "os": [ 168 | "linux" 169 | ], 170 | "engines": { 171 | "node": ">=12" 172 | } 173 | }, 174 | "node_modules/@esbuild/linux-ia32": { 175 | "version": "0.18.20", 176 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", 177 | "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", 178 | "cpu": [ 179 | "ia32" 180 | ], 181 | "dev": true, 182 | "optional": true, 183 | "os": [ 184 | "linux" 185 | ], 186 | "engines": { 187 | "node": ">=12" 188 | } 189 | }, 190 | "node_modules/@esbuild/linux-loong64": { 191 | "version": "0.18.20", 192 | "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", 193 | "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", 194 | "cpu": [ 195 | "loong64" 196 | ], 197 | "dev": true, 198 | "optional": true, 199 | "os": [ 200 | "linux" 201 | ], 202 | "engines": { 203 | "node": ">=12" 204 | } 205 | }, 206 | "node_modules/@esbuild/linux-mips64el": { 207 | "version": "0.18.20", 208 | "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", 209 | "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", 210 | "cpu": [ 211 | "mips64el" 212 | ], 213 | "dev": true, 214 | "optional": true, 215 | "os": [ 216 | "linux" 217 | ], 218 | "engines": { 219 | "node": ">=12" 220 | } 221 | }, 222 | "node_modules/@esbuild/linux-ppc64": { 223 | "version": "0.18.20", 224 | "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", 225 | "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", 226 | "cpu": [ 227 | "ppc64" 228 | ], 229 | "dev": true, 230 | "optional": true, 231 | "os": [ 232 | "linux" 233 | ], 234 | "engines": { 235 | "node": ">=12" 236 | } 237 | }, 238 | "node_modules/@esbuild/linux-riscv64": { 239 | "version": "0.18.20", 240 | "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", 241 | "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", 242 | "cpu": [ 243 | "riscv64" 244 | ], 245 | "dev": true, 246 | "optional": true, 247 | "os": [ 248 | "linux" 249 | ], 250 | "engines": { 251 | "node": ">=12" 252 | } 253 | }, 254 | "node_modules/@esbuild/linux-s390x": { 255 | "version": "0.18.20", 256 | "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", 257 | "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", 258 | "cpu": [ 259 | "s390x" 260 | ], 261 | "dev": true, 262 | "optional": true, 263 | "os": [ 264 | "linux" 265 | ], 266 | "engines": { 267 | "node": ">=12" 268 | } 269 | }, 270 | "node_modules/@esbuild/linux-x64": { 271 | "version": "0.18.20", 272 | "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", 273 | "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", 274 | "cpu": [ 275 | "x64" 276 | ], 277 | "dev": true, 278 | "optional": true, 279 | "os": [ 280 | "linux" 281 | ], 282 | "engines": { 283 | "node": ">=12" 284 | } 285 | }, 286 | "node_modules/@esbuild/netbsd-x64": { 287 | "version": "0.18.20", 288 | "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", 289 | "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", 290 | "cpu": [ 291 | "x64" 292 | ], 293 | "dev": true, 294 | "optional": true, 295 | "os": [ 296 | "netbsd" 297 | ], 298 | "engines": { 299 | "node": ">=12" 300 | } 301 | }, 302 | "node_modules/@esbuild/openbsd-x64": { 303 | "version": "0.18.20", 304 | "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", 305 | "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", 306 | "cpu": [ 307 | "x64" 308 | ], 309 | "dev": true, 310 | "optional": true, 311 | "os": [ 312 | "openbsd" 313 | ], 314 | "engines": { 315 | "node": ">=12" 316 | } 317 | }, 318 | "node_modules/@esbuild/sunos-x64": { 319 | "version": "0.18.20", 320 | "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", 321 | "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", 322 | "cpu": [ 323 | "x64" 324 | ], 325 | "dev": true, 326 | "optional": true, 327 | "os": [ 328 | "sunos" 329 | ], 330 | "engines": { 331 | "node": ">=12" 332 | } 333 | }, 334 | "node_modules/@esbuild/win32-arm64": { 335 | "version": "0.18.20", 336 | "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", 337 | "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", 338 | "cpu": [ 339 | "arm64" 340 | ], 341 | "dev": true, 342 | "optional": true, 343 | "os": [ 344 | "win32" 345 | ], 346 | "engines": { 347 | "node": ">=12" 348 | } 349 | }, 350 | "node_modules/@esbuild/win32-ia32": { 351 | "version": "0.18.20", 352 | "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", 353 | "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", 354 | "cpu": [ 355 | "ia32" 356 | ], 357 | "dev": true, 358 | "optional": true, 359 | "os": [ 360 | "win32" 361 | ], 362 | "engines": { 363 | "node": ">=12" 364 | } 365 | }, 366 | "node_modules/@esbuild/win32-x64": { 367 | "version": "0.18.20", 368 | "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", 369 | "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", 370 | "cpu": [ 371 | "x64" 372 | ], 373 | "dev": true, 374 | "optional": true, 375 | "os": [ 376 | "win32" 377 | ], 378 | "engines": { 379 | "node": ">=12" 380 | } 381 | }, 382 | "node_modules/@fastify/busboy": { 383 | "version": "2.0.0", 384 | "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.0.0.tgz", 385 | "integrity": "sha512-JUFJad5lv7jxj926GPgymrWQxxjPYuJNiNjNMzqT+HiuP6Vl3dk5xzG+8sTX96np0ZAluvaMzPsjhHZ5rNuNQQ==", 386 | "dev": true, 387 | "engines": { 388 | "node": ">=14" 389 | } 390 | }, 391 | "node_modules/@jridgewell/gen-mapping": { 392 | "version": "0.3.3", 393 | "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz", 394 | "integrity": "sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ==", 395 | "dev": true, 396 | "dependencies": { 397 | "@jridgewell/set-array": "^1.0.1", 398 | "@jridgewell/sourcemap-codec": "^1.4.10", 399 | "@jridgewell/trace-mapping": "^0.3.9" 400 | }, 401 | "engines": { 402 | "node": ">=6.0.0" 403 | } 404 | }, 405 | "node_modules/@jridgewell/resolve-uri": { 406 | "version": "3.1.1", 407 | "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz", 408 | "integrity": "sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==", 409 | "dev": true, 410 | "engines": { 411 | "node": ">=6.0.0" 412 | } 413 | }, 414 | "node_modules/@jridgewell/set-array": { 415 | "version": "1.1.2", 416 | "resolved": "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.1.2.tgz", 417 | "integrity": "sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==", 418 | "dev": true, 419 | "engines": { 420 | "node": ">=6.0.0" 421 | } 422 | }, 423 | "node_modules/@jridgewell/sourcemap-codec": { 424 | "version": "1.4.15", 425 | "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", 426 | "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", 427 | "dev": true 428 | }, 429 | "node_modules/@jridgewell/trace-mapping": { 430 | "version": "0.3.19", 431 | "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz", 432 | "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==", 433 | "dev": true, 434 | "dependencies": { 435 | "@jridgewell/resolve-uri": "^3.1.0", 436 | "@jridgewell/sourcemap-codec": "^1.4.14" 437 | } 438 | }, 439 | "node_modules/@polka/url": { 440 | "version": "1.0.0-next.23", 441 | "resolved": "https://registry.npmjs.org/@polka/url/-/url-1.0.0-next.23.tgz", 442 | "integrity": "sha512-C16M+IYz0rgRhWZdCmK+h58JMv8vijAA61gmz2rspCSwKwzBebpdcsiUmwrtJRdphuY30i6BSLEOP8ppbNLyLg==", 443 | "dev": true 444 | }, 445 | "node_modules/@sveltejs/adapter-auto": { 446 | "version": "2.1.0", 447 | "resolved": "https://registry.npmjs.org/@sveltejs/adapter-auto/-/adapter-auto-2.1.0.tgz", 448 | "integrity": "sha512-o2pZCfATFtA/Gw/BB0Xm7k4EYaekXxaPGER3xGSY3FvzFJGTlJlZjBseaXwYSM94lZ0HniOjTokN3cWaLX6fow==", 449 | "dev": true, 450 | "dependencies": { 451 | "import-meta-resolve": "^3.0.0" 452 | }, 453 | "peerDependencies": { 454 | "@sveltejs/kit": "^1.0.0" 455 | } 456 | }, 457 | "node_modules/@sveltejs/kit": { 458 | "version": "1.25.2", 459 | "resolved": "https://registry.npmjs.org/@sveltejs/kit/-/kit-1.25.2.tgz", 460 | "integrity": "sha512-USuuSpdAPFDiLi58N2Pwd/TG9bcUSPAlzE5iaAXaLyCTWa3l36HDKH6nV5NqBybwfeux1ZwgtIeITLZJDJ6HDg==", 461 | "dev": true, 462 | "hasInstallScript": true, 463 | "dependencies": { 464 | "@sveltejs/vite-plugin-svelte": "^2.4.1", 465 | "@types/cookie": "^0.5.1", 466 | "cookie": "^0.5.0", 467 | "devalue": "^4.3.1", 468 | "esm-env": "^1.0.0", 469 | "kleur": "^4.1.5", 470 | "magic-string": "^0.30.0", 471 | "mime": "^3.0.0", 472 | "sade": "^1.8.1", 473 | "set-cookie-parser": "^2.6.0", 474 | "sirv": "^2.0.2", 475 | "tiny-glob": "^0.2.9", 476 | "undici": "~5.25.0" 477 | }, 478 | "bin": { 479 | "svelte-kit": "svelte-kit.js" 480 | }, 481 | "engines": { 482 | "node": "^16.14 || >=18" 483 | }, 484 | "peerDependencies": { 485 | "svelte": "^3.54.0 || ^4.0.0-next.0", 486 | "vite": "^4.0.0" 487 | } 488 | }, 489 | "node_modules/@sveltejs/vite-plugin-svelte": { 490 | "version": "2.4.6", 491 | "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte/-/vite-plugin-svelte-2.4.6.tgz", 492 | "integrity": "sha512-zO79p0+DZnXPnF0ltIigWDx/ux7Ni+HRaFOw720Qeivc1azFUrJxTl0OryXVibYNx1hCboGia1NRV3x8RNv4cA==", 493 | "dev": true, 494 | "dependencies": { 495 | "@sveltejs/vite-plugin-svelte-inspector": "^1.0.4", 496 | "debug": "^4.3.4", 497 | "deepmerge": "^4.3.1", 498 | "kleur": "^4.1.5", 499 | "magic-string": "^0.30.3", 500 | "svelte-hmr": "^0.15.3", 501 | "vitefu": "^0.2.4" 502 | }, 503 | "engines": { 504 | "node": "^14.18.0 || >= 16" 505 | }, 506 | "peerDependencies": { 507 | "svelte": "^3.54.0 || ^4.0.0", 508 | "vite": "^4.0.0" 509 | } 510 | }, 511 | "node_modules/@sveltejs/vite-plugin-svelte-inspector": { 512 | "version": "1.0.4", 513 | "resolved": "https://registry.npmjs.org/@sveltejs/vite-plugin-svelte-inspector/-/vite-plugin-svelte-inspector-1.0.4.tgz", 514 | "integrity": "sha512-zjiuZ3yydBtwpF3bj0kQNV0YXe+iKE545QGZVTaylW3eAzFr+pJ/cwK8lZEaRp4JtaJXhD5DyWAV4AxLh6DgaQ==", 515 | "dev": true, 516 | "dependencies": { 517 | "debug": "^4.3.4" 518 | }, 519 | "engines": { 520 | "node": "^14.18.0 || >= 16" 521 | }, 522 | "peerDependencies": { 523 | "@sveltejs/vite-plugin-svelte": "^2.2.0", 524 | "svelte": "^3.54.0 || ^4.0.0", 525 | "vite": "^4.0.0" 526 | } 527 | }, 528 | "node_modules/@types/cookie": { 529 | "version": "0.5.2", 530 | "resolved": "https://registry.npmjs.org/@types/cookie/-/cookie-0.5.2.tgz", 531 | "integrity": "sha512-DBpRoJGKJZn7RY92dPrgoMew8xCWc2P71beqsjyhEI/Ds9mOyVmBwtekyfhpwFIVt1WrxTonFifiOZ62V8CnNA==", 532 | "dev": true 533 | }, 534 | "node_modules/@types/estree": { 535 | "version": "1.0.2", 536 | "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz", 537 | "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==", 538 | "dev": true 539 | }, 540 | "node_modules/acorn": { 541 | "version": "8.10.0", 542 | "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.10.0.tgz", 543 | "integrity": "sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw==", 544 | "dev": true, 545 | "bin": { 546 | "acorn": "bin/acorn" 547 | }, 548 | "engines": { 549 | "node": ">=0.4.0" 550 | } 551 | }, 552 | "node_modules/aria-query": { 553 | "version": "5.3.0", 554 | "resolved": "https://registry.npmjs.org/aria-query/-/aria-query-5.3.0.tgz", 555 | "integrity": "sha512-b0P0sZPKtyu8HkeRAfCq0IfURZK+SuwMjY1UXGBU27wpAiTwQAIlq56IbIO+ytk/JjS1fMR14ee5WBBfKi5J6A==", 556 | "dev": true, 557 | "dependencies": { 558 | "dequal": "^2.0.3" 559 | } 560 | }, 561 | "node_modules/axobject-query": { 562 | "version": "3.2.1", 563 | "resolved": "https://registry.npmjs.org/axobject-query/-/axobject-query-3.2.1.tgz", 564 | "integrity": "sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==", 565 | "dev": true, 566 | "dependencies": { 567 | "dequal": "^2.0.3" 568 | } 569 | }, 570 | "node_modules/code-red": { 571 | "version": "1.0.4", 572 | "resolved": "https://registry.npmjs.org/code-red/-/code-red-1.0.4.tgz", 573 | "integrity": "sha512-7qJWqItLA8/VPVlKJlFXU+NBlo/qyfs39aJcuMT/2ere32ZqvF5OSxgdM5xOfJJ7O429gg2HM47y8v9P+9wrNw==", 574 | "dev": true, 575 | "dependencies": { 576 | "@jridgewell/sourcemap-codec": "^1.4.15", 577 | "@types/estree": "^1.0.1", 578 | "acorn": "^8.10.0", 579 | "estree-walker": "^3.0.3", 580 | "periscopic": "^3.1.0" 581 | } 582 | }, 583 | "node_modules/cookie": { 584 | "version": "0.5.0", 585 | "resolved": "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz", 586 | "integrity": "sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw==", 587 | "dev": true, 588 | "engines": { 589 | "node": ">= 0.6" 590 | } 591 | }, 592 | "node_modules/css-tree": { 593 | "version": "2.3.1", 594 | "resolved": "https://registry.npmjs.org/css-tree/-/css-tree-2.3.1.tgz", 595 | "integrity": "sha512-6Fv1DV/TYw//QF5IzQdqsNDjx/wc8TrMBZsqjL9eW01tWb7R7k/mq+/VXfJCl7SoD5emsJop9cOByJZfs8hYIw==", 596 | "dev": true, 597 | "dependencies": { 598 | "mdn-data": "2.0.30", 599 | "source-map-js": "^1.0.1" 600 | }, 601 | "engines": { 602 | "node": "^10 || ^12.20.0 || ^14.13.0 || >=15.0.0" 603 | } 604 | }, 605 | "node_modules/debug": { 606 | "version": "4.3.4", 607 | "resolved": "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz", 608 | "integrity": "sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ==", 609 | "dev": true, 610 | "dependencies": { 611 | "ms": "2.1.2" 612 | }, 613 | "engines": { 614 | "node": ">=6.0" 615 | }, 616 | "peerDependenciesMeta": { 617 | "supports-color": { 618 | "optional": true 619 | } 620 | } 621 | }, 622 | "node_modules/deepmerge": { 623 | "version": "4.3.1", 624 | "resolved": "https://registry.npmjs.org/deepmerge/-/deepmerge-4.3.1.tgz", 625 | "integrity": "sha512-3sUqbMEc77XqpdNO7FRyRog+eW3ph+GYCbj+rK+uYyRMuwsVy0rMiVtPn+QJlKFvWP/1PYpapqYn0Me2knFn+A==", 626 | "dev": true, 627 | "engines": { 628 | "node": ">=0.10.0" 629 | } 630 | }, 631 | "node_modules/dequal": { 632 | "version": "2.0.3", 633 | "resolved": "https://registry.npmjs.org/dequal/-/dequal-2.0.3.tgz", 634 | "integrity": "sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==", 635 | "dev": true, 636 | "engines": { 637 | "node": ">=6" 638 | } 639 | }, 640 | "node_modules/devalue": { 641 | "version": "4.3.2", 642 | "resolved": "https://registry.npmjs.org/devalue/-/devalue-4.3.2.tgz", 643 | "integrity": "sha512-KqFl6pOgOW+Y6wJgu80rHpo2/3H07vr8ntR9rkkFIRETewbf5GaYYcakYfiKz89K+sLsuPkQIZaXDMjUObZwWg==", 644 | "dev": true 645 | }, 646 | "node_modules/esbuild": { 647 | "version": "0.18.20", 648 | "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", 649 | "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", 650 | "dev": true, 651 | "hasInstallScript": true, 652 | "bin": { 653 | "esbuild": "bin/esbuild" 654 | }, 655 | "engines": { 656 | "node": ">=12" 657 | }, 658 | "optionalDependencies": { 659 | "@esbuild/android-arm": "0.18.20", 660 | "@esbuild/android-arm64": "0.18.20", 661 | "@esbuild/android-x64": "0.18.20", 662 | "@esbuild/darwin-arm64": "0.18.20", 663 | "@esbuild/darwin-x64": "0.18.20", 664 | "@esbuild/freebsd-arm64": "0.18.20", 665 | "@esbuild/freebsd-x64": "0.18.20", 666 | "@esbuild/linux-arm": "0.18.20", 667 | "@esbuild/linux-arm64": "0.18.20", 668 | "@esbuild/linux-ia32": "0.18.20", 669 | "@esbuild/linux-loong64": "0.18.20", 670 | "@esbuild/linux-mips64el": "0.18.20", 671 | "@esbuild/linux-ppc64": "0.18.20", 672 | "@esbuild/linux-riscv64": "0.18.20", 673 | "@esbuild/linux-s390x": "0.18.20", 674 | "@esbuild/linux-x64": "0.18.20", 675 | "@esbuild/netbsd-x64": "0.18.20", 676 | "@esbuild/openbsd-x64": "0.18.20", 677 | "@esbuild/sunos-x64": "0.18.20", 678 | "@esbuild/win32-arm64": "0.18.20", 679 | "@esbuild/win32-ia32": "0.18.20", 680 | "@esbuild/win32-x64": "0.18.20" 681 | } 682 | }, 683 | "node_modules/esm-env": { 684 | "version": "1.0.0", 685 | "resolved": "https://registry.npmjs.org/esm-env/-/esm-env-1.0.0.tgz", 686 | "integrity": "sha512-Cf6VksWPsTuW01vU9Mk/3vRue91Zevka5SjyNf3nEpokFRuqt/KjUQoGAwq9qMmhpLTHmXzSIrFRw8zxWzmFBA==", 687 | "dev": true 688 | }, 689 | "node_modules/estree-walker": { 690 | "version": "3.0.3", 691 | "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", 692 | "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", 693 | "dev": true, 694 | "dependencies": { 695 | "@types/estree": "^1.0.0" 696 | } 697 | }, 698 | "node_modules/fsevents": { 699 | "version": "2.3.3", 700 | "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", 701 | "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", 702 | "dev": true, 703 | "hasInstallScript": true, 704 | "optional": true, 705 | "os": [ 706 | "darwin" 707 | ], 708 | "engines": { 709 | "node": "^8.16.0 || ^10.6.0 || >=11.0.0" 710 | } 711 | }, 712 | "node_modules/globalyzer": { 713 | "version": "0.1.0", 714 | "resolved": "https://registry.npmjs.org/globalyzer/-/globalyzer-0.1.0.tgz", 715 | "integrity": "sha512-40oNTM9UfG6aBmuKxk/giHn5nQ8RVz/SS4Ir6zgzOv9/qC3kKZ9v4etGTcJbEl/NyVQH7FGU7d+X1egr57Md2Q==", 716 | "dev": true 717 | }, 718 | "node_modules/globrex": { 719 | "version": "0.1.2", 720 | "resolved": "https://registry.npmjs.org/globrex/-/globrex-0.1.2.tgz", 721 | "integrity": "sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==", 722 | "dev": true 723 | }, 724 | "node_modules/import-meta-resolve": { 725 | "version": "3.0.0", 726 | "resolved": "https://registry.npmjs.org/import-meta-resolve/-/import-meta-resolve-3.0.0.tgz", 727 | "integrity": "sha512-4IwhLhNNA8yy445rPjD/lWh++7hMDOml2eHtd58eG7h+qK3EryMuuRbsHGPikCoAgIkkDnckKfWSk2iDla/ejg==", 728 | "dev": true, 729 | "funding": { 730 | "type": "github", 731 | "url": "https://github.com/sponsors/wooorm" 732 | } 733 | }, 734 | "node_modules/is-reference": { 735 | "version": "3.0.2", 736 | "resolved": "https://registry.npmjs.org/is-reference/-/is-reference-3.0.2.tgz", 737 | "integrity": "sha512-v3rht/LgVcsdZa3O2Nqs+NMowLOxeOm7Ay9+/ARQ2F+qEoANRcqrjAZKGN0v8ymUetZGgkp26LTnGT7H0Qo9Pg==", 738 | "dev": true, 739 | "dependencies": { 740 | "@types/estree": "*" 741 | } 742 | }, 743 | "node_modules/kleur": { 744 | "version": "4.1.5", 745 | "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", 746 | "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", 747 | "dev": true, 748 | "engines": { 749 | "node": ">=6" 750 | } 751 | }, 752 | "node_modules/locate-character": { 753 | "version": "3.0.0", 754 | "resolved": "https://registry.npmjs.org/locate-character/-/locate-character-3.0.0.tgz", 755 | "integrity": "sha512-SW13ws7BjaeJ6p7Q6CO2nchbYEc3X3J6WrmTTDto7yMPqVSZTUyY5Tjbid+Ab8gLnATtygYtiDIJGQRRn2ZOiA==", 756 | "dev": true 757 | }, 758 | "node_modules/magic-string": { 759 | "version": "0.30.4", 760 | "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.4.tgz", 761 | "integrity": "sha512-Q/TKtsC5BPm0kGqgBIF9oXAs/xEf2vRKiIB4wCRQTJOQIByZ1d+NnUOotvJOvNpi5RNIgVOMC3pOuaP1ZTDlVg==", 762 | "dev": true, 763 | "dependencies": { 764 | "@jridgewell/sourcemap-codec": "^1.4.15" 765 | }, 766 | "engines": { 767 | "node": ">=12" 768 | } 769 | }, 770 | "node_modules/mdn-data": { 771 | "version": "2.0.30", 772 | "resolved": "https://registry.npmjs.org/mdn-data/-/mdn-data-2.0.30.tgz", 773 | "integrity": "sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==", 774 | "dev": true 775 | }, 776 | "node_modules/mime": { 777 | "version": "3.0.0", 778 | "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", 779 | "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", 780 | "dev": true, 781 | "bin": { 782 | "mime": "cli.js" 783 | }, 784 | "engines": { 785 | "node": ">=10.0.0" 786 | } 787 | }, 788 | "node_modules/mri": { 789 | "version": "1.2.0", 790 | "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", 791 | "integrity": "sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==", 792 | "dev": true, 793 | "engines": { 794 | "node": ">=4" 795 | } 796 | }, 797 | "node_modules/mrmime": { 798 | "version": "1.0.1", 799 | "resolved": "https://registry.npmjs.org/mrmime/-/mrmime-1.0.1.tgz", 800 | "integrity": "sha512-hzzEagAgDyoU1Q6yg5uI+AorQgdvMCur3FcKf7NhMKWsaYg+RnbTyHRa/9IlLF9rf455MOCtcqqrQQ83pPP7Uw==", 801 | "dev": true, 802 | "engines": { 803 | "node": ">=10" 804 | } 805 | }, 806 | "node_modules/ms": { 807 | "version": "2.1.2", 808 | "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz", 809 | "integrity": "sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w==", 810 | "dev": true 811 | }, 812 | "node_modules/nanoid": { 813 | "version": "3.3.6", 814 | "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.6.tgz", 815 | "integrity": "sha512-BGcqMMJuToF7i1rt+2PWSNVnWIkGCU78jBG3RxO/bZlnZPK2Cmi2QaffxGO/2RvWi9sL+FAiRiXMgsyxQ1DIDA==", 816 | "dev": true, 817 | "funding": [ 818 | { 819 | "type": "github", 820 | "url": "https://github.com/sponsors/ai" 821 | } 822 | ], 823 | "bin": { 824 | "nanoid": "bin/nanoid.cjs" 825 | }, 826 | "engines": { 827 | "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" 828 | } 829 | }, 830 | "node_modules/periscopic": { 831 | "version": "3.1.0", 832 | "resolved": "https://registry.npmjs.org/periscopic/-/periscopic-3.1.0.tgz", 833 | "integrity": "sha512-vKiQ8RRtkl9P+r/+oefh25C3fhybptkHKCZSPlcXiJux2tJF55GnEj3BVn4A5gKfq9NWWXXrxkHBwVPUfH0opw==", 834 | "dev": true, 835 | "dependencies": { 836 | "@types/estree": "^1.0.0", 837 | "estree-walker": "^3.0.0", 838 | "is-reference": "^3.0.0" 839 | } 840 | }, 841 | "node_modules/picocolors": { 842 | "version": "1.0.0", 843 | "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.0.0.tgz", 844 | "integrity": "sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==", 845 | "dev": true 846 | }, 847 | "node_modules/postcss": { 848 | "version": "8.4.31", 849 | "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.31.tgz", 850 | "integrity": "sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==", 851 | "dev": true, 852 | "funding": [ 853 | { 854 | "type": "opencollective", 855 | "url": "https://opencollective.com/postcss/" 856 | }, 857 | { 858 | "type": "tidelift", 859 | "url": "https://tidelift.com/funding/github/npm/postcss" 860 | }, 861 | { 862 | "type": "github", 863 | "url": "https://github.com/sponsors/ai" 864 | } 865 | ], 866 | "dependencies": { 867 | "nanoid": "^3.3.6", 868 | "picocolors": "^1.0.0", 869 | "source-map-js": "^1.0.2" 870 | }, 871 | "engines": { 872 | "node": "^10 || ^12 || >=14" 873 | } 874 | }, 875 | "node_modules/rollup": { 876 | "version": "3.29.4", 877 | "resolved": "https://registry.npmjs.org/rollup/-/rollup-3.29.4.tgz", 878 | "integrity": "sha512-oWzmBZwvYrU0iJHtDmhsm662rC15FRXmcjCk1xD771dFDx5jJ02ufAQQTn0etB2emNk4J9EZg/yWKpsn9BWGRw==", 879 | "dev": true, 880 | "bin": { 881 | "rollup": "dist/bin/rollup" 882 | }, 883 | "engines": { 884 | "node": ">=14.18.0", 885 | "npm": ">=8.0.0" 886 | }, 887 | "optionalDependencies": { 888 | "fsevents": "~2.3.2" 889 | } 890 | }, 891 | "node_modules/sade": { 892 | "version": "1.8.1", 893 | "resolved": "https://registry.npmjs.org/sade/-/sade-1.8.1.tgz", 894 | "integrity": "sha512-xal3CZX1Xlo/k4ApwCFrHVACi9fBqJ7V+mwhBsuf/1IOKbBy098Fex+Wa/5QMubw09pSZ/u8EY8PWgevJsXp1A==", 895 | "dev": true, 896 | "dependencies": { 897 | "mri": "^1.1.0" 898 | }, 899 | "engines": { 900 | "node": ">=6" 901 | } 902 | }, 903 | "node_modules/set-cookie-parser": { 904 | "version": "2.6.0", 905 | "resolved": "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz", 906 | "integrity": "sha512-RVnVQxTXuerk653XfuliOxBP81Sf0+qfQE73LIYKcyMYHG94AuH0kgrQpRDuTZnSmjpysHmzxJXKNfa6PjFhyQ==", 907 | "dev": true 908 | }, 909 | "node_modules/sirv": { 910 | "version": "2.0.3", 911 | "resolved": "https://registry.npmjs.org/sirv/-/sirv-2.0.3.tgz", 912 | "integrity": "sha512-O9jm9BsID1P+0HOi81VpXPoDxYP374pkOLzACAoyUQ/3OUVndNpsz6wMnY2z+yOxzbllCKZrM+9QrWsv4THnyA==", 913 | "dev": true, 914 | "dependencies": { 915 | "@polka/url": "^1.0.0-next.20", 916 | "mrmime": "^1.0.0", 917 | "totalist": "^3.0.0" 918 | }, 919 | "engines": { 920 | "node": ">= 10" 921 | } 922 | }, 923 | "node_modules/source-map-js": { 924 | "version": "1.0.2", 925 | "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.0.2.tgz", 926 | "integrity": "sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==", 927 | "dev": true, 928 | "engines": { 929 | "node": ">=0.10.0" 930 | } 931 | }, 932 | "node_modules/svelte": { 933 | "version": "4.2.1", 934 | "resolved": "https://registry.npmjs.org/svelte/-/svelte-4.2.1.tgz", 935 | "integrity": "sha512-LpLqY2Jr7cRxkrTc796/AaaoMLF/1ax7cto8Ot76wrvKQhrPmZ0JgajiWPmg9mTSDqO16SSLiD17r9MsvAPTmw==", 936 | "dev": true, 937 | "dependencies": { 938 | "@ampproject/remapping": "^2.2.1", 939 | "@jridgewell/sourcemap-codec": "^1.4.15", 940 | "@jridgewell/trace-mapping": "^0.3.18", 941 | "acorn": "^8.9.0", 942 | "aria-query": "^5.3.0", 943 | "axobject-query": "^3.2.1", 944 | "code-red": "^1.0.3", 945 | "css-tree": "^2.3.1", 946 | "estree-walker": "^3.0.3", 947 | "is-reference": "^3.0.1", 948 | "locate-character": "^3.0.0", 949 | "magic-string": "^0.30.0", 950 | "periscopic": "^3.1.0" 951 | }, 952 | "engines": { 953 | "node": ">=16" 954 | } 955 | }, 956 | "node_modules/svelte-hmr": { 957 | "version": "0.15.3", 958 | "resolved": "https://registry.npmjs.org/svelte-hmr/-/svelte-hmr-0.15.3.tgz", 959 | "integrity": "sha512-41snaPswvSf8TJUhlkoJBekRrABDXDMdpNpT2tfHIv4JuhgvHqLMhEPGtaQn0BmbNSTkuz2Ed20DF2eHw0SmBQ==", 960 | "dev": true, 961 | "engines": { 962 | "node": "^12.20 || ^14.13.1 || >= 16" 963 | }, 964 | "peerDependencies": { 965 | "svelte": "^3.19.0 || ^4.0.0" 966 | } 967 | }, 968 | "node_modules/tiny-glob": { 969 | "version": "0.2.9", 970 | "resolved": "https://registry.npmjs.org/tiny-glob/-/tiny-glob-0.2.9.tgz", 971 | "integrity": "sha512-g/55ssRPUjShh+xkfx9UPDXqhckHEsHr4Vd9zX55oSdGZc/MD0m3sferOkwWtp98bv+kcVfEHtRJgBVJzelrzg==", 972 | "dev": true, 973 | "dependencies": { 974 | "globalyzer": "0.1.0", 975 | "globrex": "^0.1.2" 976 | } 977 | }, 978 | "node_modules/totalist": { 979 | "version": "3.0.1", 980 | "resolved": "https://registry.npmjs.org/totalist/-/totalist-3.0.1.tgz", 981 | "integrity": "sha512-sf4i37nQ2LBx4m3wB74y+ubopq6W/dIzXg0FDGjsYnZHVa1Da8FH853wlL2gtUhg+xJXjfk3kUZS3BRoQeoQBQ==", 982 | "dev": true, 983 | "engines": { 984 | "node": ">=6" 985 | } 986 | }, 987 | "node_modules/undici": { 988 | "version": "5.25.4", 989 | "resolved": "https://registry.npmjs.org/undici/-/undici-5.25.4.tgz", 990 | "integrity": "sha512-450yJxT29qKMf3aoudzFpIciqpx6Pji3hEWaXqXmanbXF58LTAGCKxcJjxMXWu3iG+Mudgo3ZUfDB6YDFd/dAw==", 991 | "dev": true, 992 | "dependencies": { 993 | "@fastify/busboy": "^2.0.0" 994 | }, 995 | "engines": { 996 | "node": ">=14.0" 997 | } 998 | }, 999 | "node_modules/vite": { 1000 | "version": "4.4.11", 1001 | "resolved": "https://registry.npmjs.org/vite/-/vite-4.4.11.tgz", 1002 | "integrity": "sha512-ksNZJlkcU9b0lBwAGZGGaZHCMqHsc8OpgtoYhsQ4/I2v5cnpmmmqe5pM4nv/4Hn6G/2GhTdj0DhZh2e+Er1q5A==", 1003 | "dev": true, 1004 | "dependencies": { 1005 | "esbuild": "^0.18.10", 1006 | "postcss": "^8.4.27", 1007 | "rollup": "^3.27.1" 1008 | }, 1009 | "bin": { 1010 | "vite": "bin/vite.js" 1011 | }, 1012 | "engines": { 1013 | "node": "^14.18.0 || >=16.0.0" 1014 | }, 1015 | "funding": { 1016 | "url": "https://github.com/vitejs/vite?sponsor=1" 1017 | }, 1018 | "optionalDependencies": { 1019 | "fsevents": "~2.3.2" 1020 | }, 1021 | "peerDependencies": { 1022 | "@types/node": ">= 14", 1023 | "less": "*", 1024 | "lightningcss": "^1.21.0", 1025 | "sass": "*", 1026 | "stylus": "*", 1027 | "sugarss": "*", 1028 | "terser": "^5.4.0" 1029 | }, 1030 | "peerDependenciesMeta": { 1031 | "@types/node": { 1032 | "optional": true 1033 | }, 1034 | "less": { 1035 | "optional": true 1036 | }, 1037 | "lightningcss": { 1038 | "optional": true 1039 | }, 1040 | "sass": { 1041 | "optional": true 1042 | }, 1043 | "stylus": { 1044 | "optional": true 1045 | }, 1046 | "sugarss": { 1047 | "optional": true 1048 | }, 1049 | "terser": { 1050 | "optional": true 1051 | } 1052 | } 1053 | }, 1054 | "node_modules/vitefu": { 1055 | "version": "0.2.4", 1056 | "resolved": "https://registry.npmjs.org/vitefu/-/vitefu-0.2.4.tgz", 1057 | "integrity": "sha512-fanAXjSaf9xXtOOeno8wZXIhgia+CZury481LsDaV++lSvcU2R9Ch2bPh3PYFyoHW+w9LqAeYRISVQjUIew14g==", 1058 | "dev": true, 1059 | "peerDependencies": { 1060 | "vite": "^3.0.0 || ^4.0.0" 1061 | }, 1062 | "peerDependenciesMeta": { 1063 | "vite": { 1064 | "optional": true 1065 | } 1066 | } 1067 | } 1068 | } 1069 | } 1070 | -------------------------------------------------------------------------------- /Video1/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | }, 16 | "type": "module" 17 | } 18 | -------------------------------------------------------------------------------- /Video1/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 |
%sveltekit.body%
11 | 12 | 13 | -------------------------------------------------------------------------------- /Video1/src/film-store.js: -------------------------------------------------------------------------------- 1 | import {writable} from 'svelte/store' 2 | 3 | export const FilmStore = writable([ 4 | {id: 1, name: 'The Godfather', director: 'Francis Ford Coppola'}, 5 | {id: 2, name: "The Big Lebowski", director: "Coen Brothers"}, 6 | ]) -------------------------------------------------------------------------------- /Video1/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. 2 | -------------------------------------------------------------------------------- /Video1/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 |

Welcome to SvelteKit

2 |

Visit kit.svelte.dev to read the documentation

3 | -------------------------------------------------------------------------------- /Video1/src/routes/films/+page.svelte: -------------------------------------------------------------------------------- 1 | 4 | 5 | -------------------------------------------------------------------------------- /Video1/src/routes/films/[id]/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video1/src/routes/films/[id]/+page.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#if film } 11 |

{film.name}, directed by {film.director}

12 | {:else} 13 |

No film was found with ID {data.id}

14 | {/if} -------------------------------------------------------------------------------- /Video1/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video1/static/favicon.png -------------------------------------------------------------------------------- /Video1/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /Video1/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /Video2/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | -------------------------------------------------------------------------------- /Video2/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /Video2/README.md: -------------------------------------------------------------------------------- 1 | # create-svelte 2 | 3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). 4 | 5 | ## Creating a project 6 | 7 | If you're seeing this, you've probably already done this step. Congrats! 8 | 9 | ```bash 10 | # create a new project in the current directory 11 | npm create svelte@latest 12 | 13 | # create a new project in my-app 14 | npm create svelte@latest my-app 15 | ``` 16 | 17 | ## Developing 18 | 19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 20 | 21 | ```bash 22 | npm run dev 23 | 24 | # or start the server and open the app in a new browser tab 25 | npm run dev -- --open 26 | ``` 27 | 28 | ## Building 29 | 30 | To create a production version of your app: 31 | 32 | ```bash 33 | npm run build 34 | ``` 35 | 36 | You can preview the production build with `npm run preview`. 37 | 38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 39 | -------------------------------------------------------------------------------- /Video2/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | }, 16 | "type": "module", 17 | "dependencies": { 18 | "bootstrap": "^5.3.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Video2/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 | 11 | 12 |
%sveltekit.body%
13 | 14 | 15 | -------------------------------------------------------------------------------- /Video2/src/film-store.js: -------------------------------------------------------------------------------- 1 | import {writable} from 'svelte/store' 2 | 3 | export const FilmStore = writable([ 4 | {id: 1, name: 'The Godfather', director: 'Francis Ford Coppola'}, 5 | {id: 2, name: "The Big Lebowski", director: "Coen Brothers"}, 6 | ]) -------------------------------------------------------------------------------- /Video2/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. -------------------------------------------------------------------------------- /Video2/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 |

Welcome to SvelteKit

2 |

Visit kit.svelte.dev to read the documentation

3 | -------------------------------------------------------------------------------- /Video2/src/routes/films/+layout.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 | 22 |
-------------------------------------------------------------------------------- /Video2/src/routes/films/+page.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 |
11 |

Film List

12 | 13 |
14 | {#each $FilmStore as film} 15 |
16 | 17 |
18 | Film 21 |
22 |
23 |
{ film.name }
24 |

Directed by { film.director }

25 |
26 |
27 | View 28 |
29 |
30 |
31 | 32 |
33 | {/each} 34 |
35 | 36 |
-------------------------------------------------------------------------------- /Video2/src/routes/films/[id]/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video2/src/routes/films/[id]/+page.svelte: -------------------------------------------------------------------------------- 1 | 9 | 10 | {#if film } 11 |

{film.name}, directed by {film.director}

12 | {:else} 13 |

No film was found with ID {data.id}

14 | {/if} -------------------------------------------------------------------------------- /Video2/src/routes/films/add/+page.svelte: -------------------------------------------------------------------------------- 1 | 18 | 19 | 20 |
21 | 22 |

Add a Film

23 | 24 |
25 |
26 |
27 | 28 |
29 |
30 | 31 |
32 | 33 | 34 |
35 |
36 | 37 |
38 | -------------------------------------------------------------------------------- /Video2/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video2/static/favicon.png -------------------------------------------------------------------------------- /Video2/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /Video2/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /Video3/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | venv-backend 12 | __pycache__ -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/films/__init__.py -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from films.models import Film 3 | 4 | # Register your models here. 5 | admin.site.register(Film) -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class FilmsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'films' 7 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.6 on 2023-10-18 16:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Film', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=128)), 19 | ('description', models.TextField()), 20 | ('director', models.CharField(max_length=64)), 21 | ('image', models.ImageField(upload_to='images/')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/films/migrations/__init__.py -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/migrations/__pycache__/0001_initial.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/films/migrations/__pycache__/0001_initial.cpython-310.pyc -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/migrations/__pycache__/__init__.cpython-310.pyc: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/films/migrations/__pycache__/__init__.cpython-310.pyc -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Film(models.Model): 5 | name = models.CharField(max_length=128) 6 | description = models.TextField() 7 | director = models.CharField(max_length=64) 8 | image = models.ImageField(upload_to='images/') 9 | 10 | def __str__(self): 11 | return self.name -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from films.models import Film 3 | 4 | 5 | class FilmSerializer(serializers.ModelSerializer): 6 | class Meta: 7 | model = Film 8 | fields = ('id', 'name', 'director', 'description', 'image') -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | # from films.views import FilmListAPIView, FilmDetailAPIView 3 | from films.views import FilmViewSet 4 | from rest_framework.routers import DefaultRouter 5 | 6 | router = DefaultRouter() 7 | router.register('films', FilmViewSet, basename='films') 8 | urlpatterns = router.urls 9 | 10 | 11 | # urlpatterns = [ 12 | # path('films/', FilmListAPIView.as_view()), 13 | # path('films//', FilmDetailAPIView.as_view()) 14 | # ] -------------------------------------------------------------------------------- /Video3/backend/films_backend/films/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from rest_framework import generics 3 | from films.models import Film 4 | from films.serializers import FilmSerializer 5 | from rest_framework import viewsets 6 | 7 | 8 | class FilmViewSet(viewsets.ModelViewSet): 9 | queryset = Film.objects.all() 10 | serializer_class = FilmSerializer 11 | 12 | 13 | # Create your views here. 14 | # class FilmListAPIView(generics.ListAPIView): 15 | # queryset = Film.objects.all() 16 | # serializer_class = FilmSerializer 17 | 18 | # class FilmDetailAPIView(generics.RetrieveAPIView): 19 | # queryset = Film.objects.all() 20 | # serializer_class = FilmSerializer -------------------------------------------------------------------------------- /Video3/backend/films_backend/films_backend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/films_backend/__init__.py -------------------------------------------------------------------------------- /Video3/backend/films_backend/films_backend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for films_backend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/films_backend/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for films_backend project. 3 | 4 | Generated by 'django-admin startproject' using Django 4.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/4.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-g)hz$pnmc@5tnrq43u$2w**+17sk1z#0klovi+bsiykt1779g2' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'films', 41 | 'rest_framework', 42 | 'corsheaders' 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | "corsheaders.middleware.CorsMiddleware", 49 | 'django.middleware.common.CommonMiddleware', 50 | 'django.middleware.csrf.CsrfViewMiddleware', 51 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 52 | 'django.contrib.messages.middleware.MessageMiddleware', 53 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 54 | ] 55 | 56 | ROOT_URLCONF = 'films_backend.urls' 57 | 58 | TEMPLATES = [ 59 | { 60 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 61 | 'DIRS': [], 62 | 'APP_DIRS': True, 63 | 'OPTIONS': { 64 | 'context_processors': [ 65 | 'django.template.context_processors.debug', 66 | 'django.template.context_processors.request', 67 | 'django.contrib.auth.context_processors.auth', 68 | 'django.contrib.messages.context_processors.messages', 69 | ], 70 | }, 71 | }, 72 | ] 73 | 74 | WSGI_APPLICATION = 'films_backend.wsgi.application' 75 | 76 | 77 | # Database 78 | # https://docs.djangoproject.com/en/4.2/ref/settings/#databases 79 | 80 | DATABASES = { 81 | 'default': { 82 | 'ENGINE': 'django.db.backends.sqlite3', 83 | 'NAME': BASE_DIR / 'db.sqlite3', 84 | } 85 | } 86 | 87 | 88 | # Password validation 89 | # https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators 90 | 91 | AUTH_PASSWORD_VALIDATORS = [ 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 103 | }, 104 | ] 105 | 106 | 107 | # Internationalization 108 | # https://docs.djangoproject.com/en/4.2/topics/i18n/ 109 | 110 | LANGUAGE_CODE = 'en-us' 111 | 112 | TIME_ZONE = 'UTC' 113 | 114 | USE_I18N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/4.2/howto/static-files/ 121 | 122 | STATIC_URL = 'static/' 123 | 124 | # Default primary key field type 125 | # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field 126 | 127 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 128 | 129 | MEDIA_ROOT = BASE_DIR / 'media' 130 | MEDIA_URL = '/media/' 131 | 132 | CORS_ALLOWED_ORIGINS = ['http://127.0.0.1:5173', 'http://localhost:5173'] -------------------------------------------------------------------------------- /Video3/backend/films_backend/films_backend/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | from django.conf import settings 4 | from django.conf.urls.static import static 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('api/', include('films.urls')) 9 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 10 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/films_backend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for films_backend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Video3/backend/films_backend/media/images/chinatown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/media/images/chinatown.png -------------------------------------------------------------------------------- /Video3/backend/films_backend/media/images/chinatown_Fn35P07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/media/images/chinatown_Fn35P07.png -------------------------------------------------------------------------------- /Video3/backend/films_backend/media/images/godfather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/media/images/godfather.png -------------------------------------------------------------------------------- /Video3/backend/films_backend/media/images/lebowski.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/media/images/lebowski.png -------------------------------------------------------------------------------- /Video3/backend/films_backend/media/images/lebowski_cgUa5DP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/media/images/lebowski_cgUa5DP.png -------------------------------------------------------------------------------- /Video3/backend/films_backend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/backend/films_backend/requirements.txt -------------------------------------------------------------------------------- /Video3/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/ambient.d.ts: -------------------------------------------------------------------------------- 1 | 2 | // this file is generated — do not edit it 3 | 4 | 5 | /// 6 | 7 | /** 8 | * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 9 | * 10 | * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. 11 | * 12 | * ```ts 13 | * import { API_KEY } from '$env/static/private'; 14 | * ``` 15 | * 16 | * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: 17 | * 18 | * ``` 19 | * MY_FEATURE_FLAG="" 20 | * ``` 21 | * 22 | * You can override `.env` values from the command line like so: 23 | * 24 | * ```bash 25 | * MY_FEATURE_FLAG="enabled" npm run dev 26 | * ``` 27 | */ 28 | declare module '$env/static/private' { 29 | export const ALLUSERSPROFILE: string; 30 | export const APPDATA: string; 31 | export const COLOR: string; 32 | export const CommonProgramFiles: string; 33 | export const CommonProgramW6432: string; 34 | export const COMPUTERNAME: string; 35 | export const ComSpec: string; 36 | export const DriverData: string; 37 | export const EDITOR: string; 38 | export const FPS_BROWSER_APP_PROFILE_STRING: string; 39 | export const FPS_BROWSER_USER_PROFILE_STRING: string; 40 | export const GOPATH: string; 41 | export const HADOOP_HOME: string; 42 | export const HOME: string; 43 | export const HOMEDRIVE: string; 44 | export const HOMEPATH: string; 45 | export const INIT_CWD: string; 46 | export const JAVA_HOME: string; 47 | export const LOCALAPPDATA: string; 48 | export const LOGONSERVER: string; 49 | export const NODE: string; 50 | export const NODE_ENV: string; 51 | export const NODE_EXE: string; 52 | export const NPM_CLI_JS: string; 53 | export const npm_command: string; 54 | export const npm_config_cache: string; 55 | export const npm_config_engine_strict: string; 56 | export const npm_config_globalconfig: string; 57 | export const npm_config_global_prefix: string; 58 | export const npm_config_init_module: string; 59 | export const npm_config_local_prefix: string; 60 | export const npm_config_metrics_registry: string; 61 | export const npm_config_node_gyp: string; 62 | export const npm_config_noproxy: string; 63 | export const npm_config_npm_version: string; 64 | export const npm_config_prefix: string; 65 | export const npm_config_userconfig: string; 66 | export const npm_config_user_agent: string; 67 | export const npm_execpath: string; 68 | export const npm_lifecycle_event: string; 69 | export const npm_lifecycle_script: string; 70 | export const npm_node_execpath: string; 71 | export const npm_package_json: string; 72 | export const npm_package_name: string; 73 | export const npm_package_version: string; 74 | export const NPM_PREFIX_NPM_CLI_JS: string; 75 | export const NUMBER_OF_PROCESSORS: string; 76 | export const OneDrive: string; 77 | export const OneDriveConsumer: string; 78 | export const OS: string; 79 | export const Path: string; 80 | export const PATHEXT: string; 81 | export const PROCESSOR_ARCHITECTURE: string; 82 | export const PROCESSOR_IDENTIFIER: string; 83 | export const PROCESSOR_LEVEL: string; 84 | export const PROCESSOR_REVISION: string; 85 | export const ProgramData: string; 86 | export const ProgramFiles: string; 87 | export const ProgramW6432: string; 88 | export const PROMPT: string; 89 | export const PSModulePath: string; 90 | export const PUBLIC: string; 91 | export const SESSIONNAME: string; 92 | export const SystemDrive: string; 93 | export const SystemRoot: string; 94 | export const TEMP: string; 95 | export const TMP: string; 96 | export const USERDOMAIN: string; 97 | export const USERDOMAIN_ROAMINGPROFILE: string; 98 | export const USERNAME: string; 99 | export const USERPROFILE: string; 100 | export const VBOX_MSI_INSTALL_PATH: string; 101 | export const windir: string; 102 | } 103 | 104 | /** 105 | * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 106 | * 107 | * Values are replaced statically at build time. 108 | * 109 | * ```ts 110 | * import { PUBLIC_BASE_URL } from '$env/static/public'; 111 | * ``` 112 | */ 113 | declare module '$env/static/public' { 114 | 115 | } 116 | 117 | /** 118 | * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 119 | * 120 | * This module cannot be imported into client-side code. 121 | * 122 | * ```ts 123 | * import { env } from '$env/dynamic/private'; 124 | * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); 125 | * ``` 126 | * 127 | * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. 128 | */ 129 | declare module '$env/dynamic/private' { 130 | export const env: { 131 | ALLUSERSPROFILE: string; 132 | APPDATA: string; 133 | COLOR: string; 134 | CommonProgramFiles: string; 135 | CommonProgramW6432: string; 136 | COMPUTERNAME: string; 137 | ComSpec: string; 138 | DriverData: string; 139 | EDITOR: string; 140 | FPS_BROWSER_APP_PROFILE_STRING: string; 141 | FPS_BROWSER_USER_PROFILE_STRING: string; 142 | GOPATH: string; 143 | HADOOP_HOME: string; 144 | HOME: string; 145 | HOMEDRIVE: string; 146 | HOMEPATH: string; 147 | INIT_CWD: string; 148 | JAVA_HOME: string; 149 | LOCALAPPDATA: string; 150 | LOGONSERVER: string; 151 | NODE: string; 152 | NODE_ENV: string; 153 | NODE_EXE: string; 154 | NPM_CLI_JS: string; 155 | npm_command: string; 156 | npm_config_cache: string; 157 | npm_config_engine_strict: string; 158 | npm_config_globalconfig: string; 159 | npm_config_global_prefix: string; 160 | npm_config_init_module: string; 161 | npm_config_local_prefix: string; 162 | npm_config_metrics_registry: string; 163 | npm_config_node_gyp: string; 164 | npm_config_noproxy: string; 165 | npm_config_npm_version: string; 166 | npm_config_prefix: string; 167 | npm_config_userconfig: string; 168 | npm_config_user_agent: string; 169 | npm_execpath: string; 170 | npm_lifecycle_event: string; 171 | npm_lifecycle_script: string; 172 | npm_node_execpath: string; 173 | npm_package_json: string; 174 | npm_package_name: string; 175 | npm_package_version: string; 176 | NPM_PREFIX_NPM_CLI_JS: string; 177 | NUMBER_OF_PROCESSORS: string; 178 | OneDrive: string; 179 | OneDriveConsumer: string; 180 | OS: string; 181 | Path: string; 182 | PATHEXT: string; 183 | PROCESSOR_ARCHITECTURE: string; 184 | PROCESSOR_IDENTIFIER: string; 185 | PROCESSOR_LEVEL: string; 186 | PROCESSOR_REVISION: string; 187 | ProgramData: string; 188 | ProgramFiles: string; 189 | ProgramW6432: string; 190 | PROMPT: string; 191 | PSModulePath: string; 192 | PUBLIC: string; 193 | SESSIONNAME: string; 194 | SystemDrive: string; 195 | SystemRoot: string; 196 | TEMP: string; 197 | TMP: string; 198 | USERDOMAIN: string; 199 | USERDOMAIN_ROAMINGPROFILE: string; 200 | USERNAME: string; 201 | USERPROFILE: string; 202 | VBOX_MSI_INSTALL_PATH: string; 203 | windir: string; 204 | [key: `PUBLIC_${string}`]: undefined; 205 | [key: `${string}`]: string | undefined; 206 | } 207 | } 208 | 209 | /** 210 | * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 211 | * 212 | * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. 213 | * 214 | * ```ts 215 | * import { env } from '$env/dynamic/public'; 216 | * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); 217 | * ``` 218 | */ 219 | declare module '$env/dynamic/public' { 220 | export const env: { 221 | [key: `PUBLIC_${string}`]: string | undefined; 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/app.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [ 4 | () => import('./nodes/0'), 5 | () => import('./nodes/1'), 6 | () => import('./nodes/2'), 7 | () => import('./nodes/3'), 8 | () => import('./nodes/4'), 9 | () => import('./nodes/5'), 10 | () => import('./nodes/6') 11 | ]; 12 | 13 | export const server_loads = []; 14 | 15 | export const dictionary = { 16 | "/": [3], 17 | "/films": [4,[2]], 18 | "/films/add": [5,[2]], 19 | "/films/[id]": [6,[2]] 20 | }; 21 | 22 | export const hooks = { 23 | handleError: (({ error }) => { console.error(error) }), 24 | }; 25 | 26 | export { default as root } from '../root.svelte'; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/matchers.js: -------------------------------------------------------------------------------- 1 | export const matchers = {}; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/0.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/1.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/error.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/2.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+layout.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/3.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+page.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/4.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+page.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/5.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/add/+page.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/client/nodes/6.js: -------------------------------------------------------------------------------- 1 | import * as universal from "../../../../src/routes/films/[id]/+page.js"; 2 | export { universal }; 3 | export { default as component } from "../../../../src/routes/films/[id]/+page.svelte"; -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/root.svelte: -------------------------------------------------------------------------------- 1 | 2 | 42 | 43 | {#if constructors[1]} 44 | 45 | {#if constructors[2]} 46 | 47 | 48 | 49 | {:else} 50 | 51 | {/if} 52 | 53 | {:else} 54 | 55 | {/if} 56 | 57 | {#if mounted} 58 |
59 | {#if navigated} 60 | {title} 61 | {/if} 62 |
63 | {/if} -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/generated/server/internal.js: -------------------------------------------------------------------------------- 1 | 2 | import root from '../root.svelte'; 3 | import { set_building } from '__sveltekit/environment'; 4 | import { set_assets } from '__sveltekit/paths'; 5 | import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js'; 6 | 7 | export const options = { 8 | app_template_contains_nonce: false, 9 | csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}}, 10 | csrf_check_origin: true, 11 | track_server_fetches: false, 12 | embedded: false, 13 | env_public_prefix: 'PUBLIC_', 14 | env_private_prefix: '', 15 | hooks: null, // added lazily, via `get_hooks` 16 | preload_strategy: "modulepreload", 17 | root, 18 | service_worker: false, 19 | templates: { 20 | app: ({ head, body, assets, nonce, env }) => "\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t" + head + "\n\n\t\t\n\t\n\t\n\t\t
" + body + "
\n\t\n\n", 21 | error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" 22 | }, 23 | version_hash: "jtnec1" 24 | }; 25 | 26 | export function get_hooks() { 27 | return {}; 28 | } 29 | 30 | export { set_assets, set_building, set_private_env, set_public_env }; 31 | -------------------------------------------------------------------------------- /Video3/frontend/.svelte-kit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "$lib": [ 5 | "../src/lib" 6 | ], 7 | "$lib/*": [ 8 | "../src/lib/*" 9 | ] 10 | }, 11 | "rootDirs": [ 12 | "..", 13 | "./types" 14 | ], 15 | "importsNotUsedAsValues": "error", 16 | "isolatedModules": true, 17 | "preserveValueImports": true, 18 | "lib": [ 19 | "esnext", 20 | "DOM", 21 | "DOM.Iterable" 22 | ], 23 | "moduleResolution": "node", 24 | "module": "esnext", 25 | "target": "esnext" 26 | }, 27 | "include": [ 28 | "ambient.d.ts", 29 | "./types/**/$types.d.ts", 30 | "../vite.config.ts", 31 | "../src/**/*.js", 32 | "../src/**/*.ts", 33 | "../src/**/*.svelte", 34 | "../tests/**/*.js", 35 | "../tests/**/*.ts", 36 | "../tests/**/*.svelte" 37 | ], 38 | "exclude": [ 39 | "../node_modules/**", 40 | "./[!ambient.d.ts]**", 41 | "../src/service-worker.js", 42 | "../src/service-worker.ts", 43 | "../src/service-worker.d.ts" 44 | ] 45 | } -------------------------------------------------------------------------------- /Video3/frontend/README.md: -------------------------------------------------------------------------------- 1 | # create-svelte 2 | 3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). 4 | 5 | ## Creating a project 6 | 7 | If you're seeing this, you've probably already done this step. Congrats! 8 | 9 | ```bash 10 | # create a new project in the current directory 11 | npm create svelte@latest 12 | 13 | # create a new project in my-app 14 | npm create svelte@latest my-app 15 | ``` 16 | 17 | ## Developing 18 | 19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 20 | 21 | ```bash 22 | npm run dev 23 | 24 | # or start the server and open the app in a new browser tab 25 | npm run dev -- --open 26 | ``` 27 | 28 | ## Building 29 | 30 | To create a production version of your app: 31 | 32 | ```bash 33 | npm run build 34 | ``` 35 | 36 | You can preview the production build with `npm run preview`. 37 | 38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 39 | -------------------------------------------------------------------------------- /Video3/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | }, 16 | "type": "module", 17 | "dependencies": { 18 | "bootstrap": "^5.3.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Video3/frontend/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 | 11 | 12 |
%sveltekit.body%
13 | 14 | 15 | -------------------------------------------------------------------------------- /Video3/frontend/src/film-store.js: -------------------------------------------------------------------------------- 1 | import {writable} from 'svelte/store' 2 | 3 | export const FilmStore = writable([]) -------------------------------------------------------------------------------- /Video3/frontend/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. -------------------------------------------------------------------------------- /Video3/frontend/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 |

Welcome to SvelteKit

2 |

Visit kit.svelte.dev to read the documentation

3 | -------------------------------------------------------------------------------- /Video3/frontend/src/routes/films/+layout.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 | 22 |
-------------------------------------------------------------------------------- /Video3/frontend/src/routes/films/+page.svelte: -------------------------------------------------------------------------------- 1 | 15 | 16 |
17 |

Film List

18 | 19 |
20 | {#each $FilmStore as film} 21 |
22 | 23 |
24 | Film 27 |
28 |
29 |
{ film.name }
30 |

Directed by { film.director }

31 |
32 |
33 | View 34 |
35 |
36 |
37 | 38 |
39 | {/each} 40 |
41 | 42 |
-------------------------------------------------------------------------------- /Video3/frontend/src/routes/films/[id]/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video3/frontend/src/routes/films/[id]/+page.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 | {#if film } 26 |

{ film.name }

27 |
28 | Film 29 |
30 |
31 |

{ film.name }, directed by { film.director }

32 |

{ film.description }

33 |
34 | {:else } 35 |

No film was found with ID {data.id}

36 | {/if } 37 |
-------------------------------------------------------------------------------- /Video3/frontend/src/routes/films/add/+page.svelte: -------------------------------------------------------------------------------- 1 | 35 | 36 | 37 |
38 | 39 |

Add a Film

40 | 41 | {#if showInvalidMessage } 42 |

Form data is not valid

43 | {/if } 44 | 45 |
46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 | 58 |
59 | 60 | 61 |
62 |
63 | 64 |
65 | -------------------------------------------------------------------------------- /Video3/frontend/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video3/frontend/static/favicon.png -------------------------------------------------------------------------------- /Video3/frontend/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /Video3/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /Video4/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | venv-backend 12 | __pycache__ -------------------------------------------------------------------------------- /Video4/backend/films_backend/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/db.sqlite3 -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/films/__init__.py -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from films.models import Film 3 | 4 | # Register your models here. 5 | admin.site.register(Film) -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class FilmsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'films' 7 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.6 on 2023-10-18 16:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Film', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=128)), 19 | ('description', models.TextField()), 20 | ('director', models.CharField(max_length=64)), 21 | ('image', models.ImageField(upload_to='images/')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/films/migrations/__init__.py -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Film(models.Model): 5 | name = models.CharField(max_length=128) 6 | description = models.TextField() 7 | director = models.CharField(max_length=64) 8 | image = models.ImageField(upload_to='images/') 9 | 10 | def __str__(self): 11 | return self.name -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from films.models import Film 3 | 4 | 5 | class FilmSerializer(serializers.ModelSerializer): 6 | image = serializers.ImageField(required=False) 7 | 8 | class Meta: 9 | model = Film 10 | fields = ('id', 'name', 'director', 'description', 'image') -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | # from films.views import FilmListAPIView, FilmDetailAPIView 3 | from films.views import FilmViewSet 4 | from rest_framework.routers import DefaultRouter 5 | 6 | router = DefaultRouter() 7 | router.register('films', FilmViewSet, basename='films') 8 | urlpatterns = router.urls 9 | 10 | 11 | # urlpatterns = [ 12 | # path('films/', FilmListAPIView.as_view()), 13 | # path('films//', FilmDetailAPIView.as_view()) 14 | # ] -------------------------------------------------------------------------------- /Video4/backend/films_backend/films/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from rest_framework import generics 3 | from films.models import Film 4 | from films.serializers import FilmSerializer 5 | from rest_framework import viewsets 6 | 7 | 8 | class FilmViewSet(viewsets.ModelViewSet): 9 | queryset = Film.objects.all() 10 | serializer_class = FilmSerializer 11 | 12 | 13 | # Create your views here. 14 | # class FilmListAPIView(generics.ListAPIView): 15 | # queryset = Film.objects.all() 16 | # serializer_class = FilmSerializer 17 | 18 | # class FilmDetailAPIView(generics.RetrieveAPIView): 19 | # queryset = Film.objects.all() 20 | # serializer_class = FilmSerializer -------------------------------------------------------------------------------- /Video4/backend/films_backend/films_backend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/films_backend/__init__.py -------------------------------------------------------------------------------- /Video4/backend/films_backend/films_backend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for films_backend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/films_backend/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for films_backend project. 3 | 4 | Generated by 'django-admin startproject' using Django 4.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/4.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-g)hz$pnmc@5tnrq43u$2w**+17sk1z#0klovi+bsiykt1779g2' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'films', 41 | 'rest_framework', 42 | 'corsheaders' 43 | ] 44 | 45 | MIDDLEWARE = [ 46 | 'django.middleware.security.SecurityMiddleware', 47 | 'django.contrib.sessions.middleware.SessionMiddleware', 48 | "corsheaders.middleware.CorsMiddleware", 49 | 'django.middleware.common.CommonMiddleware', 50 | 'django.middleware.csrf.CsrfViewMiddleware', 51 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 52 | 'django.contrib.messages.middleware.MessageMiddleware', 53 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 54 | ] 55 | 56 | ROOT_URLCONF = 'films_backend.urls' 57 | 58 | TEMPLATES = [ 59 | { 60 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 61 | 'DIRS': [], 62 | 'APP_DIRS': True, 63 | 'OPTIONS': { 64 | 'context_processors': [ 65 | 'django.template.context_processors.debug', 66 | 'django.template.context_processors.request', 67 | 'django.contrib.auth.context_processors.auth', 68 | 'django.contrib.messages.context_processors.messages', 69 | ], 70 | }, 71 | }, 72 | ] 73 | 74 | WSGI_APPLICATION = 'films_backend.wsgi.application' 75 | 76 | 77 | # Database 78 | # https://docs.djangoproject.com/en/4.2/ref/settings/#databases 79 | 80 | DATABASES = { 81 | 'default': { 82 | 'ENGINE': 'django.db.backends.sqlite3', 83 | 'NAME': BASE_DIR / 'db.sqlite3', 84 | } 85 | } 86 | 87 | 88 | # Password validation 89 | # https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators 90 | 91 | AUTH_PASSWORD_VALIDATORS = [ 92 | { 93 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 94 | }, 95 | { 96 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 97 | }, 98 | { 99 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 100 | }, 101 | { 102 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 103 | }, 104 | ] 105 | 106 | 107 | # Internationalization 108 | # https://docs.djangoproject.com/en/4.2/topics/i18n/ 109 | 110 | LANGUAGE_CODE = 'en-us' 111 | 112 | TIME_ZONE = 'UTC' 113 | 114 | USE_I18N = True 115 | 116 | USE_TZ = True 117 | 118 | 119 | # Static files (CSS, JavaScript, Images) 120 | # https://docs.djangoproject.com/en/4.2/howto/static-files/ 121 | 122 | STATIC_URL = 'static/' 123 | 124 | # Default primary key field type 125 | # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field 126 | 127 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 128 | 129 | MEDIA_ROOT = BASE_DIR / 'media' 130 | MEDIA_URL = '/media/' 131 | 132 | CORS_ALLOWED_ORIGINS = ['http://127.0.0.1:5173', 'http://localhost:5173'] -------------------------------------------------------------------------------- /Video4/backend/films_backend/films_backend/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | from django.conf import settings 4 | from django.conf.urls.static import static 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('api/', include('films.urls')) 9 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 10 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/films_backend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for films_backend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/chinatown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/chinatown.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/chinatown_Fn35P07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/chinatown_Fn35P07.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/chinatown_xu29jRx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/chinatown_xu29jRx.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/godfather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/godfather.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/lebowski.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/lebowski.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/lebowski_cgUa5DP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/lebowski_cgUa5DP.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/media/images/lebowski_xWdJ7pd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/media/images/lebowski_xWdJ7pd.png -------------------------------------------------------------------------------- /Video4/backend/films_backend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/backend/films_backend/requirements.txt -------------------------------------------------------------------------------- /Video4/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/ambient.d.ts: -------------------------------------------------------------------------------- 1 | 2 | // this file is generated — do not edit it 3 | 4 | 5 | /// 6 | 7 | /** 8 | * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 9 | * 10 | * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. 11 | * 12 | * ```ts 13 | * import { API_KEY } from '$env/static/private'; 14 | * ``` 15 | * 16 | * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: 17 | * 18 | * ``` 19 | * MY_FEATURE_FLAG="" 20 | * ``` 21 | * 22 | * You can override `.env` values from the command line like so: 23 | * 24 | * ```bash 25 | * MY_FEATURE_FLAG="enabled" npm run dev 26 | * ``` 27 | */ 28 | declare module '$env/static/private' { 29 | export const ALLUSERSPROFILE: string; 30 | export const APPDATA: string; 31 | export const COLOR: string; 32 | export const CommonProgramFiles: string; 33 | export const CommonProgramW6432: string; 34 | export const COMPUTERNAME: string; 35 | export const ComSpec: string; 36 | export const DriverData: string; 37 | export const EDITOR: string; 38 | export const FPS_BROWSER_APP_PROFILE_STRING: string; 39 | export const FPS_BROWSER_USER_PROFILE_STRING: string; 40 | export const GOPATH: string; 41 | export const HADOOP_HOME: string; 42 | export const HOME: string; 43 | export const HOMEDRIVE: string; 44 | export const HOMEPATH: string; 45 | export const INIT_CWD: string; 46 | export const JAVA_HOME: string; 47 | export const LOCALAPPDATA: string; 48 | export const LOGONSERVER: string; 49 | export const NODE: string; 50 | export const NODE_ENV: string; 51 | export const NODE_EXE: string; 52 | export const NPM_CLI_JS: string; 53 | export const npm_command: string; 54 | export const npm_config_cache: string; 55 | export const npm_config_engine_strict: string; 56 | export const npm_config_globalconfig: string; 57 | export const npm_config_global_prefix: string; 58 | export const npm_config_init_module: string; 59 | export const npm_config_local_prefix: string; 60 | export const npm_config_metrics_registry: string; 61 | export const npm_config_node_gyp: string; 62 | export const npm_config_noproxy: string; 63 | export const npm_config_npm_version: string; 64 | export const npm_config_prefix: string; 65 | export const npm_config_userconfig: string; 66 | export const npm_config_user_agent: string; 67 | export const npm_execpath: string; 68 | export const npm_lifecycle_event: string; 69 | export const npm_lifecycle_script: string; 70 | export const npm_node_execpath: string; 71 | export const npm_package_json: string; 72 | export const npm_package_name: string; 73 | export const npm_package_version: string; 74 | export const NPM_PREFIX_NPM_CLI_JS: string; 75 | export const NUMBER_OF_PROCESSORS: string; 76 | export const OneDrive: string; 77 | export const OneDriveConsumer: string; 78 | export const OS: string; 79 | export const Path: string; 80 | export const PATHEXT: string; 81 | export const PROCESSOR_ARCHITECTURE: string; 82 | export const PROCESSOR_IDENTIFIER: string; 83 | export const PROCESSOR_LEVEL: string; 84 | export const PROCESSOR_REVISION: string; 85 | export const ProgramData: string; 86 | export const ProgramFiles: string; 87 | export const ProgramW6432: string; 88 | export const PROMPT: string; 89 | export const PSModulePath: string; 90 | export const PUBLIC: string; 91 | export const SESSIONNAME: string; 92 | export const SystemDrive: string; 93 | export const SystemRoot: string; 94 | export const TEMP: string; 95 | export const TMP: string; 96 | export const USERDOMAIN: string; 97 | export const USERDOMAIN_ROAMINGPROFILE: string; 98 | export const USERNAME: string; 99 | export const USERPROFILE: string; 100 | export const VBOX_MSI_INSTALL_PATH: string; 101 | export const windir: string; 102 | } 103 | 104 | /** 105 | * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 106 | * 107 | * Values are replaced statically at build time. 108 | * 109 | * ```ts 110 | * import { PUBLIC_BASE_URL } from '$env/static/public'; 111 | * ``` 112 | */ 113 | declare module '$env/static/public' { 114 | 115 | } 116 | 117 | /** 118 | * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 119 | * 120 | * This module cannot be imported into client-side code. 121 | * 122 | * ```ts 123 | * import { env } from '$env/dynamic/private'; 124 | * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); 125 | * ``` 126 | * 127 | * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. 128 | */ 129 | declare module '$env/dynamic/private' { 130 | export const env: { 131 | ALLUSERSPROFILE: string; 132 | APPDATA: string; 133 | COLOR: string; 134 | CommonProgramFiles: string; 135 | CommonProgramW6432: string; 136 | COMPUTERNAME: string; 137 | ComSpec: string; 138 | DriverData: string; 139 | EDITOR: string; 140 | FPS_BROWSER_APP_PROFILE_STRING: string; 141 | FPS_BROWSER_USER_PROFILE_STRING: string; 142 | GOPATH: string; 143 | HADOOP_HOME: string; 144 | HOME: string; 145 | HOMEDRIVE: string; 146 | HOMEPATH: string; 147 | INIT_CWD: string; 148 | JAVA_HOME: string; 149 | LOCALAPPDATA: string; 150 | LOGONSERVER: string; 151 | NODE: string; 152 | NODE_ENV: string; 153 | NODE_EXE: string; 154 | NPM_CLI_JS: string; 155 | npm_command: string; 156 | npm_config_cache: string; 157 | npm_config_engine_strict: string; 158 | npm_config_globalconfig: string; 159 | npm_config_global_prefix: string; 160 | npm_config_init_module: string; 161 | npm_config_local_prefix: string; 162 | npm_config_metrics_registry: string; 163 | npm_config_node_gyp: string; 164 | npm_config_noproxy: string; 165 | npm_config_npm_version: string; 166 | npm_config_prefix: string; 167 | npm_config_userconfig: string; 168 | npm_config_user_agent: string; 169 | npm_execpath: string; 170 | npm_lifecycle_event: string; 171 | npm_lifecycle_script: string; 172 | npm_node_execpath: string; 173 | npm_package_json: string; 174 | npm_package_name: string; 175 | npm_package_version: string; 176 | NPM_PREFIX_NPM_CLI_JS: string; 177 | NUMBER_OF_PROCESSORS: string; 178 | OneDrive: string; 179 | OneDriveConsumer: string; 180 | OS: string; 181 | Path: string; 182 | PATHEXT: string; 183 | PROCESSOR_ARCHITECTURE: string; 184 | PROCESSOR_IDENTIFIER: string; 185 | PROCESSOR_LEVEL: string; 186 | PROCESSOR_REVISION: string; 187 | ProgramData: string; 188 | ProgramFiles: string; 189 | ProgramW6432: string; 190 | PROMPT: string; 191 | PSModulePath: string; 192 | PUBLIC: string; 193 | SESSIONNAME: string; 194 | SystemDrive: string; 195 | SystemRoot: string; 196 | TEMP: string; 197 | TMP: string; 198 | USERDOMAIN: string; 199 | USERDOMAIN_ROAMINGPROFILE: string; 200 | USERNAME: string; 201 | USERPROFILE: string; 202 | VBOX_MSI_INSTALL_PATH: string; 203 | windir: string; 204 | [key: `PUBLIC_${string}`]: undefined; 205 | [key: `${string}`]: string | undefined; 206 | } 207 | } 208 | 209 | /** 210 | * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 211 | * 212 | * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. 213 | * 214 | * ```ts 215 | * import { env } from '$env/dynamic/public'; 216 | * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); 217 | * ``` 218 | */ 219 | declare module '$env/dynamic/public' { 220 | export const env: { 221 | [key: `PUBLIC_${string}`]: string | undefined; 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/app.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [ 4 | () => import('./nodes/0'), 5 | () => import('./nodes/1'), 6 | () => import('./nodes/2'), 7 | () => import('./nodes/3'), 8 | () => import('./nodes/4'), 9 | () => import('./nodes/5'), 10 | () => import('./nodes/6'), 11 | () => import('./nodes/7') 12 | ]; 13 | 14 | export const server_loads = []; 15 | 16 | export const dictionary = { 17 | "/": [3], 18 | "/films": [4,[2]], 19 | "/films/add": [5,[2]], 20 | "/films/[id]": [6,[2]], 21 | "/films/[id]/update": [7,[2]] 22 | }; 23 | 24 | export const hooks = { 25 | handleError: (({ error }) => { console.error(error) }), 26 | }; 27 | 28 | export { default as root } from '../root.svelte'; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/matchers.js: -------------------------------------------------------------------------------- 1 | export const matchers = {}; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/0.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/1.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/error.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/2.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+layout.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/3.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+page.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/4.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+page.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/5.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/add/+page.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/6.js: -------------------------------------------------------------------------------- 1 | import * as universal from "../../../../src/routes/films/[id]/+page.js"; 2 | export { universal }; 3 | export { default as component } from "../../../../src/routes/films/[id]/+page.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/client/nodes/7.js: -------------------------------------------------------------------------------- 1 | import * as universal from "../../../../src/routes/films/[id]/update/+page.js"; 2 | export { universal }; 3 | export { default as component } from "../../../../src/routes/films/[id]/update/+page.svelte"; -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/root.svelte: -------------------------------------------------------------------------------- 1 | 2 | 42 | 43 | {#if constructors[1]} 44 | 45 | {#if constructors[2]} 46 | 47 | 48 | 49 | {:else} 50 | 51 | {/if} 52 | 53 | {:else} 54 | 55 | {/if} 56 | 57 | {#if mounted} 58 |
59 | {#if navigated} 60 | {title} 61 | {/if} 62 |
63 | {/if} -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/generated/server/internal.js: -------------------------------------------------------------------------------- 1 | 2 | import root from '../root.svelte'; 3 | import { set_building } from '__sveltekit/environment'; 4 | import { set_assets } from '__sveltekit/paths'; 5 | import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js'; 6 | 7 | export const options = { 8 | app_template_contains_nonce: false, 9 | csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}}, 10 | csrf_check_origin: true, 11 | track_server_fetches: false, 12 | embedded: false, 13 | env_public_prefix: 'PUBLIC_', 14 | env_private_prefix: '', 15 | hooks: null, // added lazily, via `get_hooks` 16 | preload_strategy: "modulepreload", 17 | root, 18 | service_worker: false, 19 | templates: { 20 | app: ({ head, body, assets, nonce, env }) => "\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t" + head + "\n\n\t\t\n\t\n\t\n\t\t
" + body + "
\n\t\n\n", 21 | error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" 22 | }, 23 | version_hash: "1vksb14" 24 | }; 25 | 26 | export function get_hooks() { 27 | return {}; 28 | } 29 | 30 | export { set_assets, set_building, set_private_env, set_public_env }; 31 | -------------------------------------------------------------------------------- /Video4/frontend/.svelte-kit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "$lib": [ 5 | "../src/lib" 6 | ], 7 | "$lib/*": [ 8 | "../src/lib/*" 9 | ] 10 | }, 11 | "rootDirs": [ 12 | "..", 13 | "./types" 14 | ], 15 | "importsNotUsedAsValues": "error", 16 | "isolatedModules": true, 17 | "preserveValueImports": true, 18 | "lib": [ 19 | "esnext", 20 | "DOM", 21 | "DOM.Iterable" 22 | ], 23 | "moduleResolution": "node", 24 | "module": "esnext", 25 | "target": "esnext" 26 | }, 27 | "include": [ 28 | "ambient.d.ts", 29 | "./types/**/$types.d.ts", 30 | "../vite.config.ts", 31 | "../src/**/*.js", 32 | "../src/**/*.ts", 33 | "../src/**/*.svelte", 34 | "../tests/**/*.js", 35 | "../tests/**/*.ts", 36 | "../tests/**/*.svelte" 37 | ], 38 | "exclude": [ 39 | "../node_modules/**", 40 | "./[!ambient.d.ts]**", 41 | "../src/service-worker.js", 42 | "../src/service-worker.ts", 43 | "../src/service-worker.d.ts" 44 | ] 45 | } -------------------------------------------------------------------------------- /Video4/frontend/README.md: -------------------------------------------------------------------------------- 1 | # create-svelte 2 | 3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). 4 | 5 | ## Creating a project 6 | 7 | If you're seeing this, you've probably already done this step. Congrats! 8 | 9 | ```bash 10 | # create a new project in the current directory 11 | npm create svelte@latest 12 | 13 | # create a new project in my-app 14 | npm create svelte@latest my-app 15 | ``` 16 | 17 | ## Developing 18 | 19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 20 | 21 | ```bash 22 | npm run dev 23 | 24 | # or start the server and open the app in a new browser tab 25 | npm run dev -- --open 26 | ``` 27 | 28 | ## Building 29 | 30 | To create a production version of your app: 31 | 32 | ```bash 33 | npm run build 34 | ``` 35 | 36 | You can preview the production build with `npm run preview`. 37 | 38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 39 | -------------------------------------------------------------------------------- /Video4/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | }, 16 | "type": "module", 17 | "dependencies": { 18 | "bootstrap": "^5.3.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Video4/frontend/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 | 11 | 12 |
%sveltekit.body%
13 | 14 | 15 | -------------------------------------------------------------------------------- /Video4/frontend/src/film-store.js: -------------------------------------------------------------------------------- 1 | import {writable} from 'svelte/store' 2 | 3 | export const FilmStore = writable([]) -------------------------------------------------------------------------------- /Video4/frontend/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. -------------------------------------------------------------------------------- /Video4/frontend/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 |

Welcome to SvelteKit

2 |

Visit kit.svelte.dev to read the documentation

3 | -------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/+layout.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 | 22 |
-------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/+page.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 |

Film List

26 | 27 |
28 | {#each $FilmStore as film} 29 |
30 | 31 |
32 | Film 35 |
36 |
37 |
{ film.name }
38 |

Directed by { film.director }

39 |
40 |
41 | View 42 | 43 | 46 |
47 |
48 |
49 | 50 |
51 | {/each} 52 |
53 | 54 |
-------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/[id]/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/[id]/+page.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 | {#if film } 26 |

{ film.name }

27 |
28 | Film 29 |
30 |
31 |

{ film.name }, directed by { film.director }

32 |

{ film.description }

33 | 34 | Update 35 |
36 | {:else } 37 |

No film was found with ID {data.id}

38 | {/if } 39 |
-------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/[id]/update/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/[id]/update/+page.svelte: -------------------------------------------------------------------------------- 1 | 64 | 65 | 66 |
67 | 68 |

Add a Film

69 | 70 | {#if showInvalidMessage } 71 |

Form data is not valid

72 | {/if } 73 | 74 |
75 |
76 |
77 | 78 |
79 |
80 | 81 |
82 |
83 | 84 |
85 |
86 | 87 |
88 | 89 | 90 |
91 |
92 | 93 |
94 | -------------------------------------------------------------------------------- /Video4/frontend/src/routes/films/add/+page.svelte: -------------------------------------------------------------------------------- 1 | 35 | 36 | 37 |
38 | 39 |

Add a Film

40 | 41 | {#if showInvalidMessage } 42 |

Form data is not valid

43 | {/if } 44 | 45 |
46 |
47 |
48 | 49 |
50 |
51 | 52 |
53 |
54 | 55 |
56 |
57 | 58 |
59 | 60 | 61 |
62 |
63 | 64 |
65 | -------------------------------------------------------------------------------- /Video4/frontend/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video4/frontend/static/favicon.png -------------------------------------------------------------------------------- /Video4/frontend/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /Video4/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | -------------------------------------------------------------------------------- /Video5/.gitignore: -------------------------------------------------------------------------------- 1 | .DS_Store 2 | node_modules 3 | /build 4 | /.svelte-kit 5 | /package 6 | .env 7 | .env.* 8 | !.env.example 9 | vite.config.js.timestamp-* 10 | vite.config.ts.timestamp-* 11 | venv-backend 12 | __pycache__ 13 | db.sqlite3 -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/films/__init__.py -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from films.models import Film 3 | 4 | # Register your models here. 5 | admin.site.register(Film) -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class FilmsConfig(AppConfig): 5 | default_auto_field = 'django.db.models.BigAutoField' 6 | name = 'films' 7 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # Generated by Django 4.2.6 on 2023-10-18 16:50 2 | 3 | from django.db import migrations, models 4 | 5 | 6 | class Migration(migrations.Migration): 7 | 8 | initial = True 9 | 10 | dependencies = [ 11 | ] 12 | 13 | operations = [ 14 | migrations.CreateModel( 15 | name='Film', 16 | fields=[ 17 | ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 18 | ('name', models.CharField(max_length=128)), 19 | ('description', models.TextField()), 20 | ('director', models.CharField(max_length=64)), 21 | ('image', models.ImageField(upload_to='images/')), 22 | ], 23 | ), 24 | ] 25 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/films/migrations/__init__.py -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | from taggit.managers import TaggableManager 3 | 4 | # Create your models here. 5 | class Film(models.Model): 6 | name = models.CharField(max_length=128) 7 | description = models.TextField() 8 | director = models.CharField(max_length=64) 9 | image = models.ImageField(upload_to='images/') 10 | 11 | tags = TaggableManager() 12 | 13 | def __str__(self): 14 | return self.name -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/serializers.py: -------------------------------------------------------------------------------- 1 | from rest_framework import serializers 2 | from films.models import Film 3 | from taggit.serializers import (TagListSerializerField, 4 | TaggitSerializer) 5 | 6 | class FilmSerializer(TaggitSerializer, serializers.ModelSerializer): 7 | image = serializers.ImageField(required=False) 8 | tags = TagListSerializerField(default=[]) 9 | 10 | class Meta: 11 | model = Film 12 | fields = ('id', 'name', 'director', 'description', 'image', 'tags') -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/tests.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | 3 | # Create your tests here. 4 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/urls.py: -------------------------------------------------------------------------------- 1 | from django.urls import path 2 | # from films.views import FilmListAPIView, FilmDetailAPIView 3 | from films.views import FilmViewSet 4 | from rest_framework.routers import DefaultRouter 5 | 6 | router = DefaultRouter() 7 | router.register('films', FilmViewSet, basename='films') 8 | urlpatterns = router.urls 9 | 10 | 11 | # urlpatterns = [ 12 | # path('films/', FilmListAPIView.as_view()), 13 | # path('films//', FilmDetailAPIView.as_view()) 14 | # ] -------------------------------------------------------------------------------- /Video5/backend/films_backend/films/views.py: -------------------------------------------------------------------------------- 1 | from django.shortcuts import render 2 | from rest_framework import generics 3 | from films.models import Film 4 | from films.serializers import FilmSerializer 5 | from rest_framework import viewsets 6 | 7 | 8 | class FilmViewSet(viewsets.ModelViewSet): 9 | queryset = Film.objects.all() 10 | serializer_class = FilmSerializer 11 | 12 | 13 | # Create your views here. 14 | # class FilmListAPIView(generics.ListAPIView): 15 | # queryset = Film.objects.all() 16 | # serializer_class = FilmSerializer 17 | 18 | # class FilmDetailAPIView(generics.RetrieveAPIView): 19 | # queryset = Film.objects.all() 20 | # serializer_class = FilmSerializer -------------------------------------------------------------------------------- /Video5/backend/films_backend/films_backend/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/films_backend/__init__.py -------------------------------------------------------------------------------- /Video5/backend/films_backend/films_backend/asgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | ASGI config for films_backend project. 3 | 4 | It exposes the ASGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/asgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.asgi import get_asgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_asgi_application() 17 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/films_backend/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for films_backend project. 3 | 4 | Generated by 'django-admin startproject' using Django 4.2.6. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/4.2/ref/settings/ 11 | """ 12 | 13 | from pathlib import Path 14 | 15 | # Build paths inside the project like this: BASE_DIR / 'subdir'. 16 | BASE_DIR = Path(__file__).resolve().parent.parent 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/4.2/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'django-insecure-g)hz$pnmc@5tnrq43u$2w**+17sk1z#0klovi+bsiykt1779g2' 24 | 25 | # SECURITY WARNING: don't run with debug turned on in production! 26 | DEBUG = True 27 | 28 | ALLOWED_HOSTS = [] 29 | 30 | 31 | # Application definition 32 | 33 | INSTALLED_APPS = [ 34 | 'django.contrib.admin', 35 | 'django.contrib.auth', 36 | 'django.contrib.contenttypes', 37 | 'django.contrib.sessions', 38 | 'django.contrib.messages', 39 | 'django.contrib.staticfiles', 40 | 'films', 41 | 'rest_framework', 42 | 'corsheaders', 43 | 'taggit' 44 | ] 45 | 46 | MIDDLEWARE = [ 47 | 'django.middleware.security.SecurityMiddleware', 48 | 'django.contrib.sessions.middleware.SessionMiddleware', 49 | "corsheaders.middleware.CorsMiddleware", 50 | 'django.middleware.common.CommonMiddleware', 51 | 'django.middleware.csrf.CsrfViewMiddleware', 52 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 53 | 'django.contrib.messages.middleware.MessageMiddleware', 54 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 55 | ] 56 | 57 | ROOT_URLCONF = 'films_backend.urls' 58 | 59 | TEMPLATES = [ 60 | { 61 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 62 | 'DIRS': [], 63 | 'APP_DIRS': True, 64 | 'OPTIONS': { 65 | 'context_processors': [ 66 | 'django.template.context_processors.debug', 67 | 'django.template.context_processors.request', 68 | 'django.contrib.auth.context_processors.auth', 69 | 'django.contrib.messages.context_processors.messages', 70 | ], 71 | }, 72 | }, 73 | ] 74 | 75 | WSGI_APPLICATION = 'films_backend.wsgi.application' 76 | 77 | 78 | # Database 79 | # https://docs.djangoproject.com/en/4.2/ref/settings/#databases 80 | 81 | DATABASES = { 82 | 'default': { 83 | 'ENGINE': 'django.db.backends.sqlite3', 84 | 'NAME': BASE_DIR / 'db.sqlite3', 85 | } 86 | } 87 | 88 | 89 | # Password validation 90 | # https://docs.djangoproject.com/en/4.2/ref/settings/#auth-password-validators 91 | 92 | AUTH_PASSWORD_VALIDATORS = [ 93 | { 94 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 95 | }, 96 | { 97 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 98 | }, 99 | { 100 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 101 | }, 102 | { 103 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 104 | }, 105 | ] 106 | 107 | 108 | # Internationalization 109 | # https://docs.djangoproject.com/en/4.2/topics/i18n/ 110 | 111 | LANGUAGE_CODE = 'en-us' 112 | 113 | TIME_ZONE = 'UTC' 114 | 115 | USE_I18N = True 116 | 117 | USE_TZ = True 118 | 119 | 120 | # Static files (CSS, JavaScript, Images) 121 | # https://docs.djangoproject.com/en/4.2/howto/static-files/ 122 | 123 | STATIC_URL = 'static/' 124 | 125 | # Default primary key field type 126 | # https://docs.djangoproject.com/en/4.2/ref/settings/#default-auto-field 127 | 128 | DEFAULT_AUTO_FIELD = 'django.db.models.BigAutoField' 129 | 130 | MEDIA_ROOT = BASE_DIR / 'media' 131 | MEDIA_URL = '/media/' 132 | 133 | CORS_ALLOWED_ORIGINS = ['http://127.0.0.1:5173', 'http://localhost:5173'] -------------------------------------------------------------------------------- /Video5/backend/films_backend/films_backend/urls.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from django.urls import path, include 3 | from django.conf import settings 4 | from django.conf.urls.static import static 5 | 6 | urlpatterns = [ 7 | path('admin/', admin.site.urls), 8 | path('api/', include('films.urls')) 9 | ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) 10 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/films_backend/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for films_backend project. 3 | 4 | It exposes the WSGI callable as a module-level variable named ``application``. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/4.2/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | 14 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 15 | 16 | application = get_wsgi_application() 17 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | """Django's command-line utility for administrative tasks.""" 3 | import os 4 | import sys 5 | 6 | 7 | def main(): 8 | """Run administrative tasks.""" 9 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'films_backend.settings') 10 | try: 11 | from django.core.management import execute_from_command_line 12 | except ImportError as exc: 13 | raise ImportError( 14 | "Couldn't import Django. Are you sure it's installed and " 15 | "available on your PYTHONPATH environment variable? Did you " 16 | "forget to activate a virtual environment?" 17 | ) from exc 18 | execute_from_command_line(sys.argv) 19 | 20 | 21 | if __name__ == '__main__': 22 | main() 23 | -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_6F2WjSA.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_6F2WjSA.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_Fe85BUC.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_Fe85BUC.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_Fn35P07.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_Fn35P07.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_VjytVFJ.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_VjytVFJ.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_oXn6KiS.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_oXn6KiS.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/chinatown_xu29jRx.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/chinatown_xu29jRx.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/godfather.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/godfather.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/lebowski.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/lebowski.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/lebowski_cgUa5DP.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/lebowski_cgUa5DP.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/media/images/lebowski_xWdJ7pd.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/media/images/lebowski_xWdJ7pd.png -------------------------------------------------------------------------------- /Video5/backend/films_backend/requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/backend/films_backend/requirements.txt -------------------------------------------------------------------------------- /Video5/frontend/.npmrc: -------------------------------------------------------------------------------- 1 | engine-strict=true 2 | -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/ambient.d.ts: -------------------------------------------------------------------------------- 1 | 2 | // this file is generated — do not edit it 3 | 4 | 5 | /// 6 | 7 | /** 8 | * Environment variables [loaded by Vite](https://vitejs.dev/guide/env-and-mode.html#env-files) from `.env` files and `process.env`. Like [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), this module cannot be imported into client-side code. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 9 | * 10 | * _Unlike_ [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), the values exported from this module are statically injected into your bundle at build time, enabling optimisations like dead code elimination. 11 | * 12 | * ```ts 13 | * import { API_KEY } from '$env/static/private'; 14 | * ``` 15 | * 16 | * Note that all environment variables referenced in your code should be declared (for example in an `.env` file), even if they don't have a value until the app is deployed: 17 | * 18 | * ``` 19 | * MY_FEATURE_FLAG="" 20 | * ``` 21 | * 22 | * You can override `.env` values from the command line like so: 23 | * 24 | * ```bash 25 | * MY_FEATURE_FLAG="enabled" npm run dev 26 | * ``` 27 | */ 28 | declare module '$env/static/private' { 29 | export const ALLUSERSPROFILE: string; 30 | export const APPDATA: string; 31 | export const COLOR: string; 32 | export const CommonProgramFiles: string; 33 | export const CommonProgramW6432: string; 34 | export const COMPUTERNAME: string; 35 | export const ComSpec: string; 36 | export const DriverData: string; 37 | export const EDITOR: string; 38 | export const FPS_BROWSER_APP_PROFILE_STRING: string; 39 | export const FPS_BROWSER_USER_PROFILE_STRING: string; 40 | export const GOPATH: string; 41 | export const HADOOP_HOME: string; 42 | export const HOME: string; 43 | export const HOMEDRIVE: string; 44 | export const HOMEPATH: string; 45 | export const INIT_CWD: string; 46 | export const JAVA_HOME: string; 47 | export const LOCALAPPDATA: string; 48 | export const LOGONSERVER: string; 49 | export const NODE: string; 50 | export const NODE_ENV: string; 51 | export const NODE_EXE: string; 52 | export const NPM_CLI_JS: string; 53 | export const npm_command: string; 54 | export const npm_config_cache: string; 55 | export const npm_config_engine_strict: string; 56 | export const npm_config_globalconfig: string; 57 | export const npm_config_global_prefix: string; 58 | export const npm_config_init_module: string; 59 | export const npm_config_local_prefix: string; 60 | export const npm_config_metrics_registry: string; 61 | export const npm_config_node_gyp: string; 62 | export const npm_config_noproxy: string; 63 | export const npm_config_npm_version: string; 64 | export const npm_config_prefix: string; 65 | export const npm_config_userconfig: string; 66 | export const npm_config_user_agent: string; 67 | export const npm_execpath: string; 68 | export const npm_lifecycle_event: string; 69 | export const npm_lifecycle_script: string; 70 | export const npm_node_execpath: string; 71 | export const npm_package_json: string; 72 | export const npm_package_name: string; 73 | export const npm_package_version: string; 74 | export const NPM_PREFIX_NPM_CLI_JS: string; 75 | export const NUMBER_OF_PROCESSORS: string; 76 | export const OneDrive: string; 77 | export const OneDriveConsumer: string; 78 | export const OS: string; 79 | export const Path: string; 80 | export const PATHEXT: string; 81 | export const PROCESSOR_ARCHITECTURE: string; 82 | export const PROCESSOR_IDENTIFIER: string; 83 | export const PROCESSOR_LEVEL: string; 84 | export const PROCESSOR_REVISION: string; 85 | export const ProgramData: string; 86 | export const ProgramFiles: string; 87 | export const ProgramW6432: string; 88 | export const PROMPT: string; 89 | export const PSModulePath: string; 90 | export const PUBLIC: string; 91 | export const SESSIONNAME: string; 92 | export const SystemDrive: string; 93 | export const SystemRoot: string; 94 | export const TEMP: string; 95 | export const TMP: string; 96 | export const USERDOMAIN: string; 97 | export const USERDOMAIN_ROAMINGPROFILE: string; 98 | export const USERNAME: string; 99 | export const USERPROFILE: string; 100 | export const VBOX_MSI_INSTALL_PATH: string; 101 | export const windir: string; 102 | } 103 | 104 | /** 105 | * Similar to [`$env/static/private`](https://kit.svelte.dev/docs/modules#$env-static-private), except that it only includes environment variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 106 | * 107 | * Values are replaced statically at build time. 108 | * 109 | * ```ts 110 | * import { PUBLIC_BASE_URL } from '$env/static/public'; 111 | * ``` 112 | */ 113 | declare module '$env/static/public' { 114 | 115 | } 116 | 117 | /** 118 | * This module provides access to runtime environment variables, as defined by the platform you're running on. For example if you're using [`adapter-node`](https://github.com/sveltejs/kit/tree/master/packages/adapter-node) (or running [`vite preview`](https://kit.svelte.dev/docs/cli)), this is equivalent to `process.env`. This module only includes variables that _do not_ begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) _and do_ start with [`config.kit.env.privatePrefix`](https://kit.svelte.dev/docs/configuration#env) (if configured). 119 | * 120 | * This module cannot be imported into client-side code. 121 | * 122 | * ```ts 123 | * import { env } from '$env/dynamic/private'; 124 | * console.log(env.DEPLOYMENT_SPECIFIC_VARIABLE); 125 | * ``` 126 | * 127 | * > In `dev`, `$env/dynamic` always includes environment variables from `.env`. In `prod`, this behavior will depend on your adapter. 128 | */ 129 | declare module '$env/dynamic/private' { 130 | export const env: { 131 | ALLUSERSPROFILE: string; 132 | APPDATA: string; 133 | COLOR: string; 134 | CommonProgramFiles: string; 135 | CommonProgramW6432: string; 136 | COMPUTERNAME: string; 137 | ComSpec: string; 138 | DriverData: string; 139 | EDITOR: string; 140 | FPS_BROWSER_APP_PROFILE_STRING: string; 141 | FPS_BROWSER_USER_PROFILE_STRING: string; 142 | GOPATH: string; 143 | HADOOP_HOME: string; 144 | HOME: string; 145 | HOMEDRIVE: string; 146 | HOMEPATH: string; 147 | INIT_CWD: string; 148 | JAVA_HOME: string; 149 | LOCALAPPDATA: string; 150 | LOGONSERVER: string; 151 | NODE: string; 152 | NODE_ENV: string; 153 | NODE_EXE: string; 154 | NPM_CLI_JS: string; 155 | npm_command: string; 156 | npm_config_cache: string; 157 | npm_config_engine_strict: string; 158 | npm_config_globalconfig: string; 159 | npm_config_global_prefix: string; 160 | npm_config_init_module: string; 161 | npm_config_local_prefix: string; 162 | npm_config_metrics_registry: string; 163 | npm_config_node_gyp: string; 164 | npm_config_noproxy: string; 165 | npm_config_npm_version: string; 166 | npm_config_prefix: string; 167 | npm_config_userconfig: string; 168 | npm_config_user_agent: string; 169 | npm_execpath: string; 170 | npm_lifecycle_event: string; 171 | npm_lifecycle_script: string; 172 | npm_node_execpath: string; 173 | npm_package_json: string; 174 | npm_package_name: string; 175 | npm_package_version: string; 176 | NPM_PREFIX_NPM_CLI_JS: string; 177 | NUMBER_OF_PROCESSORS: string; 178 | OneDrive: string; 179 | OneDriveConsumer: string; 180 | OS: string; 181 | Path: string; 182 | PATHEXT: string; 183 | PROCESSOR_ARCHITECTURE: string; 184 | PROCESSOR_IDENTIFIER: string; 185 | PROCESSOR_LEVEL: string; 186 | PROCESSOR_REVISION: string; 187 | ProgramData: string; 188 | ProgramFiles: string; 189 | ProgramW6432: string; 190 | PROMPT: string; 191 | PSModulePath: string; 192 | PUBLIC: string; 193 | SESSIONNAME: string; 194 | SystemDrive: string; 195 | SystemRoot: string; 196 | TEMP: string; 197 | TMP: string; 198 | USERDOMAIN: string; 199 | USERDOMAIN_ROAMINGPROFILE: string; 200 | USERNAME: string; 201 | USERPROFILE: string; 202 | VBOX_MSI_INSTALL_PATH: string; 203 | windir: string; 204 | [key: `PUBLIC_${string}`]: undefined; 205 | [key: `${string}`]: string | undefined; 206 | } 207 | } 208 | 209 | /** 210 | * Similar to [`$env/dynamic/private`](https://kit.svelte.dev/docs/modules#$env-dynamic-private), but only includes variables that begin with [`config.kit.env.publicPrefix`](https://kit.svelte.dev/docs/configuration#env) (which defaults to `PUBLIC_`), and can therefore safely be exposed to client-side code. 211 | * 212 | * Note that public dynamic environment variables must all be sent from the server to the client, causing larger network requests — when possible, use `$env/static/public` instead. 213 | * 214 | * ```ts 215 | * import { env } from '$env/dynamic/public'; 216 | * console.log(env.PUBLIC_DEPLOYMENT_SPECIFIC_VARIABLE); 217 | * ``` 218 | */ 219 | declare module '$env/dynamic/public' { 220 | export const env: { 221 | [key: `PUBLIC_${string}`]: string | undefined; 222 | } 223 | } 224 | -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/app.js: -------------------------------------------------------------------------------- 1 | export { matchers } from './matchers.js'; 2 | 3 | export const nodes = [ 4 | () => import('./nodes/0'), 5 | () => import('./nodes/1'), 6 | () => import('./nodes/2'), 7 | () => import('./nodes/3'), 8 | () => import('./nodes/4'), 9 | () => import('./nodes/5'), 10 | () => import('./nodes/6'), 11 | () => import('./nodes/7') 12 | ]; 13 | 14 | export const server_loads = []; 15 | 16 | export const dictionary = { 17 | "/": [3], 18 | "/films": [4,[2]], 19 | "/films/add": [5,[2]], 20 | "/films/[id]": [6,[2]], 21 | "/films/[id]/update": [7,[2]] 22 | }; 23 | 24 | export const hooks = { 25 | handleError: (({ error }) => { console.error(error) }), 26 | }; 27 | 28 | export { default as root } from '../root.svelte'; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/matchers.js: -------------------------------------------------------------------------------- 1 | export const matchers = {}; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/0.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/layout.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/1.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../node_modules/@sveltejs/kit/src/runtime/components/error.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/2.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+layout.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/3.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/+page.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/4.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/+page.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/5.js: -------------------------------------------------------------------------------- 1 | export { default as component } from "../../../../src/routes/films/add/+page.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/6.js: -------------------------------------------------------------------------------- 1 | import * as universal from "../../../../src/routes/films/[id]/+page.js"; 2 | export { universal }; 3 | export { default as component } from "../../../../src/routes/films/[id]/+page.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/client/nodes/7.js: -------------------------------------------------------------------------------- 1 | import * as universal from "../../../../src/routes/films/[id]/update/+page.js"; 2 | export { universal }; 3 | export { default as component } from "../../../../src/routes/films/[id]/update/+page.svelte"; -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/root.svelte: -------------------------------------------------------------------------------- 1 | 2 | 42 | 43 | {#if constructors[1]} 44 | 45 | {#if constructors[2]} 46 | 47 | 48 | 49 | {:else} 50 | 51 | {/if} 52 | 53 | {:else} 54 | 55 | {/if} 56 | 57 | {#if mounted} 58 |
59 | {#if navigated} 60 | {title} 61 | {/if} 62 |
63 | {/if} -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/generated/server/internal.js: -------------------------------------------------------------------------------- 1 | 2 | import root from '../root.svelte'; 3 | import { set_building } from '__sveltekit/environment'; 4 | import { set_assets } from '__sveltekit/paths'; 5 | import { set_private_env, set_public_env } from '../../../node_modules/@sveltejs/kit/src/runtime/shared-server.js'; 6 | 7 | export const options = { 8 | app_template_contains_nonce: false, 9 | csp: {"mode":"auto","directives":{"upgrade-insecure-requests":false,"block-all-mixed-content":false},"reportOnly":{"upgrade-insecure-requests":false,"block-all-mixed-content":false}}, 10 | csrf_check_origin: true, 11 | track_server_fetches: false, 12 | embedded: false, 13 | env_public_prefix: 'PUBLIC_', 14 | env_private_prefix: '', 15 | hooks: null, // added lazily, via `get_hooks` 16 | preload_strategy: "modulepreload", 17 | root, 18 | service_worker: false, 19 | templates: { 20 | app: ({ head, body, assets, nonce, env }) => "\n\n\t\n\t\t\n\t\t\n\t\t\n\t\t" + head + "\n\n\t\t\n\t\n\t\n\t\t
" + body + "
\n\t\n\n", 21 | error: ({ status, message }) => "\n\n\t\n\t\t\n\t\t" + message + "\n\n\t\t\n\t\n\t\n\t\t
\n\t\t\t" + status + "\n\t\t\t
\n\t\t\t\t

" + message + "

\n\t\t\t
\n\t\t
\n\t\n\n" 22 | }, 23 | version_hash: "1xzi62g" 24 | }; 25 | 26 | export function get_hooks() { 27 | return {}; 28 | } 29 | 30 | export { set_assets, set_building, set_private_env, set_public_env }; 31 | -------------------------------------------------------------------------------- /Video5/frontend/.svelte-kit/tsconfig.json: -------------------------------------------------------------------------------- 1 | { 2 | "compilerOptions": { 3 | "paths": { 4 | "$lib": [ 5 | "../src/lib" 6 | ], 7 | "$lib/*": [ 8 | "../src/lib/*" 9 | ] 10 | }, 11 | "rootDirs": [ 12 | "..", 13 | "./types" 14 | ], 15 | "importsNotUsedAsValues": "error", 16 | "isolatedModules": true, 17 | "preserveValueImports": true, 18 | "lib": [ 19 | "esnext", 20 | "DOM", 21 | "DOM.Iterable" 22 | ], 23 | "moduleResolution": "node", 24 | "module": "esnext", 25 | "target": "esnext" 26 | }, 27 | "include": [ 28 | "ambient.d.ts", 29 | "./types/**/$types.d.ts", 30 | "../vite.config.ts", 31 | "../src/**/*.js", 32 | "../src/**/*.ts", 33 | "../src/**/*.svelte", 34 | "../tests/**/*.js", 35 | "../tests/**/*.ts", 36 | "../tests/**/*.svelte" 37 | ], 38 | "exclude": [ 39 | "../node_modules/**", 40 | "./[!ambient.d.ts]**", 41 | "../src/service-worker.js", 42 | "../src/service-worker.ts", 43 | "../src/service-worker.d.ts" 44 | ] 45 | } -------------------------------------------------------------------------------- /Video5/frontend/README.md: -------------------------------------------------------------------------------- 1 | # create-svelte 2 | 3 | Everything you need to build a Svelte project, powered by [`create-svelte`](https://github.com/sveltejs/kit/tree/master/packages/create-svelte). 4 | 5 | ## Creating a project 6 | 7 | If you're seeing this, you've probably already done this step. Congrats! 8 | 9 | ```bash 10 | # create a new project in the current directory 11 | npm create svelte@latest 12 | 13 | # create a new project in my-app 14 | npm create svelte@latest my-app 15 | ``` 16 | 17 | ## Developing 18 | 19 | Once you've created a project and installed dependencies with `npm install` (or `pnpm install` or `yarn`), start a development server: 20 | 21 | ```bash 22 | npm run dev 23 | 24 | # or start the server and open the app in a new browser tab 25 | npm run dev -- --open 26 | ``` 27 | 28 | ## Building 29 | 30 | To create a production version of your app: 31 | 32 | ```bash 33 | npm run build 34 | ``` 35 | 36 | You can preview the production build with `npm run preview`. 37 | 38 | > To deploy your app, you may need to install an [adapter](https://kit.svelte.dev/docs/adapters) for your target environment. 39 | -------------------------------------------------------------------------------- /Video5/frontend/package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "film-frontend", 3 | "version": "0.0.1", 4 | "private": true, 5 | "scripts": { 6 | "dev": "vite dev", 7 | "build": "vite build", 8 | "preview": "vite preview" 9 | }, 10 | "devDependencies": { 11 | "@sveltejs/adapter-auto": "^2.0.0", 12 | "@sveltejs/kit": "^1.20.4", 13 | "svelte": "^4.0.5", 14 | "vite": "^4.4.2" 15 | }, 16 | "type": "module", 17 | "dependencies": { 18 | "bootstrap": "^5.3.2" 19 | } 20 | } 21 | -------------------------------------------------------------------------------- /Video5/frontend/src/app.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | %sveltekit.head% 8 | 9 | 10 | 11 | 12 |
%sveltekit.body%
13 | 14 | 15 | -------------------------------------------------------------------------------- /Video5/frontend/src/film-store.js: -------------------------------------------------------------------------------- 1 | import {writable} from 'svelte/store' 2 | 3 | export const FilmStore = writable([]) -------------------------------------------------------------------------------- /Video5/frontend/src/lib/index.js: -------------------------------------------------------------------------------- 1 | // place files you want to import through the `$lib` alias in this folder. -------------------------------------------------------------------------------- /Video5/frontend/src/routes/+page.svelte: -------------------------------------------------------------------------------- 1 |

Welcome to SvelteKit

2 |

Visit kit.svelte.dev to read the documentation

3 | -------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/+layout.svelte: -------------------------------------------------------------------------------- 1 | 19 | 20 |
21 | 22 |
-------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/+page.svelte: -------------------------------------------------------------------------------- 1 | 38 | 39 |
40 |

Film List

41 | 42 |
43 | {#each tags as tag} 44 | 46 | {/each } 47 | 49 |
50 | 51 |
52 | {#each filteredFilms as film} 53 |
54 | 55 |
56 | Film 59 |
60 |
61 |
{ film.name }
62 |

Directed by { film.director }

63 |
64 |
65 | View 66 | 67 | 70 |
71 | {#each film.tags as tag} 72 |
{tag}
73 | {/each } 74 |
75 |
76 |
77 |
78 | 79 |
80 | {/each} 81 |
82 | 83 |
-------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/[id]/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/[id]/+page.svelte: -------------------------------------------------------------------------------- 1 | 23 | 24 |
25 | {#if film } 26 |

{ film.name }

27 |
28 | Film 29 |
30 |
31 |

{ film.name }, directed by { film.director }

32 |

{ film.description }

33 | 34 | Update 35 |
36 | {:else } 37 |

No film was found with ID {data.id}

38 | {/if } 39 |
-------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/[id]/update/+page.js: -------------------------------------------------------------------------------- 1 | export function load({ params }) { 2 | return { 3 | id: params.id 4 | }; 5 | } -------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/[id]/update/+page.svelte: -------------------------------------------------------------------------------- 1 | 64 | 65 | 66 |
67 | 68 |

Add a Film

69 | 70 | {#if showInvalidMessage } 71 |

Form data is not valid

72 | {/if } 73 | 74 |
75 |
76 |
77 | 78 |
79 |
80 | 81 |
82 |
83 | 84 |
85 |
86 | 87 |
88 | 89 | 90 |
91 |
92 | 93 |
94 | -------------------------------------------------------------------------------- /Video5/frontend/src/routes/films/add/+page.svelte: -------------------------------------------------------------------------------- 1 | 40 | 41 | 42 |
43 | 44 |

Add a Film

45 | 46 | {#if showInvalidMessage } 47 |

Form data is not valid

48 | {/if } 49 | 50 |
51 |
52 |
53 | 54 |
55 |
56 | 57 |
58 |
59 | 60 |
61 |
62 | 63 |
64 |
65 | 66 |
67 | 68 |
69 |
70 | 71 |
72 | -------------------------------------------------------------------------------- /Video5/frontend/static/favicon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/bugbytes-io/svelte-django-app/c288d63dbcad2f5cdde76f79815371701e664937/Video5/frontend/static/favicon.png -------------------------------------------------------------------------------- /Video5/frontend/svelte.config.js: -------------------------------------------------------------------------------- 1 | import adapter from '@sveltejs/adapter-auto'; 2 | 3 | /** @type {import('@sveltejs/kit').Config} */ 4 | const config = { 5 | kit: { 6 | // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. 7 | // If your environment is not supported or you settled on a specific environment, switch out the adapter. 8 | // See https://kit.svelte.dev/docs/adapters for more information about adapters. 9 | adapter: adapter() 10 | } 11 | }; 12 | 13 | export default config; 14 | -------------------------------------------------------------------------------- /Video5/frontend/vite.config.js: -------------------------------------------------------------------------------- 1 | import { sveltekit } from '@sveltejs/kit/vite'; 2 | import { defineConfig } from 'vite'; 3 | 4 | export default defineConfig({ 5 | plugins: [sveltekit()] 6 | }); 7 | --------------------------------------------------------------------------------