├── conf ├── gunicorn.conf ├── nginx.conf ├── pg_hba.conf ├── postgresql_8.4.conf └── supervisord.conf ├── fabconfig.yaml ├── fabfile.py ├── requirements.txt ├── sample_project ├── __init__.py ├── manage.py ├── settings.py └── urls.py └── static ├── css ├── homepage.css ├── newsletterPrefs.css ├── pack.css ├── styles(1).css ├── styles(2).css ├── styles.css └── twittertool.css ├── img ├── 092117_TStyle_163x90.gif ├── 11-0220_AudienceDev_120x90_gluten.jpg ├── 17-CORNER-thumbStandard.jpg ├── 17focus-slideshow-slide-2OXD-thumbStandard.jpg ├── 17living_span-thumbStandard.jpg ├── 21moth-vikram-moth.jpg ├── 21moth_artofsummer-moth.jpg ├── 21moth_location-moth.jpg ├── 21moth_river-moth.jpg ├── 21moth_townies-moth.jpg ├── 21playhouses-span-thumbStandard.jpg ├── 22shuttle-c-hpLarge.jpg ├── 3.12.11-515_logo78x36.jpg ├── 3.12.11-515e72-dining_room72.gif ├── 60ed6cffQ2FQ5CRDQ2FQ2FQ5BF1R)Q27gl5LLQ2B5ZQ3AYF)L ├── Amish-thumbStandard.jpg ├── KN_Briefcase_88x31.gif ├── Kristof_New-thumbStandard-v2.jpg ├── POGUE-thumbStandard.jpg ├── arrow-right-3x5.gif ├── audio_icon.gif ├── bc_nytimesLogo.gif ├── blank.gif ├── cobrandHeader_315x20.gif ├── comment_icon(1).gif ├── comment_icon.gif ├── facebook(1).gif ├── facebook.gif ├── frontpage-75.gif ├── go.gif ├── jp-ROMNEY-thumbStandard.jpg ├── loading-grey-lines-circle-18.gif ├── lwrRite_0005_bnr4a_163x90_1.jpg ├── moth_forward.gif ├── moth_reverse_off.gif ├── none.png ├── nytimes.gif ├── nytlogo379x64.gif ├── pencil_00010_bnr6a.gif ├── recommendedFacebook.png ├── recommendedLogin.png ├── recommendedRegister.png ├── saved_resource ├── search_button40x19.gif ├── summer-thumbStandard.jpg ├── tmagazine_072111.jpg ├── twitter.gif ├── verticals_tmagazine.gif ├── video-bushwacker-videoThumb.jpg ├── video-caucus-071811-videoThumb.jpg ├── video-caucus-072011-videoThumb.jpg ├── video-spinaltap-videoThumb.jpg └── video_icon.gif └── js ├── 722219967.js ├── BrightcoveExperiences_all.js ├── NYTInlineEmbed.js ├── activities.build.js ├── all.js ├── beacon.js ├── bottom.js ├── chartbeat.js ├── cm8_detect_ad.js ├── controller_v1.1.js ├── embed3.js ├── gw.js ├── meter.js ├── mtr.js ├── pack.js ├── pack2.js ├── production.js ├── recommendationsModule.js ├── revenuescience.js ├── show_ads.js ├── sitewide.js ├── swfobject1.1.js ├── tabset.js ├── toolbar.build.min.js ├── top.js ├── trackingTags_v1.1.js ├── wtbase.js ├── wtid.js └── wtinit.js /conf/gunicorn.conf: -------------------------------------------------------------------------------- 1 | bind = "unix:%(path)s/sock/gunicorn.sock" 2 | pidfile = "%(path)s/pid/gunicorn.pid" 3 | logfile = "%(path)s/logs/gunicorn.log" 4 | 5 | daemon = False 6 | 7 | backlog = 1000 8 | workers = 2 -------------------------------------------------------------------------------- /conf/nginx.conf: -------------------------------------------------------------------------------- 1 | worker_processes 2; 2 | 3 | daemon off; 4 | pid %(path)s/pid/nginx.pid; 5 | 6 | events { 7 | worker_connections 1024; 8 | } 9 | 10 | http { 11 | include mime.types; 12 | default_type application/octet-stream; 13 | 14 | upstream gunicorn { 15 | server unix:%(path)s/sock/gunicorn.sock; 16 | } 17 | 18 | server { 19 | listen 8080; 20 | 21 | access_log %(path)s/logs/nginx_gunicorn_access.log; 22 | error_log %(path)s/logs/nginx_gunicorn_error.log; 23 | 24 | location / { 25 | keepalive_timeout 0; 26 | 27 | proxy_set_header X-Real-IP $remote_addr; 28 | proxy_set_header REMOTE_HOST $remote_addr; 29 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 30 | proxy_set_header X-FORWARDED-PROTOCOL $scheme; 31 | proxy_pass http://gunicorn; 32 | } 33 | } 34 | } -------------------------------------------------------------------------------- /conf/pg_hba.conf: -------------------------------------------------------------------------------- 1 | # Database administrative login by UNIX sockets 2 | local all postgres trust 3 | 4 | # TYPE DATABASE USER CIDR-ADDRESS METHOD 5 | 6 | # "local" is for Unix domain socket connections only 7 | local all all ident 8 | # IPv4 local connections: 9 | host all all 127.0.0.1/32 md5 10 | # IPv6 local connections: 11 | host all all ::1/128 md5 12 | host %(database_name)s %(database_user)s 0.0.0.0/0 md5 13 | -------------------------------------------------------------------------------- /conf/postgresql_8.4.conf: -------------------------------------------------------------------------------- 1 | # ----------------------------- 2 | # PostgreSQL configuration file 3 | # ----------------------------- 4 | # 5 | # This file consists of lines of the form: 6 | # 7 | # name = value 8 | # 9 | # (The "=" is optional.) Whitespace may be used. Comments are introduced with 10 | # "#" anywhere on a line. The complete list of parameter names and allowed 11 | # values can be found in the PostgreSQL documentation. 12 | # 13 | # The commented-out settings shown in this file represent the default values. 14 | # Re-commenting a setting is NOT sufficient to revert it to the default value; 15 | # you need to reload the server. 16 | # 17 | # This file is read on server startup and when the server receives a SIGHUP 18 | # signal. If you edit the file on a running system, you have to SIGHUP the 19 | # server for the changes to take effect, or use "pg_ctl reload". Some 20 | # parameters, which are marked below, require a server shutdown and restart to 21 | # take effect. 22 | # 23 | # Any parameter can also be given as a command-line option to the server, e.g., 24 | # "postgres -c log_connections=on". Some parameters can be changed at run time 25 | # with the "SET" SQL command. 26 | # 27 | # Memory units: kB = kilobytes Time units: ms = milliseconds 28 | # MB = megabytes s = seconds 29 | # GB = gigabytes min = minutes 30 | # h = hours 31 | # d = days 32 | 33 | 34 | #------------------------------------------------------------------------------ 35 | # FILE LOCATIONS 36 | #------------------------------------------------------------------------------ 37 | 38 | # The default values of these variables are driven from the -D command-line 39 | # option or PGDATA environment variable, represented here as ConfigDir. 40 | 41 | data_directory = '/var/lib/postgresql/8.4/main' # use data in another directory 42 | # (change requires restart) 43 | hba_file = '/etc/postgresql/8.4/main/pg_hba.conf' # host-based authentication file 44 | # (change requires restart) 45 | ident_file = '/etc/postgresql/8.4/main/pg_ident.conf' # ident configuration file 46 | # (change requires restart) 47 | 48 | # If external_pid_file is not explicitly set, no extra PID file is written. 49 | external_pid_file = '/var/run/postgresql/8.4-main.pid' # write an extra PID file 50 | # (change requires restart) 51 | 52 | 53 | #------------------------------------------------------------------------------ 54 | # CONNECTIONS AND AUTHENTICATION 55 | #------------------------------------------------------------------------------ 56 | 57 | # - Connection Settings - 58 | 59 | listen_addresses = '*' # what IP address(es) to listen on; 60 | # comma-separated list of addresses; 61 | # defaults to 'localhost', '*' = all 62 | # (change requires restart) 63 | port = 5432 # (change requires restart) 64 | max_connections = 100 # (change requires restart) 65 | # Note: Increasing max_connections costs ~400 bytes of shared memory per 66 | # connection slot, plus lock space (see max_locks_per_transaction). 67 | #superuser_reserved_connections = 3 # (change requires restart) 68 | unix_socket_directory = '/var/run/postgresql' # (change requires restart) 69 | #unix_socket_group = '' # (change requires restart) 70 | #unix_socket_permissions = 0777 # begin with 0 to use octal notation 71 | # (change requires restart) 72 | #bonjour_name = '' # defaults to the computer name 73 | # (change requires restart) 74 | 75 | # - Security and Authentication - 76 | 77 | #authentication_timeout = 1min # 1s-600s 78 | ssl = true # (change requires restart) 79 | #ssl_ciphers = 'ALL:!ADH:!LOW:!EXP:!MD5:@STRENGTH' # allowed SSL ciphers 80 | # (change requires restart) 81 | #ssl_renegotiation_limit = 512MB # amount of data between renegotiations 82 | #password_encryption = on 83 | #db_user_namespace = off 84 | 85 | # Kerberos and GSSAPI 86 | #krb_server_keyfile = '' 87 | #krb_srvname = 'postgres' # (Kerberos only) 88 | #krb_caseins_users = off 89 | 90 | # - TCP Keepalives - 91 | # see "man 7 tcp" for details 92 | 93 | #tcp_keepalives_idle = 0 # TCP_KEEPIDLE, in seconds; 94 | # 0 selects the system default 95 | #tcp_keepalives_interval = 0 # TCP_KEEPINTVL, in seconds; 96 | # 0 selects the system default 97 | #tcp_keepalives_count = 0 # TCP_KEEPCNT; 98 | # 0 selects the system default 99 | 100 | 101 | #------------------------------------------------------------------------------ 102 | # RESOURCE USAGE (except WAL) 103 | #------------------------------------------------------------------------------ 104 | 105 | # - Memory - 106 | 107 | shared_buffers = 24MB # min 128kB 108 | # (change requires restart) 109 | #temp_buffers = 8MB # min 800kB 110 | #max_prepared_transactions = 0 # zero disables the feature 111 | # (change requires restart) 112 | # Note: Increasing max_prepared_transactions costs ~600 bytes of shared memory 113 | # per transaction slot, plus lock space (see max_locks_per_transaction). 114 | # It is not advisable to set max_prepared_transactions nonzero unless you 115 | # actively intend to use prepared transactions. 116 | #work_mem = 1MB # min 64kB 117 | #maintenance_work_mem = 16MB # min 1MB 118 | #max_stack_depth = 2MB # min 100kB 119 | 120 | # - Kernel Resource Usage - 121 | 122 | #max_files_per_process = 1000 # min 25 123 | # (change requires restart) 124 | #shared_preload_libraries = '' # (change requires restart) 125 | 126 | # - Cost-Based Vacuum Delay - 127 | 128 | #vacuum_cost_delay = 0ms # 0-100 milliseconds 129 | #vacuum_cost_page_hit = 1 # 0-10000 credits 130 | #vacuum_cost_page_miss = 10 # 0-10000 credits 131 | #vacuum_cost_page_dirty = 20 # 0-10000 credits 132 | #vacuum_cost_limit = 200 # 1-10000 credits 133 | 134 | # - Background Writer - 135 | 136 | #bgwriter_delay = 200ms # 10-10000ms between rounds 137 | #bgwriter_lru_maxpages = 100 # 0-1000 max buffers written/round 138 | #bgwriter_lru_multiplier = 2.0 # 0-10.0 multipler on buffers scanned/round 139 | 140 | # - Asynchronous Behavior - 141 | 142 | #effective_io_concurrency = 1 # 1-1000. 0 disables prefetching 143 | 144 | 145 | #------------------------------------------------------------------------------ 146 | # WRITE AHEAD LOG 147 | #------------------------------------------------------------------------------ 148 | 149 | # - Settings - 150 | 151 | #fsync = on # turns forced synchronization on or off 152 | #synchronous_commit = on # immediate fsync at commit 153 | #wal_sync_method = fsync # the default is the first option 154 | # supported by the operating system: 155 | # open_datasync 156 | # fdatasync (default on Linux) 157 | # fsync 158 | # fsync_writethrough 159 | # open_sync 160 | #full_page_writes = on # recover from partial page writes 161 | #wal_buffers = 64kB # min 32kB 162 | # (change requires restart) 163 | #wal_writer_delay = 200ms # 1-10000 milliseconds 164 | 165 | #commit_delay = 0 # range 0-100000, in microseconds 166 | #commit_siblings = 5 # range 1-1000 167 | 168 | # - Checkpoints - 169 | 170 | #checkpoint_segments = 3 # in logfile segments, min 1, 16MB each 171 | #checkpoint_timeout = 5min # range 30s-1h 172 | #checkpoint_completion_target = 0.5 # checkpoint target duration, 0.0 - 1.0 173 | #checkpoint_warning = 30s # 0 disables 174 | 175 | # - Archiving - 176 | 177 | #archive_mode = off # allows archiving to be done 178 | # (change requires restart) 179 | #archive_command = '' # command to use to archive a logfile segment 180 | #archive_timeout = 0 # force a logfile segment switch after this 181 | # number of seconds; 0 disables 182 | 183 | 184 | #------------------------------------------------------------------------------ 185 | # QUERY TUNING 186 | #------------------------------------------------------------------------------ 187 | 188 | # - Planner Method Configuration - 189 | 190 | #enable_bitmapscan = on 191 | #enable_hashagg = on 192 | #enable_hashjoin = on 193 | #enable_indexscan = on 194 | #enable_mergejoin = on 195 | #enable_nestloop = on 196 | #enable_seqscan = on 197 | #enable_sort = on 198 | #enable_tidscan = on 199 | 200 | # - Planner Cost Constants - 201 | 202 | #seq_page_cost = 1.0 # measured on an arbitrary scale 203 | #random_page_cost = 4.0 # same scale as above 204 | #cpu_tuple_cost = 0.01 # same scale as above 205 | #cpu_index_tuple_cost = 0.005 # same scale as above 206 | #cpu_operator_cost = 0.0025 # same scale as above 207 | #effective_cache_size = 128MB 208 | 209 | # - Genetic Query Optimizer - 210 | 211 | #geqo = on 212 | #geqo_threshold = 12 213 | #geqo_effort = 5 # range 1-10 214 | #geqo_pool_size = 0 # selects default based on effort 215 | #geqo_generations = 0 # selects default based on effort 216 | #geqo_selection_bias = 2.0 # range 1.5-2.0 217 | 218 | # - Other Planner Options - 219 | 220 | #default_statistics_target = 100 # range 1-10000 221 | #constraint_exclusion = partition # on, off, or partition 222 | #cursor_tuple_fraction = 0.1 # range 0.0-1.0 223 | #from_collapse_limit = 8 224 | #join_collapse_limit = 8 # 1 disables collapsing of explicit 225 | # JOIN clauses 226 | 227 | 228 | #------------------------------------------------------------------------------ 229 | # ERROR REPORTING AND LOGGING 230 | #------------------------------------------------------------------------------ 231 | 232 | # - Where to Log - 233 | 234 | #log_destination = 'stderr' # Valid values are combinations of 235 | # stderr, csvlog, syslog and eventlog, 236 | # depending on platform. csvlog 237 | # requires logging_collector to be on. 238 | 239 | # This is used when logging to stderr: 240 | #logging_collector = off # Enable capturing of stderr and csvlog 241 | # into log files. Required to be on for 242 | # csvlogs. 243 | # (change requires restart) 244 | 245 | # These are only used if logging_collector is on: 246 | #log_directory = 'pg_log' # directory where log files are written, 247 | # can be absolute or relative to PGDATA 248 | #log_filename = 'postgresql-%%Y-%%m-%%d_%%H%%M%%S.log' # log file name pattern, 249 | # can include strftime() escapes 250 | #log_truncate_on_rotation = off # If on, an existing log file of the 251 | # same name as the new log file will be 252 | # truncated rather than appended to. 253 | # But such truncation only occurs on 254 | # time-driven rotation, not on restarts 255 | # or size-driven rotation. Default is 256 | # off, meaning append to existing files 257 | # in all cases. 258 | #log_rotation_age = 1d # Automatic rotation of logfiles will 259 | # happen after that time. 0 disables. 260 | #log_rotation_size = 10MB # Automatic rotation of logfiles will 261 | # happen after that much log output. 262 | # 0 disables. 263 | 264 | # These are relevant when logging to syslog: 265 | #syslog_facility = 'LOCAL0' 266 | #syslog_ident = 'postgres' 267 | 268 | #silent_mode = off # Run server silently. 269 | # DO NOT USE without syslog or 270 | # logging_collector 271 | # (change requires restart) 272 | 273 | 274 | # - When to Log - 275 | 276 | #client_min_messages = notice # values in order of decreasing detail: 277 | # debug5 278 | # debug4 279 | # debug3 280 | # debug2 281 | # debug1 282 | # log 283 | # notice 284 | # warning 285 | # error 286 | 287 | #log_min_messages = warning # values in order of decreasing detail: 288 | # debug5 289 | # debug4 290 | # debug3 291 | # debug2 292 | # debug1 293 | # info 294 | # notice 295 | # warning 296 | # error 297 | # log 298 | # fatal 299 | # panic 300 | 301 | #log_error_verbosity = default # terse, default, or verbose messages 302 | 303 | #log_min_error_statement = error # values in order of decreasing detail: 304 | # debug5 305 | # debug4 306 | # debug3 307 | # debug2 308 | # debug1 309 | # info 310 | # notice 311 | # warning 312 | # error 313 | # log 314 | # fatal 315 | # panic (effectively off) 316 | 317 | #log_min_duration_statement = -1 # -1 is disabled, 0 logs all statements 318 | # and their durations, > 0 logs only 319 | # statements running at least this number 320 | # of milliseconds 321 | 322 | 323 | # - What to Log - 324 | 325 | #debug_print_parse = off 326 | #debug_print_rewritten = off 327 | #debug_print_plan = off 328 | #debug_pretty_print = on 329 | #log_checkpoints = off 330 | #log_connections = off 331 | #log_disconnections = off 332 | #log_duration = off 333 | #log_hostname = off 334 | log_line_prefix = '%%t ' # special values: 335 | # %%u = user name 336 | # %%d = database name 337 | # %%r = remote host and port 338 | # %%h = remote host 339 | # %%p = process ID 340 | # %%t = timestamp without milliseconds 341 | # %%m = timestamp with milliseconds 342 | # %%i = command tag 343 | # %%c = session ID 344 | # %%l = session line number 345 | # %%s = session start timestamp 346 | # %%v = virtual transaction ID 347 | # %%x = transaction ID (0 if none) 348 | # %%q = stop here in non-session 349 | # processes 350 | # %%%% = '%%' 351 | # e.g. '<%%u%%%%%%d> ' 352 | #log_lock_waits = off # log lock waits >= deadlock_timeout 353 | #log_statement = 'none' # none, ddl, mod, all 354 | #log_temp_files = -1 # log temporary files equal or larger 355 | # than the specified size in kilobytes; 356 | # -1 disables, 0 logs all temp files 357 | #log_timezone = unknown # actually, defaults to TZ environment 358 | # setting 359 | 360 | 361 | #------------------------------------------------------------------------------ 362 | # RUNTIME STATISTICS 363 | #------------------------------------------------------------------------------ 364 | 365 | # - Query/Index Statistics Collector - 366 | 367 | #track_activities = on 368 | #track_counts = on 369 | #track_functions = none # none, pl, all 370 | #track_activity_query_size = 1024 371 | #update_process_title = on 372 | #stats_temp_directory = 'pg_stat_tmp' 373 | 374 | 375 | # - Statistics Monitoring - 376 | 377 | #log_parser_stats = off 378 | #log_planner_stats = off 379 | #log_executor_stats = off 380 | #log_statement_stats = off 381 | 382 | 383 | #------------------------------------------------------------------------------ 384 | # AUTOVACUUM PARAMETERS 385 | #------------------------------------------------------------------------------ 386 | 387 | #autovacuum = on # Enable autovacuum subprocess? 'on' 388 | # requires track_counts to also be on. 389 | #log_autovacuum_min_duration = -1 # -1 disables, 0 logs all actions and 390 | # their durations, > 0 logs only 391 | # actions running at least this number 392 | # of milliseconds. 393 | #autovacuum_max_workers = 3 # max number of autovacuum subprocesses 394 | #autovacuum_naptime = 1min # time between autovacuum runs 395 | #autovacuum_vacuum_threshold = 50 # min number of row updates before 396 | # vacuum 397 | #autovacuum_analyze_threshold = 50 # min number of row updates before 398 | # analyze 399 | #autovacuum_vacuum_scale_factor = 0.2 # fraction of table size before vacuum 400 | #autovacuum_analyze_scale_factor = 0.1 # fraction of table size before analyze 401 | #autovacuum_freeze_max_age = 200000000 # maximum XID age before forced vacuum 402 | # (change requires restart) 403 | #autovacuum_vacuum_cost_delay = 20ms # default vacuum cost delay for 404 | # autovacuum, in milliseconds; 405 | # -1 means use vacuum_cost_delay 406 | #autovacuum_vacuum_cost_limit = -1 # default vacuum cost limit for 407 | # autovacuum, -1 means use 408 | # vacuum_cost_limit 409 | 410 | 411 | #------------------------------------------------------------------------------ 412 | # CLIENT CONNECTION DEFAULTS 413 | #------------------------------------------------------------------------------ 414 | 415 | # - Statement Behavior - 416 | 417 | #search_path = '"$user",public' # schema names 418 | #default_tablespace = '' # a tablespace name, '' uses the default 419 | #temp_tablespaces = '' # a list of tablespace names, '' uses 420 | # only default tablespace 421 | #check_function_bodies = on 422 | #default_transaction_isolation = 'read committed' 423 | #default_transaction_read_only = off 424 | #session_replication_role = 'origin' 425 | #statement_timeout = 0 # in milliseconds, 0 is disabled 426 | #vacuum_freeze_min_age = 50000000 427 | #vacuum_freeze_table_age = 150000000 428 | #xmlbinary = 'base64' 429 | #xmloption = 'content' 430 | 431 | # - Locale and Formatting - 432 | 433 | datestyle = 'iso, mdy' 434 | #intervalstyle = 'postgres' 435 | #timezone = unknown # actually, defaults to TZ environment 436 | # setting 437 | #timezone_abbreviations = 'Default' # Select the set of available time zone 438 | # abbreviations. Currently, there are 439 | # Default 440 | # Australia 441 | # India 442 | # You can create your own file in 443 | # share/timezonesets/. 444 | #extra_float_digits = 0 # min -15, max 2 445 | #client_encoding = sql_ascii # actually, defaults to database 446 | # encoding 447 | 448 | # These settings are initialized by initdb, but they can be changed. 449 | lc_messages = 'en_US.UTF-8' # locale for system error message 450 | # strings 451 | lc_monetary = 'en_US.UTF-8' # locale for monetary formatting 452 | lc_numeric = 'en_US.UTF-8' # locale for number formatting 453 | lc_time = 'en_US.UTF-8' # locale for time formatting 454 | 455 | # default configuration for text search 456 | default_text_search_config = 'pg_catalog.english' 457 | 458 | # - Other Defaults - 459 | 460 | #dynamic_library_path = '$libdir' 461 | #local_preload_libraries = '' 462 | 463 | 464 | #------------------------------------------------------------------------------ 465 | # LOCK MANAGEMENT 466 | #------------------------------------------------------------------------------ 467 | 468 | #deadlock_timeout = 1s 469 | #max_locks_per_transaction = 64 # min 10 470 | # (change requires restart) 471 | # Note: Each lock table slot uses ~270 bytes of shared memory, and there are 472 | # max_locks_per_transaction * (max_connections + max_prepared_transactions) 473 | # lock table slots. 474 | 475 | 476 | #------------------------------------------------------------------------------ 477 | # VERSION/PLATFORM COMPATIBILITY 478 | #------------------------------------------------------------------------------ 479 | 480 | # - Previous PostgreSQL Versions - 481 | 482 | #add_missing_from = off 483 | #array_nulls = on 484 | #backslash_quote = safe_encoding # on, off, or safe_encoding 485 | #default_with_oids = off 486 | #escape_string_warning = on 487 | #regex_flavor = advanced # advanced, extended, or basic 488 | #sql_inheritance = on 489 | #standard_conforming_strings = off 490 | #synchronize_seqscans = on 491 | 492 | # - Other Platforms and Clients - 493 | 494 | #transform_null_equals = off 495 | 496 | 497 | #------------------------------------------------------------------------------ 498 | # CUSTOMIZED OPTIONS 499 | #------------------------------------------------------------------------------ 500 | 501 | #custom_variable_classes = '' # list of custom variable class names 502 | -------------------------------------------------------------------------------- /conf/supervisord.conf: -------------------------------------------------------------------------------- 1 | [unix_http_server] 2 | file=%(path)s/sock/supervisord.sock 3 | chmod=0755 4 | chown=%(run_daemons_as_user)s 5 | 6 | [rpcinterface:supervisor] 7 | supervisor.rpcinterface_factory = supervisor.rpcinterface:make_main_rpcinterface 8 | 9 | 10 | 11 | [supervisord] 12 | logfile=%(path)s/logs/supervisord.log 13 | pidfile=%(path)s/pid/supervisord.pid 14 | user=%(run_daemons_as_user)s 15 | 16 | [supervisorctl] 17 | serverurl=unix://%(path)s/sock/supervisord.sock 18 | 19 | 20 | 21 | [program:gunicorn] 22 | directory=%(path)s/releases/current/%(django_project_name)s 23 | command=%(path)s/bin/gunicorn_django -c %(path)s/conf/gunicorn.conf 24 | autostart=true 25 | autorestart=true 26 | redirect_stderr=True 27 | user=%(run_daemons_as_user)s 28 | 29 | [program:nginx] 30 | directory=%(path)s/releases/current 31 | command=%(path)s/sbin/nginx -c %(path)s/conf/nginx.conf 32 | autostart=true 33 | autorestart=true 34 | redirect_stderr=True 35 | user=%(run_daemons_as_user)s 36 | -------------------------------------------------------------------------------- /fabconfig.yaml: -------------------------------------------------------------------------------- 1 | default: 2 | shell: /bin/bash -l -c 3 | user: root 4 | run_daemons_as_user: pony 5 | path: /sites/production/blog-post-test 6 | django_project_name: sample_project 7 | database_name: askthepony 8 | database_user: askthepony 9 | database_password: askthepony 10 | s3_bucket: blog-post-test 11 | static_relative_dir: static 12 | 13 | bundle_and_minify: 14 | static/js/pack.js: 15 | - static/js/722219967.js 16 | - static/js/activities.build.js 17 | - static/js/all.js 18 | - static/js/beacon.js 19 | - static/js/bottom.js 20 | - static/js/BrightcoveExperiences_all.js 21 | - static/js/chartbeat.js 22 | - static/js/cm8_detect_ad.js 23 | - static/js/controller_v1.1.js 24 | - static/js/embed3.js 25 | - static/js/gw.js 26 | - static/js/meter.js 27 | - static/js/mtr.js 28 | - static/js/NYTInlineEmbed.js 29 | - static/js/production.js 30 | - static/js/recommendationsModule.js 31 | - static/js/revenuescience.js 32 | - static/js/show_ads.js 33 | - static/js/sitewide.js 34 | - static/js/swfobject1.1.js 35 | - static/js/tabset.js 36 | static/js/pack2.js: 37 | - static/js/toolbar.build.min.js 38 | - static/js/top.js 39 | - static/js/trackingTags_v1.1.js 40 | - static/js/wtbase.js 41 | - static/js/wtid.js 42 | - static/js/wtinit.js 43 | static/css/pack.css: 44 | - static/css/homepage.css 45 | - static/css/newsletterPrefs.css 46 | - static/css/styles(1).css 47 | - static/css/styles(2).css 48 | - static/css/styles.css 49 | - static/css/twittertool.css 50 | app-servers: 51 | hosts: 52 | - 192.168.2.46 53 | configs: 54 | conf/supervisord.conf: "{path}/conf/supervisord.conf" 55 | conf/nginx.conf: "{path}/conf/nginx.conf" 56 | conf/gunicorn.conf: "{path}/conf/gunicorn.conf" 57 | installation: 58 | - ["apting additional packages", "apt-get -y -qq install zlib1g-dev libssl-dev libpcre++-dev postgresql-client libpq-dev", False] 59 | - ["installing supervisord and gunicorn", "bin/pip -E . -q install --upgrade supervisor gunicorn", False] 60 | - ["installing nginx", "mkdir -p {path}/tmp; cd {path}/tmp; wget -nv http://nginx.org/download/nginx-1.0.5.tar.gz; tar xf nginx-1.0.5.tar.gz; cd nginx-1.0.5; ./configure --prefix={path} --with-http_ssl_module --http-client-body-temp-path={path}/tmp/nginx_body --http-proxy-temp-path={path}/tmp/nginx_proxy --http-fastcgi-temp-path={path}/tmp/nginx_fcgi --http-uwsgi-temp-path={path}/tmp/uwsgi_temp --http-scgi-temp-path={path}/tmp/scgi_temp >> {path}/logs/installation.log; make -j2 >> {path}/logs/installation.log; make install >> {path}/logs/installation.log", False] 61 | - "rm -rf {path}/tmp/nginx-*" 62 | post_deploy: [] 63 | cold_start: 64 | - ["starting Supervisor daemon", "killall nginx; killall supervisord; sleep 2; bin/supervisord -c conf/supervisord.conf"] 65 | post_cold_start: [] 66 | start: 67 | - ["starting nginx", "bin/supervisorctl -c {path}/conf/supervisord.conf start nginx"] 68 | - ["starting gunicorn", "bin/supervisorctl -c {path}/conf/supervisord.conf start gunicorn"] 69 | stop: 70 | - ["stopping gunicorn", "bin/supervisorctl -c {path}/conf/supervisord.conf stop gunicorn"] 71 | - ["stopping nginx", "bin/supervisorctl -c {path}/conf/supervisord.conf stop nginx"] 72 | 73 | db-servers: 74 | hosts: 75 | - 192.168.2.67 76 | configs: 77 | conf/pg_hba.conf: "/etc/postgresql/8.4/main/pg_hba.conf" 78 | conf/postgresql_8.4.conf: "/etc/postgresql/8.4/main/postgresql.conf" 79 | installation: 80 | - ["apting additional packages", "apt-get -y -qq install postgresql libpq-dev", False] 81 | post_deploy: 82 | - ["setting proper permissions of configuration files", "chown -R postgres /etc/postgresql", False] 83 | cold_start: 84 | - ["starting PostgreSQL", "/etc/init.d/postgresql restart"] 85 | post_cold_start: 86 | - ["creating the database and user", "echo \"CREATE DATABASE {database_name} ENCODING 'UTF8';CREATE USER {database_user} WITH PASSWORD '{database_password}';GRANT ALL PRIVILEGES ON DATABASE {database_name} TO {database_user};\" > /tmp/create_db.sql; su - postgres -c \"psql -f /tmp/create_db.sql\"", False] 87 | - ["ensuring removal of SQL temporary files", "rm -rf /tmp/create_db.sql"] 88 | start: 89 | - ["starting PostgreSQL", "/etc/init.d/postgresql start"] 90 | stop: 91 | - ["stopping PostgreSQL", "/etc/init.d/postgresql stop"] 92 | #hostinfo: 93 | # 192.168.2.46: 94 | # user: askthepony 95 | # additional_configs: 96 | # etc/supervisord.conf: /temp/supervisord.conf -------------------------------------------------------------------------------- /fabfile.py: -------------------------------------------------------------------------------- 1 | from __future__ import with_statement 2 | from fabric.api import * 3 | from fabric.colors import * 4 | 5 | from fabric.contrib.console import confirm 6 | from fabric.contrib.files import upload_template 7 | 8 | from boto.s3.connection import S3Connection 9 | from boto.s3.key import Key 10 | from zlib import compress, Z_BEST_COMPRESSION 11 | import gzip 12 | 13 | import mimetypes 14 | import os 15 | from stat import * 16 | import time 17 | 18 | # globals 19 | env.colors = True 20 | env.config_file = 'fabconfig.yaml' 21 | env.format = True 22 | env.release = time.strftime('%Y%m%d%H%M%S') 23 | 24 | env.use_s3 = False 25 | env.optimize_images = False 26 | 27 | ALWAYS_UPDATE = True 28 | UTILS_DIR = '/usr/local/bin/' 29 | 30 | try: 31 | from s3_login_data import S3_API_KEY, S3_SECRET 32 | except ImportError: 33 | S3_API_KEY = '' 34 | S3_SECRET = '' 35 | 36 | # Tomek Kopczuk (www.askthepony.com/blog/): bring 1.0a API up to par 37 | def better_put(local_path, remote_path, mode=None): 38 | put(local_path.format(**env), remote_path.format(**env), mode) 39 | 40 | # tasks 41 | 42 | @task 43 | def deploy_media(): 44 | def get_file_base_and_extension(filename): 45 | if filename.count('.'): 46 | return '.'.join(filename.split('.')[:-1]), '.%s' % filename.split('.')[-1] 47 | else: 48 | return filename, '' 49 | 50 | # Concatenate jquery libraries 51 | for outpath in env.config.default['bundle_and_minify']: 52 | with open(outpath, 'w') as outfile: 53 | for libpath in env.config.default['bundle_and_minify'][outpath]: 54 | with open(libpath, 'r') as libfile: 55 | outfile.write(libfile.read()) 56 | 57 | # Open S3 connection if desired 58 | if env.use_s3: 59 | conn = S3Connection(S3_API_KEY, S3_SECRET) 60 | bucket = conn.get_bucket(env.config.default['s3_bucket']) 61 | else: 62 | conn, bucket = None, None 63 | 64 | interesting_extensions = set(['.js', '.css']) 65 | if env.optimize_images: 66 | interesting_extensions.update(set(['.png', '.jpg', '.jpeg'])) 67 | 68 | # Minify, gzip and upload 69 | dir_list = list(os.walk(env.config.default['static_relative_dir'])) 70 | files_set = set() 71 | for directory in dir_list: 72 | files_set.update(set([ \ 73 | get_file_base_and_extension(os.path.join(directory[0], d)) \ 74 | for d in directory[2] \ 75 | if get_file_base_and_extension(d)[1] in interesting_extensions and not get_file_base_and_extension(d)[0].count('.min') \ 76 | ])) 77 | 78 | files_no = len(files_set) 79 | for index, (file_basename, file_extension) in enumerate(files_set): 80 | print green("%.1f%% done (%d/%d)" % ((index+1.)*100./files_no, index+1, files_no)) 81 | original_path = '%s%s' % (file_basename, file_extension) 82 | minified_path = '%s.min%s' % (file_basename, file_extension) 83 | 84 | success = False 85 | gzipped = False 86 | 87 | if file_extension in ['.png']: 88 | local('pngcrush -rem gAMA -rem cHRM -rem iCCP -rem sRGB -rem alla -rem text -reduce -brute "%s" "%s"'%(original_path, minified_path)) 89 | try: 90 | print yellow('\tcompressed %d'%os.path.getsize(original_path)+" => %d"%os.path.getsize(minified_path)+ " => %d%%" % (os.path.getsize(minified_path) * 100 / os.path.getsize(original_path))) 91 | success = True 92 | except OSError: 93 | print red("File %s is not a PNG file." % original_path) 94 | elif file_extension in ['.jpg', '.jpeg']: 95 | local('jpegtran -outfile "%s" -optimize -copy none "%s"'%(minified_path, original_path)) 96 | try: 97 | print yellow('\tcompressed %d'%os.path.getsize(original_path)+" => %d"%os.path.getsize(minified_path)+ " => %d%%" % (os.path.getsize(minified_path) * 100 / os.path.getsize(original_path))) 98 | success = True 99 | except OSError: 100 | print red("File %s is not a JPG file." % original_path) 101 | elif file_extension in ['.js', '.css']: 102 | local('java -jar %s -v -o "%s" --charset utf-8 "%s"'%(os.path.join(UTILS_DIR, 'yuicompressor-2.4.6.jar'), minified_path, original_path)) 103 | try: 104 | indata = open(minified_path, "rb") 105 | outdata = gzip.open(minified_path + '.gz', 'wb') 106 | outdata.writelines(indata) 107 | indata.close() 108 | outdata.close() 109 | try: 110 | ratio = (os.path.getsize(minified_path+'.gz') * 100 / os.path.getsize(original_path)) 111 | except ZeroDivisionError: 112 | ratio = 100 113 | print yellow('\tcompressed %d'%os.path.getsize(original_path)+" => %d"%os.path.getsize(minified_path)+ " => %d"%os.path.getsize(minified_path+'.gz') + " => gzipped %d%%" % ratio) 114 | gzipped = True 115 | success = True 116 | except OSError: 117 | import traceback 118 | traceback.print_exc() 119 | print red("File %s triggered a parsing error." % original_path) 120 | # Successful S3 connection and minify 121 | if bucket and success: 122 | modify_time = os.stat(original_path)[ST_MTIME] 123 | key = None 124 | if not ALWAYS_UPDATE: 125 | key = bucket.get_key(minified_path) 126 | if key is None: 127 | key = Key(bucket) 128 | key.key = minified_path 129 | if (key.last_modified is None or time.localtime(modify_time) > time.strptime(key.last_modified, '%a, %d %b %Y %H:%M:%S %Z')) or ALWAYS_UPDATE: 130 | headers = {'Cache-Control': 'public,max-age=604800'} 131 | mime = mimetypes.guess_type(minified_path)[0] 132 | if mime: 133 | headers["Content-Type"] = mime 134 | if gzipped: 135 | headers.update({'Content-Encoding': 'gzip'}) 136 | key.set_contents_from_filename(minified_path + '.gz', policy='public-read', headers=headers) 137 | os.remove(minified_path + '.gz') 138 | else: 139 | key.set_contents_from_filename(minified_path, policy='public-read', headers=headers) 140 | print yellow('\tFile uploaded.') 141 | 142 | 143 | @task 144 | def setup_node(): 145 | """ 146 | Setup a fresh virtualenv as well as a few useful directories, then run 147 | a full deployment 148 | """ 149 | 150 | env().multirun(_create_user, condensed=True) 151 | print yellow('>>> apting required packages') 152 | env().multirun('apt-get -y -qq install python-virtualenv python-dev') 153 | print '' 154 | print yellow('>>> creating folder structure in {path}'.format(**env)) 155 | env().multirun('mkdir -p {path}; cd {path}; virtualenv .;\ 156 | mkdir -p releases; mkdir -p shared; mkdir -p packages;\ 157 | mkdir -p logs;mkdir -p sock;mkdir -p pid;mkdir -p conf;mkdir -p tmp/nginx;\ 158 | chown -R {run_daemons_as_user} {path}/pid;\ 159 | chown -R {run_daemons_as_user} {path}/logs;\ 160 | chown -R {run_daemons_as_user} {path}/sock;\ 161 | chmod -R 777 {path}/tmp') 162 | print yellow('>>> node software installation') 163 | env().multirun(_install_software) 164 | print yellow('>>> deploying') 165 | env().local('git archive --format=tar master | gzip > {release}.tar.gz') 166 | env().multirun(_deploy) 167 | env().local('rm -rf {release}.tar.gz') 168 | print yellow('>>> node software preparing to startup') 169 | env().multirun(_post_deploy) 170 | env().multirun(_cold_start) 171 | print yellow('>>> node software post-startup setup') 172 | env().multirun(_post_cold_start_software) 173 | 174 | def _create_user(): 175 | print yellow(">>> creating '%s' user and group" % env.run_daemons_as_user) 176 | with settings(warn_only=True): 177 | run("groupadd {run_daemons_as_user}; useradd -g {run_daemons_as_user} -M -s /sbin/nologin {run_daemons_as_user};") 178 | 179 | def _install_software(): 180 | if hasattr(env, 'installation'): 181 | for cmd in env.installation: 182 | warn_only = False 183 | if isinstance(cmd, list): 184 | print yellow('>>> %s' % cmd[0]) 185 | if len(cmd) > 2: 186 | warn_only = cmd[2] 187 | print cmd 188 | cmd = cmd[1] 189 | 190 | with cd(env.path): 191 | with settings(warn_only=warn_only): 192 | run(cmd.format(**env)) 193 | 194 | def _post_deploy(): 195 | if hasattr(env, 'post_deploy'): 196 | for cmd in env.post_deploy: 197 | warn_only = False 198 | if isinstance(cmd, list): 199 | print yellow('>>> %s' % cmd[0]) 200 | if len(cmd) > 2: 201 | warn_only = cmd[2] 202 | print cmd 203 | cmd = cmd[1] 204 | 205 | with cd(env.path): 206 | with settings(warn_only=warn_only): 207 | run(cmd.format(**env)) 208 | 209 | def _post_cold_start_software(): 210 | if hasattr(env, 'post_cold_start'): 211 | for cmd in env.post_cold_start: 212 | warn_only = False 213 | if isinstance(cmd, list): 214 | print yellow('>>> %s' % cmd[0]) 215 | if len(cmd) > 2: 216 | warn_only = cmd[2] 217 | print cmd 218 | cmd = cmd[1] 219 | 220 | with cd(env.path): 221 | with settings(warn_only=warn_only): 222 | run(cmd.format(**env)) 223 | 224 | 225 | @task 226 | def deploy(): 227 | env().local('git archive --format=tar master | gzip > {release}.tar.gz') 228 | env().multirun(_deploy) 229 | env().multirun(_post_deploy) 230 | env().multirun(_restart) 231 | env().local('rm -rf {release}.tar.gz') 232 | 233 | def _deploy(): 234 | upload_tar_from_git() 235 | symlink_current_release() 236 | fetch_requirements() 237 | _update_configuration() 238 | 239 | @task 240 | def rollback_to_version(version): 241 | env.version = version 242 | 243 | print yellow('>>> updating releases/current to point at {path}/releases/{version}').format(**env) 244 | env().multirun('cd {path}; rm -f releases/previous', warn_only=True) 245 | env().multirun('cd {path}; cp releases/current releases/last_current', warn_only=True) 246 | env().multirun('cd {path}; mv releases/current releases/previous', warn_only=True) 247 | env().multirun('cd {path}; ln -s {version} releases/current') 248 | env().multirun('cd {path}; rm releases/last_current', warn_only=True) 249 | env().multirun(_restart) 250 | 251 | @task 252 | def rollback(): 253 | print yellow('>>> updating releases/current to point at the version previously deployed on this server').format(**env) 254 | env().multirun('cd {path}; cp releases/current releases/previous_new', warn_only=True) 255 | env().multirun('cd {path}; mv releases/previous releases/current', warn_only=True) 256 | env().multirun('cd {path}; mv releases/previous_new releases/previous', warn_only=True) 257 | env().multirun(_restart) 258 | 259 | def upload_tar_from_git(): 260 | # if (GIT_UPLOAD_FROM_LOCAL): 261 | print yellow('>>> uploading .tar.gz package from this host\'s @master branch') 262 | run('mkdir -p {path}/releases/{release}') 263 | run('mkdir -p {path}/packages') 264 | better_put('{release}.tar.gz', '{path}/packages/') 265 | run('cd {path}/releases/{release} && tar zxf ../../packages/{release}.tar.gz') 266 | # else: 267 | # print yellow('>>> downloading .tar.gz package from remote @master branch') 268 | # run('cd {path}/releases; git clone -q {release}') 269 | 270 | def symlink_current_release(): 271 | print yellow('>>> updating releases/current to point at {path}/releases/{release}').format(**env) 272 | with cd(env.path): 273 | with settings(warn_only=True): 274 | run('rm -f releases/previous') 275 | run('mv releases/current releases/previous') 276 | run('ln -s {release} releases/current') 277 | with cd(env.path): 278 | with settings(warn_only=True): 279 | run('rm -rf releases/{release}/shared') 280 | run('ln -s ../../../shared releases/{release}/shared') 281 | 282 | def fetch_requirements(): 283 | print yellow('>>> updating packages from requirements.txt').format(**env) 284 | with cd(env.path): 285 | run('bin/pip install -q -E . -r releases/current/requirements.txt') 286 | 287 | @task 288 | def update_configuration(): 289 | env().multirun(_update_configuration) 290 | 291 | def _update_configuration(): 292 | print yellow('>>> uploading configuration files from your templates').format(**env) 293 | 294 | configs = {} 295 | if hasattr(env, 'configs'): 296 | configs.update(env.configs) 297 | if hasattr(env, 'additional_configs'): 298 | configs.update(env.additional_configs) 299 | 300 | for from_file, to_file in configs.items(): 301 | remote_filename = to_file.format(**env) 302 | upload_template(from_file, remote_filename, context=env) 303 | run('chown -R {run_daemons_as_user} {path}/conf') 304 | 305 | @task("db-servers") 306 | def syncdb(): 307 | env().run('cd {path}; sh bin/activate; bin/python releases/current/{django_project_name}/manage.py syncdb --noinput') 308 | 309 | @task 310 | def cold_start(): 311 | env().multirun(_cold_start) 312 | 313 | @task 314 | def start(): 315 | env().multirun(_start) 316 | 317 | @task 318 | def stop(): 319 | env().multirun(_stop) 320 | 321 | @task 322 | def restart(): 323 | env().multirun(_stop) 324 | env().multirun(_start) 325 | 326 | def _cold_start(): 327 | print yellow('>>> cold-starting node') 328 | if hasattr(env, 'cold_start'): 329 | for cmd in env.cold_start: 330 | if isinstance(cmd, list): 331 | print yellow('>>> %s' % cmd[0]) 332 | cmd = cmd[1] 333 | with cd(env.path): 334 | run(cmd.format(**env)) 335 | def _start(): 336 | print yellow('>>> starting node') 337 | if hasattr(env, 'start'): 338 | for cmd in env.start: 339 | if isinstance(cmd, list): 340 | print yellow('>>> %s' % cmd[0]) 341 | cmd = cmd[1] 342 | with cd(env.path): 343 | run(cmd.format(**env)) 344 | def _stop(): 345 | print yellow('>>> stopping node') 346 | if hasattr(env, 'stop'): 347 | for cmd in env.stop: 348 | if isinstance(cmd, list): 349 | print yellow('>>> %s' % cmd[0]) 350 | cmd = cmd[1] 351 | with cd(env.path): 352 | run(cmd.format(**env)) 353 | 354 | def _restart(): 355 | if getattr(env, 'cold_start', False): 356 | _cold_start() 357 | else: 358 | _stop() 359 | _start() 360 | 361 | @task 362 | def shell(): 363 | env().shell(format=True) -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django==1.3 2 | psycopg2 -------------------------------------------------------------------------------- /sample_project/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/sample_project/__init__.py -------------------------------------------------------------------------------- /sample_project/manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | from django.core.management import execute_manager 3 | import imp 4 | try: 5 | imp.find_module('settings') # Assumed to be in the same directory. 6 | except ImportError: 7 | import sys 8 | sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n" % __file__) 9 | sys.exit(1) 10 | 11 | import settings 12 | 13 | if __name__ == "__main__": 14 | execute_manager(settings) 15 | -------------------------------------------------------------------------------- /sample_project/settings.py: -------------------------------------------------------------------------------- 1 | # Django settings for sample_project project. 2 | 3 | DEBUG = True 4 | TEMPLATE_DEBUG = DEBUG 5 | 6 | ADMINS = ( 7 | # ('Your Name', 'your_email@example.com'), 8 | ) 9 | 10 | MANAGERS = ADMINS 11 | 12 | DATABASES = { 13 | 'default': { 14 | 'ENGINE': 'django.db.backends.postgresql_psycopg2', # Add 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'. 15 | 'NAME': 'askthepony', # Or path to database file if using sqlite3. 16 | 'USER': 'askthepony', # Not used with sqlite3. 17 | 'PASSWORD': 'askthepony', # Not used with sqlite3. 18 | 'HOST': '192.168.2.67', # Set to empty string for localhost. Not used with sqlite3. 19 | 'PORT': '', # Set to empty string for default. Not used with sqlite3. 20 | } 21 | } 22 | 23 | # Local time zone for this installation. Choices can be found here: 24 | # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name 25 | # although not all choices may be available on all operating systems. 26 | # On Unix systems, a value of None will cause Django to use the same 27 | # timezone as the operating system. 28 | # If running in a Windows environment this must be set to the same as your 29 | # system time zone. 30 | TIME_ZONE = 'America/Chicago' 31 | 32 | # Language code for this installation. All choices can be found here: 33 | # http://www.i18nguy.com/unicode/language-identifiers.html 34 | LANGUAGE_CODE = 'en-us' 35 | 36 | SITE_ID = 1 37 | 38 | # If you set this to False, Django will make some optimizations so as not 39 | # to load the internationalization machinery. 40 | USE_I18N = True 41 | 42 | # If you set this to False, Django will not format dates, numbers and 43 | # calendars according to the current locale 44 | USE_L10N = True 45 | 46 | # Absolute filesystem path to the directory that will hold user-uploaded files. 47 | # Example: "/home/media/media.lawrence.com/media/" 48 | MEDIA_ROOT = '' 49 | 50 | # URL that handles the media served from MEDIA_ROOT. Make sure to use a 51 | # trailing slash. 52 | # Examples: "http://media.lawrence.com/media/", "http://example.com/media/" 53 | MEDIA_URL = '' 54 | 55 | # Absolute path to the directory static files should be collected to. 56 | # Don't put anything in this directory yourself; store your static files 57 | # in apps' "static/" subdirectories and in STATICFILES_DIRS. 58 | # Example: "/home/media/media.lawrence.com/static/" 59 | STATIC_ROOT = '' 60 | 61 | # URL prefix for static files. 62 | # Example: "http://media.lawrence.com/static/" 63 | STATIC_URL = '/static/' 64 | 65 | # URL prefix for admin static files -- CSS, JavaScript and images. 66 | # Make sure to use a trailing slash. 67 | # Examples: "http://foo.com/static/admin/", "/static/admin/". 68 | ADMIN_MEDIA_PREFIX = '/static/admin/' 69 | 70 | # Additional locations of static files 71 | STATICFILES_DIRS = ( 72 | # Put strings here, like "/home/html/static" or "C:/www/django/static". 73 | # Always use forward slashes, even on Windows. 74 | # Don't forget to use absolute paths, not relative paths. 75 | ) 76 | 77 | # List of finder classes that know how to find static files in 78 | # various locations. 79 | STATICFILES_FINDERS = ( 80 | 'django.contrib.staticfiles.finders.FileSystemFinder', 81 | 'django.contrib.staticfiles.finders.AppDirectoriesFinder', 82 | # 'django.contrib.staticfiles.finders.DefaultStorageFinder', 83 | ) 84 | 85 | # Make this unique, and don't share it with anybody. 86 | SECRET_KEY = 'hqce1d71xrgkm$ts^(7$jifv7@q2&4rk5=r%he)fh#upty)y3g' 87 | 88 | # List of callables that know how to import templates from various sources. 89 | TEMPLATE_LOADERS = ( 90 | 'django.template.loaders.filesystem.Loader', 91 | 'django.template.loaders.app_directories.Loader', 92 | # 'django.template.loaders.eggs.Loader', 93 | ) 94 | 95 | MIDDLEWARE_CLASSES = ( 96 | 'django.middleware.common.CommonMiddleware', 97 | 'django.contrib.sessions.middleware.SessionMiddleware', 98 | 'django.middleware.csrf.CsrfViewMiddleware', 99 | 'django.contrib.auth.middleware.AuthenticationMiddleware', 100 | 'django.contrib.messages.middleware.MessageMiddleware', 101 | ) 102 | 103 | ROOT_URLCONF = 'sample_project.urls' 104 | 105 | TEMPLATE_DIRS = ( 106 | # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". 107 | # Always use forward slashes, even on Windows. 108 | # Don't forget to use absolute paths, not relative paths. 109 | ) 110 | 111 | INSTALLED_APPS = ( 112 | 'django.contrib.auth', 113 | 'django.contrib.contenttypes', 114 | 'django.contrib.sessions', 115 | 'django.contrib.sites', 116 | 'django.contrib.messages', 117 | 'django.contrib.staticfiles', 118 | # Uncomment the next line to enable the admin: 119 | # 'django.contrib.admin', 120 | # Uncomment the next line to enable admin documentation: 121 | # 'django.contrib.admindocs', 122 | ) 123 | 124 | # A sample logging configuration. The only tangible logging 125 | # performed by this configuration is to send an email to 126 | # the site admins on every HTTP 500 error. 127 | # See http://docs.djangoproject.com/en/dev/topics/logging for 128 | # more details on how to customize your logging configuration. 129 | LOGGING = { 130 | 'version': 1, 131 | 'disable_existing_loggers': False, 132 | 'handlers': { 133 | 'mail_admins': { 134 | 'level': 'ERROR', 135 | 'class': 'django.utils.log.AdminEmailHandler' 136 | } 137 | }, 138 | 'loggers': { 139 | 'django.request': { 140 | 'handlers': ['mail_admins'], 141 | 'level': 'ERROR', 142 | 'propagate': True, 143 | }, 144 | } 145 | } 146 | -------------------------------------------------------------------------------- /sample_project/urls.py: -------------------------------------------------------------------------------- 1 | from django.conf.urls.defaults import patterns, include, url 2 | 3 | # Uncomment the next two lines to enable the admin: 4 | # from django.contrib import admin 5 | # admin.autodiscover() 6 | 7 | urlpatterns = patterns('', 8 | # Examples: 9 | # url(r'^$', 'sample_project.views.home', name='home'), 10 | # url(r'^sample_project/', include('sample_project.foo.urls')), 11 | 12 | # Uncomment the admin/doc line below to enable admin documentation: 13 | # url(r'^admin/doc/', include('django.contrib.admindocs.urls')), 14 | 15 | # Uncomment the next line to enable the admin: 16 | # url(r'^admin/', include(admin.site.urls)), 17 | ) 18 | -------------------------------------------------------------------------------- /static/css/homepage.css: -------------------------------------------------------------------------------- 1 | @import url("/css/app/facebook/base.css"); 2 | 3 | #facebookContainer { 4 | width: 187px !important; 5 | margin-top: -26px; 6 | margin-bottom: -1px; 7 | background-color: #fff; 8 | border: 1px solid #ccc; 9 | margin-left:-1px !important; 10 | } 11 | #facebookContainer .actor, 12 | #facebookContainer p { 13 | font-size:11px; 14 | line-height:14px; 15 | } 16 | 17 | #facebookContainer .popular { 18 | font-size:12px; 19 | } 20 | 21 | #facebookContainer .caption { 22 | margin-top: 10px; 23 | margin-bottom: 5px; 24 | } 25 | 26 | .fbPrivacy { 27 | font-family: arial, helvetica, sans-serif; 28 | color: #777; 29 | font-size: 11px; 30 | line-height: 14px; 31 | border-bottom: 1px solid #ccc; 32 | padding-bottom: 10px; 33 | margin-bottom: 10px; 34 | } 35 | 36 | #cColumnTopSpanRegion 37 | .singleRuleDivider { 38 | margin-top: 0 !important; 39 | } 40 | 41 | .fb_button { 42 | width:100%; 43 | } 44 | 45 | .fb_button_text { 46 | text-align:center; 47 | padding-right:0px !important; 48 | padding-left:0px !important; 49 | } 50 | 51 | #facebookContainer .popular { 52 | background:url("/images/misc/bullet4x4.gif") no-repeat scroll left 0.45em transparent; 53 | padding:0 0 0 8px; 54 | } 55 | 56 | #fbInfo { 57 | display:block; 58 | } 59 | 60 | #facebookContainer.loggedIn #fbInfo { 61 | margin-top:-1.1em; 62 | margin-bottom:1em; 63 | } 64 | -------------------------------------------------------------------------------- /static/css/newsletterPrefs.css: -------------------------------------------------------------------------------- 1 | #facebookModalBg { 2 | position:fixed; 3 | width:100%; 4 | height:100%; 5 | top:0; 6 | z-index:2147483644; 7 | } 8 | 9 | #facebookModal { 10 | position:relative; 11 | top:150px; 12 | width:632px; 13 | height:340px; 14 | margin:0 auto; 15 | background:white; 16 | box-shadow: 2px 2px 14px #000000; 17 | -moz-box-shadow: 2px 2px 14px #000000; 18 | -webkit-box-shadow:2px 2px 14px #000000; 19 | } 20 | 21 | #facebookModal .inset { 22 | margin: 14px; 23 | } 24 | 25 | #facebookModal p { 26 | font-family: Arial, Helvetica, sans-serif; 27 | font-size:13px; 28 | margin-bottom:8px; 29 | } 30 | 31 | #facebookModal label{ 32 | color: #999; 33 | margin-bottom:8px; 34 | } 35 | 36 | .facebookModalBar { 37 | position:absolute; 38 | width:100%; 39 | bottom:0; 40 | text-align:right; 41 | background: #f6f6f6; 42 | border-top:1px solid #ccc; 43 | height:56px; 44 | } 45 | 46 | .facebookModalBarTop { 47 | border-top:0; 48 | border-bottom:1px solid #ccc; 49 | top:0; 50 | } 51 | 52 | #facebookModal td{ 53 | vertical-align:top; 54 | } 55 | 56 | #facebookModal .facebookModalInner { 57 | padding: 90px 30px 30px; 58 | } 59 | 60 | #facebookModal .facebookModalText { 61 | font-family: Georgia, serif; 62 | font-size:14px; 63 | margin-bottom:16px; 64 | } -------------------------------------------------------------------------------- /static/css/styles(1).css: -------------------------------------------------------------------------------- 1 | /*$Id: styles.css 7828 2009-01-13 18:27:03Z fisherc $ 2 | /css/0.1/print/styles.css 3 | (c)2006 - 2009 The New York Times Company */ 4 | 5 | /* Global */ 6 | 7 | #shell { 8 | width: 973px !important; 9 | } 10 | 11 | #page { 12 | *overflow: hidden !important; 13 | } 14 | 15 | /* Times People */ 16 | 17 | #TP_container, 18 | #TP_container_shadow { 19 | position: absolute !important; 20 | } 21 | 22 | /* Sectionfront */ 23 | 24 | .wideA .bColumn { 25 | *width: 203px !important; 26 | _width: 203px !important; 27 | } 28 | 29 | /* Homepage */ 30 | 31 | #home #main, 32 | #home #classifiedsWidget #realEstate, 33 | #home #classifiedsWidget #autos, 34 | #home #classifiedsWidget #jobMarket, 35 | #home #classifiedsWidget #allClassifieds { 36 | *overflow: hidden !important; 37 | } 38 | 39 | #home .cColumn { 40 | *width: 350px !important; 41 | _width: 350px !important; 42 | } 43 | 44 | #home .cColumn .subColumn-2 div.last, 45 | #home .cColumn .subColumn-2 .lastColumn { 46 | *width: 176px !important; 47 | _width: 176px !important; 48 | } 49 | 50 | #home .wideA .bColumn { 51 | *width: 173px !important; 52 | _width: 173px !important; 53 | } 54 | -------------------------------------------------------------------------------- /static/css/styles(2).css: -------------------------------------------------------------------------------- 1 | /* 2 | $Id: styles.css 66667 2011-05-04 23:27:22Z lpierfelice $ 3 | (c)2006 - 2011 The New York Times Company 4 | */ 5 | html body { 6 | margin-left:0; 7 | margin-right:0 8 | } 9 | 10 | #TP_container { 11 | text-align:left; 12 | background-image:none; 13 | position:absolute; 14 | top:0; 15 | left:-1px; 16 | right:0px; 17 | *width:100%; 18 | height:34px; 19 | z-index:10000; 20 | background:#f2f2f2; 21 | } 22 | 23 | /*#TP_container * { 24 | font-family:Arial, Helvetica, sans-serif !important; 25 | }*/ 26 | 27 | #TP_container a, 28 | #TP_container p, 29 | #TP_container div, 30 | #TP_container span, 31 | #TP_container td, 32 | #TP_container h4 { 33 | font-family:Arial, Helvetica, sans-serif !important; 34 | font-size:12px; 35 | } 36 | 37 | #TP_container h4 { 38 | line-height:12px; 39 | } 40 | 41 | #TP_container table { 42 | border-collapse:collapse; 43 | } 44 | 45 | #TP_container img { 46 | vertical-align:middle; 47 | } 48 | 49 | #TP_container a img { 50 | border:none; 51 | } 52 | 53 | #TP_container p, 54 | #TP_container h1, 55 | #TP_container h2, 56 | #TP_container h3, 57 | #TP_container h4, 58 | #TP_container h5, 59 | #TP_container h6 { 60 | margin:0; 61 | } 62 | 63 | .TP_object { 64 | font-weight:bold; 65 | overflow:hidden; 66 | } 67 | 68 | .TP_toolbar_item { 69 | height:100%; 70 | position:absolute; 71 | top:0px; 72 | padding:5px; 73 | height:24px; 74 | border-right:1px solid white; 75 | border-left:1px solid #b2b2b2; 76 | background-color: #f2f2f2; 77 | } 78 | 79 | /*.TP_toolbar_item * { 80 | font-size:12px; 81 | }*/ 82 | 83 | .TP_toolbar_item_content { 84 | position:relative; 85 | z-index:10500; 86 | cursor:pointer; 87 | } 88 | 89 | #TP_left_panel { 90 | width:176px; 91 | z-index:10010; 92 | } 93 | 94 | #TP_feed { 95 | left:188px; 96 | right:202px; 97 | padding:0; 98 | height:34px; 99 | z-index:10000; 100 | } 101 | 102 | #TP_right_panel { 103 | width:160px; 104 | right:30px; 105 | z-index:10020; 106 | } 107 | 108 | #TP_latest_item { 109 | margin:0 30px 0 5px; 110 | } 111 | 112 | #TP_spinner { 113 | position:absolute; 114 | top:6px; 115 | right:-30px; 116 | } 117 | 118 | #TP_minimize_button { 119 | color:#808080; 120 | cursor:pointer; 121 | font-size:22px; 122 | text-align:center; 123 | width:18px; 124 | line-height:24px !important; 125 | right:0; 126 | background:url(/images/apps/timespeople/toolbar/1.5/close.gif) no-repeat 55% 50%; 127 | } 128 | 129 | #TP_container .TP_leftcap span { 130 | font-size:11px !important; 131 | } 132 | 133 | .TP_leftcap, 134 | .TP_bevel, 135 | .TP_rightcap { 136 | float:left; 137 | display:inline; 138 | height:21px; 139 | border:0; 140 | padding:0; 141 | margin:0; 142 | background-color:transparent; 143 | background-repeat:no-repeat; 144 | *width: auto; 145 | *overflow: visible; 146 | _width: auto; 147 | _overflow: visible; 148 | } 149 | 150 | .TP_leftcap:disabled, 151 | .TP_bevel:disabled, 152 | .TP_rightcap:disabled, 153 | .TP_disabled { 154 | opacity: 0.5; 155 | -moz-opacity: 0.5; 156 | filter:alpha(opacity=50); 157 | cursor: default; 158 | } 159 | 160 | .TP_leftcap::-moz-focus-inner, 161 | .TP_bevel::-moz-focus-inner, 162 | .TP_rightcap::-moz-focus-inner { 163 | padding:0; 164 | border:0 165 | } 166 | 167 | .TP_leftcap:focus, 168 | .TP_bevel:focus, 169 | .TP_rightcap:focus { 170 | outline:1px dotted; 171 | } 172 | 173 | 174 | .TP_leftcap span, 175 | .TP_bevel span, 176 | .TP_rightcap span { 177 | height:21px; 178 | display:block; 179 | line-height:21px; 180 | color:#333; 181 | background-repeat:no-repeat; 182 | } 183 | 184 | .TP_leftcap { 185 | padding:0; 186 | background-image:none; 187 | } 188 | 189 | .TP_leftcap span { 190 | padding-left:8px; 191 | padding-right:0px; 192 | background-image: url(/images/apps/timespeople/buttons/leftcap.png); 193 | background-position: left center; 194 | } 195 | 196 | .TP_split_button .TP_leftcap span { 197 | padding-right:7px; 198 | } 199 | 200 | .TP_bevel span { 201 | padding-left:3px; 202 | background-image: url(/images/apps/timespeople/buttons/bevel.png); 203 | background-position: left center; 204 | _height:22px; 205 | _margin-top: -1px; 206 | _background-position-y:1px; 207 | } 208 | 209 | .TP_rightcap { 210 | padding-right:8px; 211 | background-image: url(/images/apps/timespeople/buttons/rightcap.png); 212 | background-position: right center; 213 | _background-position-y:0%; 214 | } 215 | 216 | #TP_toolbar_annotate_btn { 217 | padding-right:4px; 218 | } 219 | 220 | #TP_toolbar_annotate_btn img { 221 | margin-top:3px; 222 | } 223 | 224 | #TP_restore_button { 225 | display: none !important; 226 | } 227 | 228 | #TP_container a, 229 | #TP_restore_button a { 230 | color:#004276; 231 | text-decoration:none; 232 | cursor:pointer; 233 | } 234 | 235 | #TP_restore_button a { 236 | font-size:12px; 237 | } 238 | 239 | #TP_container a:hover { 240 | color:#004276; 241 | text-decoration:underline; 242 | } 243 | #TP_container h4, 244 | #TP_container .TP_header, 245 | #TP_container .TP_header a { 246 | color:#333; 247 | font-size:12px; 248 | } 249 | 250 | #TP_fixed_toolbar { 251 | position:fixed; 252 | top:0; 253 | left:0; 254 | width:100%; 255 | z-index: 100000002; 256 | } 257 | 258 | #TP_container_shadow_wrap { 259 | position:absolute; 260 | top:30px; 261 | left:0; 262 | width:100%; 263 | z-index :9999; 264 | overflow:hidden; 265 | height:14px; 266 | font-size:0; 267 | } 268 | 269 | #TP_container_shadow { 270 | position:absolute; 271 | top:0; 272 | left:0; 273 | width:100%; 274 | z-index :9999; 275 | font-size:0; 276 | height:4px; 277 | -moz-box-shadow:2px 2px 7px #000; 278 | -webkit-box-shadow:2px 2px 7px #000; 279 | box-shadow:2px 2px 7px #000; 280 | border-right:0 !important; 281 | border-left:0 !important; 282 | -moz-border-radius-bottomleft:0; 283 | -moz-border-radius-bottomright:0; 284 | /* ie */ 285 | -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Color=#444444, direction=180, strength=5 )"; 286 | filter: progid:DXImageTransform.Microsoft.Shadow(Color=#444444, direction=180, strength=5 ); 287 | background-color: black\9; 288 | /* end ie */ 289 | } 290 | 291 | #TP_inner { 292 | max-width:1100px; 293 | border-left:1px solid white; 294 | border-right:1px solid #b2b2b2; 295 | margin:0 auto; 296 | position:relative; 297 | height:100%; 298 | } 299 | 300 | #TP_container .TP_groove { 301 | width:40px; 302 | height:100%; 303 | margin:0 auto; 304 | background-image:url('/images/apps/timespeople/toolbar/1.5/handle.gif'); 305 | background-repeat:no-repeat; 306 | background-position:50%; 307 | } 308 | 309 | #TP_container .TP_user .TP_following_count { 310 | color:#808080; 311 | font-size:11px; 312 | line-height:12px; 313 | font-weight:normal; 314 | } 315 | 316 | #TP_container .TP_user .TP_following_count a, 317 | #TP_container .TP_user .TP_following_count a:visited { 318 | color:#808080; 319 | } 320 | 321 | #TP_container .TP_user .TP_following_count a:hover { 322 | color:#004276; 323 | } 324 | 325 | #TP_container, #TP_feed { 326 | font-family:Arial, Helvetica, sans-serif; 327 | color:#808080; 328 | } 329 | 330 | #TP_container .TP_drawer_tab { 331 | display:none; 332 | position:absolute; 333 | top:-1px; 334 | right:-1px; 335 | left:0; 336 | *width:100%; 337 | color:#fff; 338 | background-color:#4d4d4d; 339 | height:40px; 340 | padding:3px 0; 341 | z-index:10600; 342 | cursor:pointer; 343 | } 344 | 345 | #TP_container .TP_drawer_tab h4 { 346 | padding:9px 6px 6px; 347 | color:#fff; 348 | } 349 | 350 | #TP_container .TP_user .TP_avatar { 351 | width:24px; 352 | height:24px; 353 | overflow:hidden; 354 | float:left; 355 | display:inline; 356 | margin-right:6px; 357 | margin-bottom:6px; 358 | } 359 | 360 | #TP_feed span { 361 | vertical-align:middle; 362 | } 363 | 364 | .open .TP_drawer_content { 365 | background-color:#f2f2f2; 366 | } 367 | 368 | .TP_drawer { 369 | position: absolute; 370 | top: 0; 371 | left:0; 372 | right:0; 373 | _right:-5px; 374 | z-index: 10600; 375 | } 376 | 377 | .TP_teaser { 378 | top:34px; 379 | background-color:transparent; 380 | z-index:10100; 381 | } 382 | 383 | .tease { 384 | position:absolute; 385 | height: 24px; 386 | left:-1px; 387 | right:-1px; 388 | } 389 | 390 | .TP_drawer_tooltip { 391 | display:none; 392 | background-color:white; 393 | position:absolute; 394 | top:0; 395 | left:0; 396 | right:-1px; 397 | *width:100%; 398 | height:58px; 399 | z-index:10200; 400 | } 401 | 402 | /*.tease .TP_drawer_tooltip { 403 | position: relative; 404 | top: -34px; 405 | padding-top:42px; 406 | }*/ 407 | 408 | .TP_drawer_tooltip_inner { 409 | color:#666; 410 | text-align:center; 411 | font-size:11px !important; 412 | background-color:white; 413 | border-top: 1px solid #e6e6e6; 414 | border-bottom: 1px solid #1e4782; 415 | height:14px; 416 | padding:2px 0 0; 417 | height:16px; 418 | position:absolute; 419 | right:0; 420 | bottom:0; 421 | left:0; 422 | } 423 | 424 | .tease .TP_drawer_tooltip { 425 | display:block; 426 | } 427 | 428 | .open { 429 | height:100%; 430 | padding: 0 0 15px; 431 | background:none; 432 | border:none; 433 | /* padding:0;*/ 434 | margin:0; 435 | top:34px; 436 | } 437 | 438 | .shadow { 439 | -webkit-box-shadow:2px 2px 7px #000; 440 | -moz-box-shadow:2px 2px 7px #000; 441 | box-shadow:2px 2px 7px #000; 442 | /* ie */ 443 | -ms-filter: "progid:DXImageTransform.Microsoft.Shadow(Color=#444444, direction=135, strength=5 )"; 444 | filter: progid:DXImageTransform.Microsoft.Shadow(Color=#444444, direction=135, strength=5 ); 445 | border-left:1px solid #ccc\9; 446 | background-color: white\9; 447 | /* end ie */ 448 | } 449 | 450 | .border-shadow { 451 | left: -2px; 452 | right: -6px; 453 | border-bottom:5px solid; 454 | border-right:5px solid; 455 | border-left:2px solid; 456 | border-color:transparent; 457 | -moz-border-radius:6px; 458 | -moz-border-left-colors: rgba(5,5,5,0.2) rgba(5,5,5, 0.4); 459 | -moz-border-right-colors: rgba(5,5,5,0.1) rgba(5,5,5,0.2) rgba(5,5,5,0.4) rgba(5,5,5, 0.6) rgba(5,5,5, 0.7); 460 | -moz-border-bottom-colors: rgba(5,5,5,0.1) rgba(5,5,5,0.2) rgba(5,5,5,0.4) rgba(5,5,5, 0.6) rgba(5,5,5, 0.7); 461 | } 462 | 463 | .TP_drawer_content { 464 | display:none; 465 | padding:5px; 466 | } 467 | 468 | .open .TP_drawer_content { 469 | position:absolute; 470 | top: 11px; 471 | bottom:15px; 472 | left:0; 473 | right:0; 474 | overflow-y:auto; 475 | overflow-x:hidden; 476 | display:block; 477 | } 478 | 479 | .TP_timestamp_cell { 480 | color:#808080; 481 | text-transform:uppercase; 482 | font-size:10px; 483 | text-align:right; 484 | padding-right:0px; 485 | padding-top:12px; 486 | width:60px; 487 | font-size:10px !important; 488 | white-space:nowrap; 489 | } 490 | 491 | .TP_feed_content { 492 | table-layout:fixed; 493 | height:24px; 494 | } 495 | 496 | .open .TP_feed_content { 497 | width:100%; 498 | margin-right:0; 499 | height:auto; 500 | } 501 | 502 | .open .TP_feed_content td { 503 | height:34px; 504 | border-bottom:1px solid #ccc; 505 | border-top:1px solid #ccc; 506 | } 507 | 508 | .TP_feed_content td { 509 | background:none; 510 | font-size:12px; 511 | vertical-align:top; 512 | padding:9px 6px 0; 513 | } 514 | 515 | 516 | #TP_page_activity_feed .TP_feed_content td, 517 | #TP_page_activity_feed .TP_feed_content span, 518 | #TP_page_activity_feed .TP_feed_content a { 519 | white-space: normal; 520 | } 521 | 522 | #TP_page_activity_feed { 523 | margin-top:10px; 524 | } 525 | 526 | .TP_feed_content .TP_avatar_cell { 527 | padding-left:0; 528 | padding-top:5px; 529 | } 530 | 531 | .TP_avatar_cell { 532 | text-align:right; 533 | width:24px; 534 | padding-right:0 !important; 535 | } 536 | 537 | .TP_avatar_cell .TP_avatar { 538 | width:24px; 539 | height:24px; 540 | } 541 | 542 | .TP_object_cell { 543 | width:100%; 544 | padding-top:12px; 545 | white-space:nowrap; 546 | } 547 | 548 | .open .TP_object_cell { 549 | white-space:normal; 550 | } 551 | 552 | .TP_feed_handle { 553 | display:none; 554 | position:absolute; 555 | bottom:0; 556 | z-index:1000; 557 | width:100%; 558 | height:15px; 559 | background-color:#cacbca; 560 | cursor:ns-resize; 561 | } 562 | 563 | .open .TP_feed_handle { 564 | display:block; 565 | } 566 | 567 | 568 | .TP_drawer_toggle, 569 | .TP_drawer_toggle_up { 570 | position:absolute; 571 | right:0px; 572 | top:6px; 573 | z-index:12000; 574 | width:28px; 575 | height:21px; 576 | background-repeat:no-repeat; 577 | background-position:center; 578 | background-image:url('/images/apps/timespeople/toolbar/1.5/toggle.gif'); 579 | cursor:pointer; 580 | } 581 | 582 | .TP_drawer_toggle_up { 583 | background-image:url('/images/apps/timespeople/arrow-up.gif'); 584 | } 585 | 586 | .TP_tile_ad { 587 | position:absolute; 588 | top:7px; 589 | right:30px; 590 | } 591 | 592 | #TP_right_panel .TP_tile_ad { 593 | left:7px; 594 | } 595 | 596 | #TP_container img { -ms-interpolation-mode:bicubic; } 597 | 598 | #TP_right_panel .TP_drawer { 599 | left: auto !important; 600 | width: 285px; 601 | } 602 | 603 | #TP_right_panel .TP_drawer_tab { 604 | left: auto !important; 605 | width: 286px; 606 | } 607 | 608 | .TP_right_button { 609 | margin:5px 0 10px; 610 | text-align:right; 611 | } 612 | 613 | #TP_container .TP_toolbar_link { 614 | font-size:11px; 615 | } 616 | .TP_toolbar_item_highlight { 617 | background-color:white; 618 | } 619 | 620 | .TP_annotation { 621 | color:#333; 622 | margin: 4px 0 5px 0 !important; 623 | } 624 | 625 | .TP_annotation_hdl { 626 | margin-bottom: 10px; 627 | } 628 | 629 | #TP_annotation_form { 630 | width:99%; 631 | height:50px; 632 | margin:6px 0; 633 | font-family: Arial, Helvetica, sans-serif; 634 | font-size: 11px; 635 | color: #333; 636 | overflow:auto; 637 | } 638 | 639 | .TP_runaround_left { 640 | float:left; 641 | margin: 0 5px 5px 0; 642 | } 643 | 644 | #TP_toolbar_buttons { 645 | position:absolute; 646 | left:5px; 647 | top:2px; 648 | } 649 | 650 | #TP_get_started_button { 651 | position:absolute; 652 | left:5px; 653 | top:2px; 654 | } 655 | 656 | .TP_toolbar_middle { 657 | padding-top:6px; 658 | } 659 | 660 | #TP_page_activity_count_button { 661 | position:absolute; 662 | right:0px; 663 | top:2px; 664 | } 665 | 666 | .TP_capsule_button { 667 | padding: 4px 18px 4px 7px; 668 | background-color: #b1b1b1; 669 | color:white; 670 | border-radius:10px; 671 | -moz-border-radius:10px; 672 | -webkit-border-radius:10px; 673 | font-weight:bold; 674 | line-height:11px; 675 | } 676 | 677 | /* IE7 */ 678 | html>body .TP_capsule_button { 679 | *background:url(/images/apps/timespeople/buttons/count_rightcap.png) no-repeat right center; 680 | } 681 | 682 | html>body .TP_capsule_button span { 683 | *padding:9px; 684 | *margin-right:-8px; 685 | *background:url(/images/apps/timespeople/buttons/count_leftcap.png) no-repeat left center; 686 | } 687 | 688 | .opposingFloatControl .element1 { float: left; } 689 | .opposingFloatControl .element2 { float: right; } 690 | 691 | @media screen and (-webkit-min-device-pixel-ratio:0) { 692 | /* Safari and Google Chrome only - fix margins */ 693 | button span { 694 | margin-top: -1px; 695 | } 696 | } 697 | 698 | -------------------------------------------------------------------------------- /static/css/twittertool.css: -------------------------------------------------------------------------------- 1 | /* $Id: twittertool.css 43610 2010-08-19 20:16:11Z santep $ 2 | * /css/0.1/screen/common/modules/articletools.css 3 | * (c)2006 - 2008 The New York Times Company */ 4 | 5 | @import url(/css/0.1/screen/common/forms.css); 6 | 7 | #twitter_item { 8 | position:relative; 9 | line-height:1.4em; 10 | list-style:none; 11 | font-family: Arial, Helvetica, sans-serif; 12 | } 13 | 14 | td #twitter_item { 15 | text-transform:uppercase; 16 | } 17 | 18 | #twitter_button { 19 | cursor:pointer; 20 | background-image:url(/images/article/functions/twitter.gif); 21 | background-repeat:no-repeat; 22 | padding:0 0 3px 20px; 23 | background-position:-1px -1px; 24 | } 25 | 26 | .entry-tools #twitter_button { 27 | display:block; 28 | } 29 | 30 | #twitter_panel { 31 | background-color:white; 32 | position:absolute; 33 | right:-6px; 34 | top:-2px; 35 | padding:10px; 36 | width:230px; 37 | border: 1px solid #EAE8E9; 38 | text-align:left; 39 | z-index:10; 40 | } 41 | 42 | #twitter_panel a { 43 | padding-left:0 !important; 44 | } 45 | 46 | #twitter_form button { 47 | float:right; 48 | } 49 | 50 | #twitter_textarea { 51 | font-size:11px; 52 | font-family: Arial, Helvetica, sans-serif; 53 | width:220px; 54 | padding:5px; 55 | height:50px; 56 | margin-bottom:4px; 57 | color:#333; 58 | } 59 | 60 | #twitter_spinner { 61 | position:absolute; 62 | top:60px; 63 | left:110px; 64 | } 65 | 66 | #twitter_char_count { 67 | text-transform:none; 68 | font-family: Arial, Helvetica, sans-serif; 69 | color:#666; 70 | float:left; 71 | } 72 | 73 | #twitter_form_title { 74 | padding:1px 0 1px 22px; 75 | background: url(/images/apps/timespeople/twitter.gif) no-repeat left center; 76 | } 77 | 78 | #twitter_close { 79 | cursor:pointer; 80 | padding-right: 18px; 81 | background: url(/images/article/comments/buttons/close_window.gif) no-repeat right center; 82 | } 83 | 84 | #twitter_panel .singleRule { 85 | margin: 5px 0 10px; 86 | border-color: #EAE8E9; 87 | } 88 | 89 | .opposingFloatControl .element1 { float: left; } 90 | .opposingFloatControl .element2 { float: right; } 91 | 92 | .sponsorLabel { 93 | font-size:9px; 94 | color:#666; 95 | text-transform:uppercase; 96 | } -------------------------------------------------------------------------------- /static/img/092117_TStyle_163x90.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/092117_TStyle_163x90.gif -------------------------------------------------------------------------------- /static/img/11-0220_AudienceDev_120x90_gluten.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/11-0220_AudienceDev_120x90_gluten.jpg -------------------------------------------------------------------------------- /static/img/17-CORNER-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/17-CORNER-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/17focus-slideshow-slide-2OXD-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/17focus-slideshow-slide-2OXD-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/17living_span-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/17living_span-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/21moth-vikram-moth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21moth-vikram-moth.jpg -------------------------------------------------------------------------------- /static/img/21moth_artofsummer-moth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21moth_artofsummer-moth.jpg -------------------------------------------------------------------------------- /static/img/21moth_location-moth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21moth_location-moth.jpg -------------------------------------------------------------------------------- /static/img/21moth_river-moth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21moth_river-moth.jpg -------------------------------------------------------------------------------- /static/img/21moth_townies-moth.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21moth_townies-moth.jpg -------------------------------------------------------------------------------- /static/img/21playhouses-span-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/21playhouses-span-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/22shuttle-c-hpLarge.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/22shuttle-c-hpLarge.jpg -------------------------------------------------------------------------------- /static/img/3.12.11-515_logo78x36.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/3.12.11-515_logo78x36.jpg -------------------------------------------------------------------------------- /static/img/3.12.11-515e72-dining_room72.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/3.12.11-515e72-dining_room72.gif -------------------------------------------------------------------------------- /static/img/60ed6cffQ2FQ5CRDQ2FQ2FQ5BF1R)Q27gl5LLQ2B5ZQ3AYF)L: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/60ed6cffQ2FQ5CRDQ2FQ2FQ5BF1R)Q27gl5LLQ2B5ZQ3AYF)L -------------------------------------------------------------------------------- /static/img/Amish-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/Amish-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/KN_Briefcase_88x31.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/KN_Briefcase_88x31.gif -------------------------------------------------------------------------------- /static/img/Kristof_New-thumbStandard-v2.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/Kristof_New-thumbStandard-v2.jpg -------------------------------------------------------------------------------- /static/img/POGUE-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/POGUE-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/arrow-right-3x5.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/arrow-right-3x5.gif -------------------------------------------------------------------------------- /static/img/audio_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/audio_icon.gif -------------------------------------------------------------------------------- /static/img/bc_nytimesLogo.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/bc_nytimesLogo.gif -------------------------------------------------------------------------------- /static/img/blank.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/blank.gif -------------------------------------------------------------------------------- /static/img/cobrandHeader_315x20.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/cobrandHeader_315x20.gif -------------------------------------------------------------------------------- /static/img/comment_icon(1).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/comment_icon(1).gif -------------------------------------------------------------------------------- /static/img/comment_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/comment_icon.gif -------------------------------------------------------------------------------- /static/img/facebook(1).gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/facebook(1).gif -------------------------------------------------------------------------------- /static/img/facebook.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/facebook.gif -------------------------------------------------------------------------------- /static/img/frontpage-75.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/frontpage-75.gif -------------------------------------------------------------------------------- /static/img/go.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/go.gif -------------------------------------------------------------------------------- /static/img/jp-ROMNEY-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/jp-ROMNEY-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/loading-grey-lines-circle-18.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/loading-grey-lines-circle-18.gif -------------------------------------------------------------------------------- /static/img/lwrRite_0005_bnr4a_163x90_1.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/lwrRite_0005_bnr4a_163x90_1.jpg -------------------------------------------------------------------------------- /static/img/moth_forward.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/moth_forward.gif -------------------------------------------------------------------------------- /static/img/moth_reverse_off.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/moth_reverse_off.gif -------------------------------------------------------------------------------- /static/img/none.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/none.png -------------------------------------------------------------------------------- /static/img/nytimes.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/nytimes.gif -------------------------------------------------------------------------------- /static/img/nytlogo379x64.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/nytlogo379x64.gif -------------------------------------------------------------------------------- /static/img/pencil_00010_bnr6a.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/pencil_00010_bnr6a.gif -------------------------------------------------------------------------------- /static/img/recommendedFacebook.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/recommendedFacebook.png -------------------------------------------------------------------------------- /static/img/recommendedLogin.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/recommendedLogin.png -------------------------------------------------------------------------------- /static/img/recommendedRegister.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/recommendedRegister.png -------------------------------------------------------------------------------- /static/img/saved_resource: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/saved_resource -------------------------------------------------------------------------------- /static/img/search_button40x19.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/search_button40x19.gif -------------------------------------------------------------------------------- /static/img/summer-thumbStandard.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/summer-thumbStandard.jpg -------------------------------------------------------------------------------- /static/img/tmagazine_072111.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/tmagazine_072111.jpg -------------------------------------------------------------------------------- /static/img/twitter.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/twitter.gif -------------------------------------------------------------------------------- /static/img/verticals_tmagazine.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/verticals_tmagazine.gif -------------------------------------------------------------------------------- /static/img/video-bushwacker-videoThumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/video-bushwacker-videoThumb.jpg -------------------------------------------------------------------------------- /static/img/video-caucus-071811-videoThumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/video-caucus-071811-videoThumb.jpg -------------------------------------------------------------------------------- /static/img/video-caucus-072011-videoThumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/video-caucus-072011-videoThumb.jpg -------------------------------------------------------------------------------- /static/img/video-spinaltap-videoThumb.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/video-spinaltap-videoThumb.jpg -------------------------------------------------------------------------------- /static/img/video_icon.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/tkopczuk/one_second_django_deployment/2f4da4e815e80fc094885f4349b889a258847baa/static/img/video_icon.gif -------------------------------------------------------------------------------- /static/js/722219967.js: -------------------------------------------------------------------------------- 1 | /* AG-develop 12.7.1-48 (2011-07-13 07:11:32 UTC) */ 2 | rsinetsegs=[]; 3 | var rsiExp=new Date((new Date()).getTime()+2419200000); 4 | var rsiDom=location.hostname; 5 | rsiDom=rsiDom.replace(/.*(\.[\w\-]+\.[a-zA-Z]{3}$)/,'$1'); 6 | rsiDom=rsiDom.replace(/.*(\.[\w\-]+\.\w+\.[a-zA-Z]{2}$)/,'$1'); 7 | rsiDom=rsiDom.replace(/.*(\.[\w\-]{3,}\.[a-zA-Z]{2}$)/,'$1'); 8 | var rsiSegs=""; 9 | var rsiPat=/.*_5.*/; 10 | for(x=0;x0?rsiSegs.substr(1):"")+";expires="+rsiExp.toGMTString()+";path=/;domain="+rsiDom; 12 | if(typeof(DM_onSegsAvailable)=="function"){DM_onSegsAvailable([],'h07707');} -------------------------------------------------------------------------------- /static/js/NYTInlineEmbed.js: -------------------------------------------------------------------------------- 1 | // code for embedding NYTInline audio player 2 | 3 | //var playerURL = "http://graphics8.nytimes.com/packages/flash/multimedia/INLINE_PLAYER/NYTInline.swf"; 4 | var playerURL = "http://graphics8.nytimes.com/packages/flash/multimedia/INLINE_PLAYER/NYTInlineAudioPlayer.swf"; 5 | //var loaderURL = "http://www.nytimes.com/packages/flash/multimedia/swfs/multiloader.swf"; 6 | var loaderURL = "http://www.nytimes.com/packages/flash/multimedia/swfs/AS3Multiloader.swf"; 7 | 8 | var mm = new Object(); 9 | 10 | 11 | // vars needed for this function should already be declared 12 | function writePlayer() { 13 | 14 | // in case of multiple embedded players 15 | var pID = Math.round(Math.random()*1000000); 16 | 17 | var HTML_anchorOpenStart = ""; 19 | var HTML_iconImageTag = ""; 20 | var HTML_anchorClose = ""; 21 | var HTML_beforeMP3 = " ("; 22 | var HTML_MP3 = "mp3"; 23 | var HTML_afterMP3 = ")"; 24 | var HTML_br = "
" 25 | 26 | //var htmlStr = "\