Directory
13 | {% for person in people %} 14 |{{ person.name }}
17 |{{ person.title }}
18 |{{ person.email }}
19 |├── Directory ├── Directory │ ├── __init__.py │ ├── settings.py │ ├── urls.py │ └── wsgi.py ├── Procfile ├── db.sqlite3 ├── manage.py ├── requirements.txt └── www │ ├── __init__.py │ ├── admin.py │ ├── apps.py │ ├── fixtures │ └── team.json │ ├── migrations │ ├── 0001_initial.py │ └── __init__.py │ ├── models.py │ ├── static │ ├── main.css │ └── normalize.css │ ├── templates │ └── index.html │ ├── tests.py │ ├── urls.py │ └── views.py └── README.md /Directory/Directory/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/WatchUsBuild-TeamDirectoryAppWithDjango/ba2a031e590b745a270dd9b0c98baaea86c0d102/Directory/Directory/__init__.py -------------------------------------------------------------------------------- /Directory/Directory/settings.py: -------------------------------------------------------------------------------- 1 | """ 2 | Django settings for Directory project. 3 | 4 | Generated by 'django-admin startproject' using Django 1.9.8. 5 | 6 | For more information on this file, see 7 | https://docs.djangoproject.com/en/1.9/topics/settings/ 8 | 9 | For the full list of settings and their values, see 10 | https://docs.djangoproject.com/en/1.9/ref/settings/ 11 | """ 12 | 13 | import os 14 | 15 | # Build paths inside the project like this: os.path.join(BASE_DIR, ...) 16 | BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) 17 | 18 | 19 | # Quick-start development settings - unsuitable for production 20 | # See https://docs.djangoproject.com/en/1.9/howto/deployment/checklist/ 21 | 22 | # SECURITY WARNING: keep the secret key used in production secret! 23 | SECRET_KEY = 'ia#toth@hd!xxvrsvad36^m&)3c@nn8=#joaan_228+9$5h-m=' 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 | 'www', 35 | 36 | 'django.contrib.admin', 37 | 'django.contrib.auth', 38 | 'django.contrib.contenttypes', 39 | 'django.contrib.sessions', 40 | 'django.contrib.messages', 41 | 'django.contrib.staticfiles', 42 | ] 43 | 44 | MIDDLEWARE_CLASSES = [ 45 | 'django.middleware.security.SecurityMiddleware', 46 | 'django.contrib.sessions.middleware.SessionMiddleware', 47 | 'django.middleware.common.CommonMiddleware', 48 | 'django.middleware.csrf.CsrfViewMiddleware', 49 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 50 | 'django.contrib.auth.middleware.SessionAuthenticationMiddleware', 51 | 'django.contrib.messages.middleware.MessageMiddleware', 52 | 'django.middleware.clickjacking.XFrameOptionsMiddleware', 53 | ] 54 | 55 | ROOT_URLCONF = 'Directory.urls' 56 | 57 | TEMPLATES = [ 58 | { 59 | 'BACKEND': 'django.template.backends.django.DjangoTemplates', 60 | 'DIRS': [], 61 | 'APP_DIRS': True, 62 | 'OPTIONS': { 63 | 'context_processors': [ 64 | 'django.template.context_processors.debug', 65 | 'django.template.context_processors.request', 66 | 'django.contrib.auth.context_processors.auth', 67 | 'django.contrib.messages.context_processors.messages', 68 | ], 69 | }, 70 | }, 71 | ] 72 | 73 | WSGI_APPLICATION = 'Directory.wsgi.application' 74 | 75 | 76 | # Database 77 | # https://docs.djangoproject.com/en/1.9/ref/settings/#databases 78 | 79 | DATABASES = { 80 | 'default': { 81 | 'ENGINE': 'django.db.backends.sqlite3', 82 | 'NAME': os.path.join(BASE_DIR, 'db.sqlite3'), 83 | } 84 | } 85 | 86 | 87 | # Password validation 88 | # https://docs.djangoproject.com/en/1.9/ref/settings/#auth-password-validators 89 | 90 | AUTH_PASSWORD_VALIDATORS = [ 91 | { 92 | 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator', 93 | }, 94 | { 95 | 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator', 96 | }, 97 | { 98 | 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator', 99 | }, 100 | { 101 | 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator', 102 | }, 103 | ] 104 | 105 | 106 | # Internationalization 107 | # https://docs.djangoproject.com/en/1.9/topics/i18n/ 108 | 109 | LANGUAGE_CODE = 'en-us' 110 | 111 | TIME_ZONE = 'UTC' 112 | 113 | USE_I18N = True 114 | 115 | USE_L10N = True 116 | 117 | USE_TZ = True 118 | 119 | 120 | # Static files (CSS, JavaScript, Images) 121 | # https://docs.djangoproject.com/en/1.9/howto/static-files/ 122 | 123 | PROJECT_ROOT = os.path.dirname(os.path.abspath(__file__)) 124 | STATIC_ROOT = os.path.join(PROJECT_ROOT, 'staticfiles') 125 | STATIC_URL = '/static/' 126 | STATICFILES_DIRS = ( 127 | BASE_DIR + '/www/static', 128 | ) 129 | 130 | STATICFILES_STORAGE = 'whitenoise.django.GzipManifestStaticFilesStorage' 131 | -------------------------------------------------------------------------------- /Directory/Directory/urls.py: -------------------------------------------------------------------------------- 1 | """Directory URL Configuration 2 | 3 | The `urlpatterns` list routes URLs to views. For more information please see: 4 | https://docs.djangoproject.com/en/1.9/topics/http/urls/ 5 | Examples: 6 | Function views 7 | 1. Add an import: from my_app import views 8 | 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') 9 | Class-based views 10 | 1. Add an import: from other_app.views import Home 11 | 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') 12 | Including another URLconf 13 | 1. Import the include() function: from django.conf.urls import url, include 14 | 2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) 15 | """ 16 | from django.conf.urls import include, url 17 | from django.contrib import admin 18 | 19 | urlpatterns = [ 20 | url(r'^admin/', admin.site.urls), 21 | url(r'^', include('www.urls')) 22 | ] 23 | -------------------------------------------------------------------------------- /Directory/Directory/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for Directory 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/1.9/howto/deployment/wsgi/ 8 | """ 9 | 10 | import os 11 | 12 | from django.core.wsgi import get_wsgi_application 13 | from whitenoise.django import DjangoWhiteNoise 14 | 15 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Directory.settings") 16 | 17 | application = get_wsgi_application() 18 | application = DjangoWhiteNoise(application) -------------------------------------------------------------------------------- /Directory/Procfile: -------------------------------------------------------------------------------- 1 | web: sh -c "cd Directory && gunicorn Directory.wsgi" -------------------------------------------------------------------------------- /Directory/db.sqlite3: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/WatchUsBuild-TeamDirectoryAppWithDjango/ba2a031e590b745a270dd9b0c98baaea86c0d102/Directory/db.sqlite3 -------------------------------------------------------------------------------- /Directory/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | import os 3 | import sys 4 | 5 | if __name__ == "__main__": 6 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "Directory.settings") 7 | 8 | from django.core.management import execute_from_command_line 9 | 10 | execute_from_command_line(sys.argv) 11 | -------------------------------------------------------------------------------- /Directory/requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.10 2 | gunicorn==19.6.0 3 | whitenoise==3.2 4 | -------------------------------------------------------------------------------- /Directory/www/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/WatchUsBuild-TeamDirectoryAppWithDjango/ba2a031e590b745a270dd9b0c98baaea86c0d102/Directory/www/__init__.py -------------------------------------------------------------------------------- /Directory/www/admin.py: -------------------------------------------------------------------------------- 1 | from django.contrib import admin 2 | from .models import Person 3 | 4 | # Register your models here. 5 | admin.site.register(Person) 6 | -------------------------------------------------------------------------------- /Directory/www/apps.py: -------------------------------------------------------------------------------- 1 | from django.apps import AppConfig 2 | 3 | 4 | class WwwConfig(AppConfig): 5 | name = 'www' 6 | -------------------------------------------------------------------------------- /Directory/www/fixtures/team.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "model": "www.person", 4 | "pk": 1, 5 | "fields": { 6 | "name": "Adam Fortuna", 7 | "title": "Course Director", 8 | "email": "adam@codeschool.com", 9 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/12/thumb_0F3A2595.jpg" 10 | } 11 | }, 12 | { 13 | "model": "www.person", 14 | "pk": 2, 15 | "fields": { 16 | "name": "Adam Rensel", 17 | "title": "Developer", 18 | "email": "adamrensel@codeschool.com", 19 | "image": "https://gravatar.com/avatar/22fcded03f843134d3a7a9f1aa77cae8.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 20 | } 21 | }, 22 | { 23 | "model": "www.person", 24 | "pk": 3, 25 | "fields": { 26 | "name": "Ann Grafelman", 27 | "title": "Designer", 28 | "email": "ann@codeschool.com", 29 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/15/thumb_0F3A0961.jpg" 30 | } 31 | }, 32 | { 33 | "model": "www.person", 34 | "pk": 4, 35 | "fields": { 36 | "name": "Ashley Emert", 37 | "title": "Copy Specialist", 38 | "email": "aemert@codeschool.com", 39 | "image": "https://gravatar.com/avatar/61f911ea6c84a013aba5a78715dbcb43.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 40 | } 41 | }, 42 | { 43 | "model": "www.person", 44 | "pk": 5, 45 | "fields": { 46 | "name": "Ashley Smith", 47 | "title": "Chief Operating Officer", 48 | "email": "ashley@codeschool.com", 49 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/8/thumb_stock-photo-120972687.jpg" 50 | } 51 | }, 52 | { 53 | "model": "www.person", 54 | "pk": 6, 55 | "fields": { 56 | "name": "Bijan Boustani", 57 | "title": "Developer", 58 | "email": "bijan@codeschool.com", 59 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/18/thumb_0F3A3143.jpg" 60 | } 61 | }, 62 | { 63 | "model": "www.person", 64 | "pk": 7, 65 | "fields": { 66 | "name": "Brittany Luttrell", 67 | "title": "Team Support Specialist", 68 | "email": "brittany@codeschool.com", 69 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/42/thumb_0F3A2688.jpg" 70 | } 71 | }, 72 | { 73 | "model": "www.person", 74 | "pk": 8, 75 | "fields": { 76 | "name": "Brittany Stephens", 77 | "title": "Administrative Assistant", 78 | "email": "bstephens@codeschool.com", 79 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/60/thumb_image1__1_.jpg" 80 | } 81 | }, 82 | { 83 | "model": "www.person", 84 | "pk": 9, 85 | "fields": { 86 | "name": "Carlos Souza", 87 | "title": "Content Author", 88 | "email": "carlos@codeschool.com", 89 | "image": "https://gravatar.com/avatar/98555e0e6bd0003a02a022e98fece10c.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 90 | } 91 | }, 92 | { 93 | "model": "www.person", 94 | "pk": 10, 95 | "fields": { 96 | "name": "Cher Cloude", 97 | "title": "Designer", 98 | "email": "cher@codeschool.com", 99 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/50/thumb_0F3A0895.jpg" 100 | } 101 | }, 102 | { 103 | "model": "www.person", 104 | "pk": 11, 105 | "fields": { 106 | "name": "Christine Wong", 107 | "title": "Office Manager", 108 | "email": "christine@codeschool.com", 109 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/22/thumb_0F3A4859.jpg" 110 | } 111 | }, 112 | { 113 | "model": "www.person", 114 | "pk": 12, 115 | "fields": { 116 | "name": "Corey Rabazinski", 117 | "title": "Marketing Manager", 118 | "email": "corey@codeschool.com", 119 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/36/thumb_0F3A5210.jpg" 120 | } 121 | }, 122 | { 123 | "model": "www.person", 124 | "pk": 13, 125 | "fields": { 126 | "name": "Dan Bickford", 127 | "title": "Developer", 128 | "email": "dbickford@codeschool.com", 129 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/16/thumb_stock-photo-120973757.jpg" 130 | } 131 | }, 132 | { 133 | "model": "www.person", 134 | "pk": 14, 135 | "fields": { 136 | "name": "Dan Denney", 137 | "title": "Front-end Developer", 138 | "email": "dand@codeschool.com", 139 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/3/thumb_0F3A2027.jpg" 140 | } 141 | }, 142 | { 143 | "model": "www.person", 144 | "pk": 15, 145 | "fields": { 146 | "name": "Drew Barontini", 147 | "title": "Front-end Director", 148 | "email": "drew@codeschool.com", 149 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/2/thumb_0F3A2449.jpg" 150 | } 151 | }, 152 | { 153 | "model": "www.person", 154 | "pk": 16, 155 | "fields": { 156 | "name": "Eric Fisher", 157 | "title": "Content Author", 158 | "email": "eric@codeschool.com", 159 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/57/thumb_0F3A4841.jpg" 160 | } 161 | }, 162 | { 163 | "model": "www.person", 164 | "pk": 17, 165 | "fields": { 166 | "name": "Hampton Paulk", 167 | "title": "Senior Content Producer", 168 | "email": "hampton@codeschool.com", 169 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/61/thumb_Paulk__Hampton_-_ID_Photo.jpg" 170 | } 171 | }, 172 | { 173 | "model": "www.person", 174 | "pk": 18, 175 | "fields": { 176 | "name": "Hemarie Jones", 177 | "title": "Marketing Project Manager", 178 | "email": "hemarie@codeschool.com", 179 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/49/thumb_DSC02799.jpg" 180 | } 181 | }, 182 | { 183 | "model": "www.person", 184 | "pk": 19, 185 | "fields": { 186 | "name": "Joel Taylor", 187 | "title": "Developer", 188 | "email": "joel@codeschool.com", 189 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/13/thumb_0F3A2389.jpg" 190 | } 191 | }, 192 | { 193 | "model": "www.person", 194 | "pk": 20, 195 | "fields": { 196 | "name": "John Jameson", 197 | "title": "Front-end Developer", 198 | "email": "jdj@codeschool.com", 199 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/4/thumb_0F3A1073.jpg" 200 | } 201 | }, 202 | { 203 | "model": "www.person", 204 | "pk": 21, 205 | "fields": { 206 | "name": "Jon Friskics", 207 | "title": "Content Director", 208 | "email": "jon@codeschool.com", 209 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/11/thumb_0F3A1350.jpg" 210 | } 211 | }, 212 | { 213 | "model": "www.person", 214 | "pk": 22, 215 | "fields": { 216 | "name": "Jordan Wade", 217 | "title": "Front-end Developer", 218 | "email": "jordan@codeschool.com", 219 | "image": "https://gravatar.com/avatar/1cb639db981178753e10a8ba150831ba.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 220 | } 221 | }, 222 | { 223 | "model": "www.person", 224 | "pk": 23, 225 | "fields": { 226 | "name": "Joseph Perez", 227 | "title": "Support Director", 228 | "email": "joseph@codeschool.com", 229 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/29/thumb_stock-photo-120972857.jpg" 230 | } 231 | }, 232 | { 233 | "model": "www.person", 234 | "pk": 24, 235 | "fields": { 236 | "name": "Justin Mezzell", 237 | "title": "Art Director", 238 | "email": "justin@codeschool.com", 239 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/47/thumb_stock-photo-120972601.jpg" 240 | } 241 | }, 242 | { 243 | "model": "www.person", 244 | "pk": 25, 245 | "fields": { 246 | "name": "Katie Delfin", 247 | "title": "Developer", 248 | "email": "katie@codeschool.com", 249 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/10/thumb_DSC04476.jpg" 250 | } 251 | }, 252 | { 253 | "model": "www.person", 254 | "pk": 26, 255 | "fields": { 256 | "name": "Matt Adams", 257 | "title": "Data Analyst", 258 | "email": "matt@codeschool.com", 259 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/17/thumb_0F3A2759.jpg" 260 | } 261 | }, 262 | { 263 | "model": "www.person", 264 | "pk": 27, 265 | "fields": { 266 | "name": "Morgan Laco", 267 | "title": "Developer", 268 | "email": "morgan@codeschool.com", 269 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/32/thumb_stock-photo-120973569.jpg" 270 | } 271 | }, 272 | { 273 | "model": "www.person", 274 | "pk": 28, 275 | "fields": { 276 | "name": "Neela Balkaran", 277 | "title": "Developer", 278 | "email": "neela@codeschool.com", 279 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/52/thumb_0F3A4960-2.jpg" 280 | } 281 | }, 282 | { 283 | "model": "www.person", 284 | "pk": 29, 285 | "fields": { 286 | "name": "Nicholas Roberts", 287 | "title": "Marketing Coordinator", 288 | "email": "nroberts@codeschool.com", 289 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/45/thumb_stock-photo-120972445.jpg" 290 | } 291 | }, 292 | { 293 | "model": "www.person", 294 | "pk": 30, 295 | "fields": { 296 | "name": "Nick Wronski", 297 | "title": "Developer", 298 | "email": "nwronski@codeschool.com", 299 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/21/thumb_0F3A1467.jpg" 300 | } 301 | }, 302 | { 303 | "model": "www.person", 304 | "pk": 31, 305 | "fields": { 306 | "name": "Oliver Tosh", 307 | "title": "Media Production Specialist", 308 | "email": "oliver@codeschool.com", 309 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/58/thumb_DSC03641.jpg" 310 | } 311 | }, 312 | { 313 | "model": "www.person", 314 | "pk": 32, 315 | "fields": { 316 | "name": "Olivia Howard", 317 | "title": "Designer", 318 | "email": "olivia@codeschool.com", 319 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/54/thumb_0F3A0866.jpg" 320 | } 321 | }, 322 | { 323 | "model": "www.person", 324 | "pk": 33, 325 | "fields": { 326 | "name": "Olivier Lacan", 327 | "title": "Developer", 328 | "email": "olivier@codeschool.com", 329 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/7/thumb_stock-photo-120973397.jpg" 330 | } 331 | }, 332 | { 333 | "model": "www.person", 334 | "pk": 34, 335 | "fields": { 336 | "name": "Robert Babcock", 337 | "title": "Technical Support Specialist", 338 | "email": "robert@codeschool.com", 339 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/55/thumb_0F3A5043.jpg" 340 | } 341 | }, 342 | { 343 | "model": "www.person", 344 | "pk": 35, 345 | "fields": { 346 | "name": "Russell Centanni", 347 | "title": "Developer", 348 | "email": "russell@codeschool.com", 349 | "image": "https://gravatar.com/avatar/7e5d8169c63398f1146018b7eb83342b.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 350 | } 351 | }, 352 | { 353 | "model": "www.person", 354 | "pk": 36, 355 | "fields": { 356 | "name": "Samantha Anastasia", 357 | "title": "Senior Project Manager", 358 | "email": "samantha@codeschool.com", 359 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/23/thumb_stock-photo-120972669.jpg" 360 | } 361 | }, 362 | { 363 | "model": "www.person", 364 | "pk": 37, 365 | "fields": { 366 | "name": "Sarah Doss", 367 | "title": "HR/Culture Coordinator", 368 | "email": "sarahdoss@codeschool.com", 369 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/62/thumb_stock-photo-120973719.jpg" 370 | } 371 | }, 372 | { 373 | "model": "www.person", 374 | "pk": 38, 375 | "fields": { 376 | "name": "Sarah Holderness", 377 | "title": "Content Author", 378 | "email": "sholderness@codeschool.com", 379 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/59/thumb_DSC02617.jpg" 380 | } 381 | }, 382 | { 383 | "model": "www.person", 384 | "pk": 39, 385 | "fields": { 386 | "name": "Sarah Imbert", 387 | "title": "Project Manager", 388 | "email": "sarah@codeschool.com", 389 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/25/thumb_WorkPics-2-min.png" 390 | } 391 | }, 392 | { 393 | "model": "www.person", 394 | "pk": 40, 395 | "fields": { 396 | "name": "Sergio Cruz", 397 | "title": "Developer", 398 | "email": "sergio@codeschool.com", 399 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/31/thumb_0F3A4898.jpg" 400 | } 401 | }, 402 | { 403 | "model": "www.person", 404 | "pk": 41, 405 | "fields": { 406 | "name": "Stefan Nychka", 407 | "title": "Technical Support Specialist", 408 | "email": "stefan@codeschool.com", 409 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/37/thumb_0F3A9671.jpg" 410 | } 411 | }, 412 | { 413 | "model": "www.person", 414 | "pk": 42, 415 | "fields": { 416 | "name": "Thomas Meeks", 417 | "title": "Internal Development Director", 418 | "email": "thomas@codeschool.com", 419 | "image": "https://gravatar.com/avatar/ae9c8f8d1e702bd3ed7aafc92195ed0d.png?s=220&d=https%3A%2F%2Fcourseware.codeschool.com.s3.amazonaws.com%2Fassets%2Fdirectory%2Fdefault-avatar.png" 420 | } 421 | }, 422 | { 423 | "model": "www.person", 424 | "pk": 43, 425 | "fields": { 426 | "name": "Zach Cowart", 427 | "title": "Customer Support Specialist", 428 | "email": "zach@codeschool.com", 429 | "image": "https://codeschool-directory.s3.amazonaws.com/uploads/member/portrait/30/thumb_0F3A7382.jpg" 430 | } 431 | } 432 | ] -------------------------------------------------------------------------------- /Directory/www/migrations/0001_initial.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | # Generated by Django 1.9.8 on 2016-07-19 14:54 3 | from __future__ import unicode_literals 4 | 5 | from django.db import migrations, models 6 | 7 | 8 | class Migration(migrations.Migration): 9 | 10 | initial = True 11 | 12 | dependencies = [ 13 | ] 14 | 15 | operations = [ 16 | migrations.CreateModel( 17 | name='Person', 18 | fields=[ 19 | ('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')), 20 | ('name', models.CharField(max_length=40)), 21 | ('email', models.CharField(max_length=100)), 22 | ('title', models.CharField(max_length=100)), 23 | ('image', models.CharField(max_length=200)), 24 | ], 25 | ), 26 | ] 27 | -------------------------------------------------------------------------------- /Directory/www/migrations/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/codeschool/WatchUsBuild-TeamDirectoryAppWithDjango/ba2a031e590b745a270dd9b0c98baaea86c0d102/Directory/www/migrations/__init__.py -------------------------------------------------------------------------------- /Directory/www/models.py: -------------------------------------------------------------------------------- 1 | from django.db import models 2 | 3 | # Create your models here. 4 | class Person(models.Model): 5 | name = models.CharField(max_length=40) 6 | email = models.CharField(max_length=100) 7 | title = models.CharField(max_length=100) 8 | image = models.CharField(max_length=200) 9 | 10 | def __str__(self): 11 | return self.name 12 | -------------------------------------------------------------------------------- /Directory/www/static/main.css: -------------------------------------------------------------------------------- 1 | /* main.css */ 2 | 3 | body { 4 | background-color: #ddd; 5 | font-size: 16px; 6 | padding: 0; 7 | margin: 0; 8 | } 9 | 10 | main { 11 | padding: 0; 12 | margin: 0 auto; 13 | } 14 | 15 | section { 16 | padding: 0; 17 | margin: 0; 18 | min-width: 300px; 19 | border-radius: 3px; 20 | background-color: white; 21 | text-align: center; 22 | display: inline-block; 23 | margin: 0 10px 10px 10px; 24 | } 25 | 26 | img { 27 | border-radius: 80px; 28 | width: 50%; 29 | } 30 | 31 | h2 { 32 | font-size: 1.7em; 33 | font-weight: bold; 34 | padding: 0; 35 | margin: 0; 36 | } 37 | 38 | .person-title { 39 | font-size: 1em; 40 | color: #aaa; 41 | margin: 0; 42 | padding: 0; 43 | } 44 | 45 | .person-email { 46 | font-size: 1em; 47 | margin: 0; 48 | padding: 0; 49 | } -------------------------------------------------------------------------------- /Directory/www/static/normalize.css: -------------------------------------------------------------------------------- 1 | /*! normalize.css v4.1.1 | MIT License | github.com/necolas/normalize.css */ 2 | 3 | /** 4 | * 1. Change the default font family in all browsers (opinionated). 5 | * 2. Prevent adjustments of font size after orientation changes in IE and iOS. 6 | */ 7 | 8 | html { 9 | font-family: sans-serif; /* 1 */ 10 | -ms-text-size-adjust: 100%; /* 2 */ 11 | -webkit-text-size-adjust: 100%; /* 2 */ 12 | } 13 | 14 | /** 15 | * Remove the margin in all browsers (opinionated). 16 | */ 17 | 18 | body { 19 | margin: 0; 20 | } 21 | 22 | /* HTML5 display definitions 23 | ========================================================================== */ 24 | 25 | /** 26 | * Add the correct display in IE 9-. 27 | * 1. Add the correct display in Edge, IE, and Firefox. 28 | * 2. Add the correct display in IE. 29 | */ 30 | 31 | article, 32 | aside, 33 | details, /* 1 */ 34 | figcaption, 35 | figure, 36 | footer, 37 | header, 38 | main, /* 2 */ 39 | menu, 40 | nav, 41 | section, 42 | summary { /* 1 */ 43 | display: block; 44 | } 45 | 46 | /** 47 | * Add the correct display in IE 9-. 48 | */ 49 | 50 | audio, 51 | canvas, 52 | progress, 53 | video { 54 | display: inline-block; 55 | } 56 | 57 | /** 58 | * Add the correct display in iOS 4-7. 59 | */ 60 | 61 | audio:not([controls]) { 62 | display: none; 63 | height: 0; 64 | } 65 | 66 | /** 67 | * Add the correct vertical alignment in Chrome, Firefox, and Opera. 68 | */ 69 | 70 | progress { 71 | vertical-align: baseline; 72 | } 73 | 74 | /** 75 | * Add the correct display in IE 10-. 76 | * 1. Add the correct display in IE. 77 | */ 78 | 79 | template, /* 1 */ 80 | [hidden] { 81 | display: none; 82 | } 83 | 84 | /* Links 85 | ========================================================================== */ 86 | 87 | /** 88 | * 1. Remove the gray background on active links in IE 10. 89 | * 2. Remove gaps in links underline in iOS 8+ and Safari 8+. 90 | */ 91 | 92 | a { 93 | background-color: transparent; /* 1 */ 94 | -webkit-text-decoration-skip: objects; /* 2 */ 95 | } 96 | 97 | /** 98 | * Remove the outline on focused links when they are also active or hovered 99 | * in all browsers (opinionated). 100 | */ 101 | 102 | a:active, 103 | a:hover { 104 | outline-width: 0; 105 | } 106 | 107 | /* Text-level semantics 108 | ========================================================================== */ 109 | 110 | /** 111 | * 1. Remove the bottom border in Firefox 39-. 112 | * 2. Add the correct text decoration in Chrome, Edge, IE, Opera, and Safari. 113 | */ 114 | 115 | abbr[title] { 116 | border-bottom: none; /* 1 */ 117 | text-decoration: underline; /* 2 */ 118 | text-decoration: underline dotted; /* 2 */ 119 | } 120 | 121 | /** 122 | * Prevent the duplicate application of `bolder` by the next rule in Safari 6. 123 | */ 124 | 125 | b, 126 | strong { 127 | font-weight: inherit; 128 | } 129 | 130 | /** 131 | * Add the correct font weight in Chrome, Edge, and Safari. 132 | */ 133 | 134 | b, 135 | strong { 136 | font-weight: bolder; 137 | } 138 | 139 | /** 140 | * Add the correct font style in Android 4.3-. 141 | */ 142 | 143 | dfn { 144 | font-style: italic; 145 | } 146 | 147 | /** 148 | * Correct the font size and margin on `h1` elements within `section` and 149 | * `article` contexts in Chrome, Firefox, and Safari. 150 | */ 151 | 152 | h1 { 153 | font-size: 2em; 154 | margin: 0.67em 0; 155 | } 156 | 157 | /** 158 | * Add the correct background and color in IE 9-. 159 | */ 160 | 161 | mark { 162 | background-color: #ff0; 163 | color: #000; 164 | } 165 | 166 | /** 167 | * Add the correct font size in all browsers. 168 | */ 169 | 170 | small { 171 | font-size: 80%; 172 | } 173 | 174 | /** 175 | * Prevent `sub` and `sup` elements from affecting the line height in 176 | * all browsers. 177 | */ 178 | 179 | sub, 180 | sup { 181 | font-size: 75%; 182 | line-height: 0; 183 | position: relative; 184 | vertical-align: baseline; 185 | } 186 | 187 | sub { 188 | bottom: -0.25em; 189 | } 190 | 191 | sup { 192 | top: -0.5em; 193 | } 194 | 195 | /* Embedded content 196 | ========================================================================== */ 197 | 198 | /** 199 | * Remove the border on images inside links in IE 10-. 200 | */ 201 | 202 | img { 203 | border-style: none; 204 | } 205 | 206 | /** 207 | * Hide the overflow in IE. 208 | */ 209 | 210 | svg:not(:root) { 211 | overflow: hidden; 212 | } 213 | 214 | /* Grouping content 215 | ========================================================================== */ 216 | 217 | /** 218 | * 1. Correct the inheritance and scaling of font size in all browsers. 219 | * 2. Correct the odd `em` font sizing in all browsers. 220 | */ 221 | 222 | code, 223 | kbd, 224 | pre, 225 | samp { 226 | font-family: monospace, monospace; /* 1 */ 227 | font-size: 1em; /* 2 */ 228 | } 229 | 230 | /** 231 | * Add the correct margin in IE 8. 232 | */ 233 | 234 | figure { 235 | margin: 1em 40px; 236 | } 237 | 238 | /** 239 | * 1. Add the correct box sizing in Firefox. 240 | * 2. Show the overflow in Edge and IE. 241 | */ 242 | 243 | hr { 244 | box-sizing: content-box; /* 1 */ 245 | height: 0; /* 1 */ 246 | overflow: visible; /* 2 */ 247 | } 248 | 249 | /* Forms 250 | ========================================================================== */ 251 | 252 | /** 253 | * 1. Change font properties to `inherit` in all browsers (opinionated). 254 | * 2. Remove the margin in Firefox and Safari. 255 | */ 256 | 257 | button, 258 | input, 259 | select, 260 | textarea { 261 | font: inherit; /* 1 */ 262 | margin: 0; /* 2 */ 263 | } 264 | 265 | /** 266 | * Restore the font weight unset by the previous rule. 267 | */ 268 | 269 | optgroup { 270 | font-weight: bold; 271 | } 272 | 273 | /** 274 | * Show the overflow in IE. 275 | * 1. Show the overflow in Edge. 276 | */ 277 | 278 | button, 279 | input { /* 1 */ 280 | overflow: visible; 281 | } 282 | 283 | /** 284 | * Remove the inheritance of text transform in Edge, Firefox, and IE. 285 | * 1. Remove the inheritance of text transform in Firefox. 286 | */ 287 | 288 | button, 289 | select { /* 1 */ 290 | text-transform: none; 291 | } 292 | 293 | /** 294 | * 1. Prevent a WebKit bug where (2) destroys native `audio` and `video` 295 | * controls in Android 4. 296 | * 2. Correct the inability to style clickable types in iOS and Safari. 297 | */ 298 | 299 | button, 300 | html [type="button"], /* 1 */ 301 | [type="reset"], 302 | [type="submit"] { 303 | -webkit-appearance: button; /* 2 */ 304 | } 305 | 306 | /** 307 | * Remove the inner border and padding in Firefox. 308 | */ 309 | 310 | button::-moz-focus-inner, 311 | [type="button"]::-moz-focus-inner, 312 | [type="reset"]::-moz-focus-inner, 313 | [type="submit"]::-moz-focus-inner { 314 | border-style: none; 315 | padding: 0; 316 | } 317 | 318 | /** 319 | * Restore the focus styles unset by the previous rule. 320 | */ 321 | 322 | button:-moz-focusring, 323 | [type="button"]:-moz-focusring, 324 | [type="reset"]:-moz-focusring, 325 | [type="submit"]:-moz-focusring { 326 | outline: 1px dotted ButtonText; 327 | } 328 | 329 | /** 330 | * Change the border, margin, and padding in all browsers (opinionated). 331 | */ 332 | 333 | fieldset { 334 | border: 1px solid #c0c0c0; 335 | margin: 0 2px; 336 | padding: 0.35em 0.625em 0.75em; 337 | } 338 | 339 | /** 340 | * 1. Correct the text wrapping in Edge and IE. 341 | * 2. Correct the color inheritance from `fieldset` elements in IE. 342 | * 3. Remove the padding so developers are not caught out when they zero out 343 | * `fieldset` elements in all browsers. 344 | */ 345 | 346 | legend { 347 | box-sizing: border-box; /* 1 */ 348 | color: inherit; /* 2 */ 349 | display: table; /* 1 */ 350 | max-width: 100%; /* 1 */ 351 | padding: 0; /* 3 */ 352 | white-space: normal; /* 1 */ 353 | } 354 | 355 | /** 356 | * Remove the default vertical scrollbar in IE. 357 | */ 358 | 359 | textarea { 360 | overflow: auto; 361 | } 362 | 363 | /** 364 | * 1. Add the correct box sizing in IE 10-. 365 | * 2. Remove the padding in IE 10-. 366 | */ 367 | 368 | [type="checkbox"], 369 | [type="radio"] { 370 | box-sizing: border-box; /* 1 */ 371 | padding: 0; /* 2 */ 372 | } 373 | 374 | /** 375 | * Correct the cursor style of increment and decrement buttons in Chrome. 376 | */ 377 | 378 | [type="number"]::-webkit-inner-spin-button, 379 | [type="number"]::-webkit-outer-spin-button { 380 | height: auto; 381 | } 382 | 383 | /** 384 | * 1. Correct the odd appearance in Chrome and Safari. 385 | * 2. Correct the outline style in Safari. 386 | */ 387 | 388 | [type="search"] { 389 | -webkit-appearance: textfield; /* 1 */ 390 | outline-offset: -2px; /* 2 */ 391 | } 392 | 393 | /** 394 | * Remove the inner padding and cancel buttons in Chrome and Safari on OS X. 395 | */ 396 | 397 | [type="search"]::-webkit-search-cancel-button, 398 | [type="search"]::-webkit-search-decoration { 399 | -webkit-appearance: none; 400 | } 401 | 402 | /** 403 | * Correct the text style of placeholders in Chrome, Edge, and Safari. 404 | */ 405 | 406 | ::-webkit-input-placeholder { 407 | color: inherit; 408 | opacity: 0.54; 409 | } 410 | 411 | /** 412 | * 1. Correct the inability to style clickable types in iOS and Safari. 413 | * 2. Change font properties to `inherit` in Safari. 414 | */ 415 | 416 | ::-webkit-file-upload-button { 417 | -webkit-appearance: button; /* 1 */ 418 | font: inherit; /* 2 */ 419 | } -------------------------------------------------------------------------------- /Directory/www/templates/index.html: -------------------------------------------------------------------------------- 1 | {% load staticfiles %} 2 | 3 | 4 | 5 |
6 |{{ person.title }}
18 |{{ person.email }}
19 |