├── __init__.py ├── core └── __init__.py ├── thing ├── __init__.py ├── migrations │ ├── __init__.py │ └── 0002_auto_20160126_1128.py ├── templatetags │ └── __init__.py ├── media │ ├── asc.gif │ ├── bg.gif │ ├── desc.gif │ ├── thing.js │ ├── thing.css │ └── g.dot-min.js ├── sql │ ├── apicache.sql │ ├── marketorder.postgresql_psycopg2.sql │ ├── transaction.postgresql_psycopg2.sql │ ├── apikey.postgresql_psycopg2.sql │ ├── campaign.postgresql_psycopg2.sql │ ├── taskstate.postgresql_psycopg2.sql │ ├── characterskillintraining.postgresql_psycopg2.sql │ └── industryjob.postgresql_pyscopg2.sql ├── tests │ ├── __init__.py │ └── views.py ├── views │ ├── __init__.py │ └── events.py ├── fixtures │ └── auth_testdata.json ├── tasks │ ├── __init__.py │ ├── accountstatus.py │ └── serverstatus.py ├── forms.py ├── models │ ├── faction.py │ ├── mailinglist.py │ ├── alliance.py │ ├── reftype.py │ ├── itemcategory.py │ ├── region.py │ ├── itemgroup.py │ ├── apikeyfailure.py │ ├── constellation.py │ ├── spskill.py │ ├── system.py │ ├── corporationstanding.py │ ├── blueprint.py │ ├── factionstanding.py │ ├── event.py │ ├── contractitem.py │ ├── spremap.py │ ├── blueprintproduct.py │ ├── marketgroup.py │ ├── blueprintcomponent.py │ ├── characterskill.py │ ├── spentry.py │ ├── assetsummary.py │ ├── planetarycolony.py │ ├── characterconfig.py │ ├── taskstate.py │ ├── pricehistory.py │ ├── character.py │ ├── mailmessage.py │ ├── skillplan.py │ ├── implant.py │ ├── inventoryflag.py │ ├── __init__.py │ └── transaction.py └── middleware.py ├── docker ├── requirements-docker-prod.txt ├── env-reset.sh ├── requirements-docker-dev.txt ├── requirements-docker.txt ├── env-prod.sh ├── Dockerfile-nginx ├── Dockerfile-data ├── first-setup.sh ├── Dockerfile-prod ├── nginx.conf └── Dockerfile-dev ├── doc-images ├── home.png ├── assets.png ├── bpcalc.png ├── orders.png ├── trade.png ├── apikeys.png ├── character.png ├── blueprints.png ├── theme-slate.png ├── theme-cyborg.png └── transactions.png ├── static ├── favicon.ico ├── fonts │ ├── FontAwesome.otf │ ├── fontawesome-webfont.eot │ ├── fontawesome-webfont.ttf │ ├── fontawesome-webfont.woff │ ├── glyphicons-halflings-regular.eot │ ├── glyphicons-halflings-regular.ttf │ └── glyphicons-halflings-regular.woff ├── img │ └── anonymous_character.jpg ├── js │ ├── evething │ │ ├── industry.js │ │ ├── orders.js │ │ ├── pi.js │ │ ├── transactions.js │ │ ├── wallet_journal.js │ │ ├── blueprints.js │ │ └── home.js │ ├── bootstrap │ │ ├── transition.js │ │ └── alert.js │ └── templates.js ├── less │ ├── theme-yeti │ │ ├── bootstrap.less │ │ └── yeti.less │ ├── theme-cosmo │ │ ├── bootstrap.less │ │ └── cosmo.less │ ├── theme-slate │ │ ├── bootstrap.less │ │ └── slate.less │ ├── theme-cyborg │ │ ├── bootstrap.less │ │ └── cyborg.less │ ├── theme-cerulean │ │ ├── bootstrap.less │ │ └── cerulean.less │ ├── theme-darkthing │ │ ├── bootstrap.less │ │ └── darkthing.less │ ├── theme-default │ │ ├── bootstrap.less │ │ └── default.less │ ├── font-awesome │ │ ├── fixed-width.less │ │ ├── core.less │ │ ├── bordered-pulled.less │ │ ├── rotated-flipped.less │ │ ├── larger.less │ │ ├── list.less │ │ ├── font-awesome.less │ │ ├── stacked.less │ │ ├── path.less │ │ ├── mixins.less │ │ └── spinning.less │ ├── bootstrap │ │ ├── mixins │ │ │ ├── center-block.less │ │ │ ├── text-emphasis.less │ │ │ ├── size.less │ │ │ ├── background-variant.less │ │ │ ├── opacity.less │ │ │ ├── text-overflow.less │ │ │ ├── tab-focus.less │ │ │ ├── resize.less │ │ │ ├── labels.less │ │ │ ├── progress-bar.less │ │ │ ├── nav-divider.less │ │ │ ├── reset-filter.less │ │ │ ├── alerts.less │ │ │ ├── nav-vertical-align.less │ │ │ ├── responsive-visibility.less │ │ │ ├── pagination.less │ │ │ ├── border-radius.less │ │ │ ├── panels.less │ │ │ ├── list-group.less │ │ │ ├── hide-text.less │ │ │ ├── clearfix.less │ │ │ ├── table-row.less │ │ │ ├── image.less │ │ │ └── buttons.less │ │ ├── wells.less │ │ ├── breadcrumbs.less │ │ ├── responsive-embed.less │ │ ├── component-animations.less │ │ ├── close.less │ │ ├── thumbnails.less │ │ ├── utilities.less │ │ ├── media.less │ │ ├── pager.less │ │ ├── jumbotron.less │ │ ├── mixins.less │ │ ├── badges.less │ │ ├── bootstrap.less │ │ ├── labels.less │ │ ├── code.less │ │ ├── grid.less │ │ ├── alerts.less │ │ ├── print.less │ │ ├── pagination.less │ │ └── progress-bars.less │ ├── evething │ │ ├── bpcalc.less │ │ ├── skillplan.less │ │ ├── contracts.less │ │ ├── home.less │ │ ├── industry.less │ │ ├── account.less │ │ ├── walletjournal.less │ │ ├── mail.less │ │ ├── base.less │ │ ├── bootstrap.less │ │ ├── assets.less │ │ └── tablesorter.less │ ├── evething.less │ └── bootstrap.less └── handlebars │ └── mail_list.handlebars ├── requirements.txt ├── .dockerignore ├── templates ├── thing │ ├── error.html │ ├── blueprints_export.html │ ├── blueprints_import.html │ ├── trade.html │ └── events.html ├── 404.html ├── 500.html ├── includes │ └── assets_filters.html ├── macros │ ├── common.html │ └── icons.html └── registration │ ├── login.html │ └── register.html ├── evething ├── __init__.py ├── celery.py └── wsgi.py ├── .gitignore ├── package.json ├── manage.py ├── docker-compose.yml ├── LICENSE └── docker-compose-prod.yml /__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /core/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thing/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thing/migrations/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /thing/templatetags/__init__.py: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docker/requirements-docker-prod.txt: -------------------------------------------------------------------------------- 1 | gunicorn==19.3.0 2 | -------------------------------------------------------------------------------- /docker/env-reset.sh: -------------------------------------------------------------------------------- 1 | unset COMPOSE_PROJECT_NAME 2 | unset COMPOSE_FILE 3 | -------------------------------------------------------------------------------- /doc-images/home.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/home.png -------------------------------------------------------------------------------- /static/favicon.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/favicon.ico -------------------------------------------------------------------------------- /thing/media/asc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/thing/media/asc.gif -------------------------------------------------------------------------------- /thing/media/bg.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/thing/media/bg.gif -------------------------------------------------------------------------------- /doc-images/assets.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/assets.png -------------------------------------------------------------------------------- /doc-images/bpcalc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/bpcalc.png -------------------------------------------------------------------------------- /doc-images/orders.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/orders.png -------------------------------------------------------------------------------- /doc-images/trade.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/trade.png -------------------------------------------------------------------------------- /docker/requirements-docker-dev.txt: -------------------------------------------------------------------------------- 1 | flake8==2.5.0 2 | django-debug-toolbar==1.3.0 3 | pip-review -------------------------------------------------------------------------------- /docker/requirements-docker.txt: -------------------------------------------------------------------------------- 1 | celery[redis]==3.1.19 2 | django-redis==4.3.0 3 | psycopg2==2.6.1 -------------------------------------------------------------------------------- /thing/media/desc.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/thing/media/desc.gif -------------------------------------------------------------------------------- /doc-images/apikeys.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/apikeys.png -------------------------------------------------------------------------------- /doc-images/character.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/character.png -------------------------------------------------------------------------------- /doc-images/blueprints.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/blueprints.png -------------------------------------------------------------------------------- /doc-images/theme-slate.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/theme-slate.png -------------------------------------------------------------------------------- /doc-images/theme-cyborg.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/theme-cyborg.png -------------------------------------------------------------------------------- /doc-images/transactions.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/doc-images/transactions.png -------------------------------------------------------------------------------- /static/fonts/FontAwesome.otf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/FontAwesome.otf -------------------------------------------------------------------------------- /thing/sql/apicache.sql: -------------------------------------------------------------------------------- 1 | CREATE INDEX thing_apicache_combo ON thing_apicache (url, parameters, cached_until); 2 | -------------------------------------------------------------------------------- /docker/env-prod.sh: -------------------------------------------------------------------------------- 1 | export COMPOSE_PROJECT_NAME="evething_prod" 2 | export COMPOSE_FILE="docker-compose-prod.yml" 3 | -------------------------------------------------------------------------------- /thing/tests/__init__.py: -------------------------------------------------------------------------------- 1 | from thing.tests.models import * # NOPEP8 2 | from thing.tests.views import * # NOPEP8 3 | -------------------------------------------------------------------------------- /static/img/anonymous_character.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/img/anonymous_character.jpg -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/fontawesome-webfont.eot -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/fontawesome-webfont.ttf -------------------------------------------------------------------------------- /static/fonts/fontawesome-webfont.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/fontawesome-webfont.woff -------------------------------------------------------------------------------- /thing/sql/marketorder.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_marketorder ALTER COLUMN issued TYPE timestamp without time zone; 2 | -------------------------------------------------------------------------------- /thing/sql/transaction.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_transaction ALTER COLUMN date TYPE timestamp without time zone; 2 | -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- 1 | Django<1.8 2 | Jinja2>=2.6 3 | jingo>=0.6,<0.8 4 | django-mptt>=0.5,<0.8 5 | requests>=1.0 6 | MarkupSafe>=0.15 7 | pyyaml 8 | -------------------------------------------------------------------------------- /.dockerignore: -------------------------------------------------------------------------------- 1 | .git 2 | .idea 3 | .gitignore 4 | celerybeat-schedule 5 | celerybeat.pid 6 | static-dist 7 | node_modules 8 | skill_map.pickle 9 | -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /static/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/madcowfred/evething/HEAD/static/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /static/js/evething/industry.js: -------------------------------------------------------------------------------- 1 | EVEthing.industry = { 2 | onload: function () { 3 | EVEthing.misc.setup_tab_hash(); 4 | } 5 | }; 6 | -------------------------------------------------------------------------------- /static/less/theme-yeti/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "yeti.less"; -------------------------------------------------------------------------------- /static/less/theme-cosmo/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "cosmo.less"; 5 | -------------------------------------------------------------------------------- /static/less/theme-slate/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "slate.less"; 5 | -------------------------------------------------------------------------------- /static/less/theme-cyborg/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "cyborg.less"; 5 | -------------------------------------------------------------------------------- /static/less/theme-cerulean/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "cerulean.less"; 5 | -------------------------------------------------------------------------------- /static/less/theme-darkthing/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "bootswatch.less"; 4 | @import "darkthing.less"; 5 | -------------------------------------------------------------------------------- /static/less/theme-default/bootstrap.less: -------------------------------------------------------------------------------- 1 | @import "variables.less"; 2 | @import "../bootstrap.less"; 3 | @import "../bootstrap/theme.less"; 4 | @import "default.less"; 5 | -------------------------------------------------------------------------------- /static/less/font-awesome/fixed-width.less: -------------------------------------------------------------------------------- 1 | // Fixed Width Icons 2 | // ------------------------- 3 | .@{fa-css-prefix}-fw { 4 | width: (18em / 14); 5 | text-align: center; 6 | } 7 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/center-block.less: -------------------------------------------------------------------------------- 1 | // Center-align a block level element 2 | 3 | .center-block() { 4 | display: block; 5 | margin-left: auto; 6 | margin-right: auto; 7 | } 8 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/text-emphasis.less: -------------------------------------------------------------------------------- 1 | // Typography 2 | 3 | .text-emphasis-variant(@color) { 4 | color: @color; 5 | a&:hover { 6 | color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /templates/thing/error.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}ERR-OR{% endblock %} 4 | 5 | {% block content %} 6 |

An error has occurred

7 |

{{ error }}

8 | {% endblock %} 9 | -------------------------------------------------------------------------------- /thing/sql/apikey.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_apikey ALTER COLUMN expires TYPE timestamp without time zone; 2 | ALTER TABLE thing_apikey ALTER COLUMN paid_until TYPE timestamp without time zone; 3 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/size.less: -------------------------------------------------------------------------------- 1 | // Sizing shortcuts 2 | 3 | .size(@width; @height) { 4 | width: @width; 5 | height: @height; 6 | } 7 | 8 | .square(@size) { 9 | .size(@size; @size); 10 | } 11 | -------------------------------------------------------------------------------- /thing/sql/campaign.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_campaign ALTER COLUMN start_date TYPE timestamp without time zone; 2 | ALTER TABLE thing_campaign ALTER COLUMN end_date TYPE timestamp without time zone; 3 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/background-variant.less: -------------------------------------------------------------------------------- 1 | // Contextual backgrounds 2 | 3 | .bg-variant(@color) { 4 | background-color: @color; 5 | a&:hover { 6 | background-color: darken(@color, 10%); 7 | } 8 | } 9 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/opacity.less: -------------------------------------------------------------------------------- 1 | // Opacity 2 | 3 | .opacity(@opacity) { 4 | opacity: @opacity; 5 | // IE8 filter 6 | @opacity-ie: (@opacity * 100); 7 | filter: ~"alpha(opacity=@{opacity-ie})"; 8 | } 9 | -------------------------------------------------------------------------------- /thing/sql/taskstate.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_taskstate ALTER COLUMN mod_time TYPE timestamp without time zone; 2 | ALTER TABLE thing_taskstate ALTER COLUMN next_time TYPE timestamp without time zone; 3 | -------------------------------------------------------------------------------- /evething/__init__.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | # This will make sure the app is always imported when 4 | # Django starts so that shared_task will use this app. 5 | from .celery import app as celery_app # NOPEP8 6 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/text-overflow.less: -------------------------------------------------------------------------------- 1 | // Text overflow 2 | // Requires inline-block or block for proper styling 3 | 4 | .text-overflow() { 5 | overflow: hidden; 6 | text-overflow: ellipsis; 7 | white-space: nowrap; 8 | } 9 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/tab-focus.less: -------------------------------------------------------------------------------- 1 | // WebKit-style focus 2 | 3 | .tab-focus() { 4 | // Default 5 | outline: thin dotted; 6 | // WebKit 7 | outline: 5px auto -webkit-focus-ring-color; 8 | outline-offset: -2px; 9 | } 10 | -------------------------------------------------------------------------------- /static/less/evething/bpcalc.less: -------------------------------------------------------------------------------- 1 | /* BPcalc layout */ 2 | td.bpc-tiny { 3 | width: 1em; 4 | } 5 | td.bpc-small { 6 | width: 4em; 7 | } 8 | td.bpc-medium { 9 | width: 5.5em; 10 | } 11 | td.bpc-large { 12 | width: 8em; 13 | } 14 | -------------------------------------------------------------------------------- /static/less/evething/skillplan.less: -------------------------------------------------------------------------------- 1 | /* Skillplan layout */ 2 | td.sp-trained { 3 | width: 3em; 4 | } 5 | td.sp-group { 6 | width: 15em; 7 | } 8 | td.sp-small { 9 | width: 4.5em; 10 | } 11 | td.sp-time { 12 | width: 8.5em; 13 | } 14 | -------------------------------------------------------------------------------- /docker/Dockerfile-nginx: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM nginx 3 | 4 | MAINTAINER Eric Gillingham "Gillingham@bikezen.net" 5 | 6 | # Copy custom configuration file from the current directory 7 | COPY docker/nginx.conf /etc/nginx/nginx.conf 8 | 9 | CMD ["nginx"] -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/resize.less: -------------------------------------------------------------------------------- 1 | // Resize anything 2 | 3 | .resizable(@direction) { 4 | resize: @direction; // Options: horizontal, vertical, both 5 | overflow: auto; // Per CSS3 UI, `resize` only applies when `overflow` isn't `visible` 6 | } 7 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/labels.less: -------------------------------------------------------------------------------- 1 | // Labels 2 | 3 | .label-variant(@color) { 4 | background-color: @color; 5 | 6 | &[href] { 7 | &:hover, 8 | &:focus { 9 | background-color: darken(@color, 10%); 10 | } 11 | } 12 | } 13 | -------------------------------------------------------------------------------- /thing/sql/characterskillintraining.postgresql_psycopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_characterskillintraining ALTER COLUMN start_time TYPE timestamp without time zone; 2 | ALTER TABLE thing_characterskillintraining ALTER COLUMN end_time TYPE timestamp without time zone; 3 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | *.db 2 | *.pyc 3 | *.sublime-project 4 | *.sublime-workspace 5 | .idea 6 | local_settings.py 7 | skill_map.pickle 8 | thing/profile_middleware.py 9 | .*.swp 10 | node_modules/ 11 | sqlite-latest.sqlite 12 | celerybeat-schedule 13 | celerybeat.pid 14 | static-dist 15 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/progress-bar.less: -------------------------------------------------------------------------------- 1 | // Progress bars 2 | 3 | .progress-bar-variant(@color) { 4 | background-color: @color; 5 | 6 | // Deprecated parent class requirement as of v3.2.0 7 | .progress-striped & { 8 | #gradient > .striped(); 9 | } 10 | } 11 | -------------------------------------------------------------------------------- /static/js/evething/orders.js: -------------------------------------------------------------------------------- 1 | EVEthing.orders = { 2 | onload: function () { 3 | // make tooltips appear to the right of icons 4 | $("[rel=tooltip]").each(function () { 5 | $(this).data('bs.tooltip').options.placement = 'right'; 6 | }); 7 | } 8 | }; 9 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/nav-divider.less: -------------------------------------------------------------------------------- 1 | // Horizontal dividers 2 | // 3 | // Dividers (basically an hr) within dropdowns and nav lists 4 | 5 | .nav-divider(@color: #e5e5e5) { 6 | height: 1px; 7 | margin: ((@line-height-computed / 2) - 1) 0; 8 | overflow: hidden; 9 | background-color: @color; 10 | } 11 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/reset-filter.less: -------------------------------------------------------------------------------- 1 | // Reset filters for IE 2 | // 3 | // When you need to remove a gradient background, do not forget to use this to reset 4 | // the IE filter for IE9 and below. 5 | 6 | .reset-filter() { 7 | filter: e(%("progid:DXImageTransform.Microsoft.gradient(enabled = false)")); 8 | } 9 | -------------------------------------------------------------------------------- /docker/Dockerfile-data: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM ubuntu:14.04 3 | 4 | MAINTAINER Eric Gillingham "Gillingham@bikezen.net" 5 | 6 | # Setup unprivileged user 7 | RUN adduser --disabled-password --gecos '' evething 8 | 9 | COPY . /evething 10 | RUN chown -R evething:evething /evething 11 | VOLUME /evething 12 | 13 | CMD ["/bin/true"] -------------------------------------------------------------------------------- /static/less/evething/contracts.less: -------------------------------------------------------------------------------- 1 | /* Contracts layout */ 2 | td.con-id { 3 | width: 6em; 4 | text-align: right; 5 | } 6 | td.con-date { 7 | width: 10.5em; 8 | text-align: center; 9 | } 10 | td.con-type { 11 | width: 7.5em; 12 | text-align: center; 13 | white-space: nowrap; 14 | } 15 | td.con-status { 16 | width: 8.5em; 17 | } 18 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/alerts.less: -------------------------------------------------------------------------------- 1 | // Alerts 2 | 3 | .alert-variant(@background; @border; @text-color) { 4 | background-color: @background; 5 | border-color: @border; 6 | color: @text-color; 7 | 8 | hr { 9 | border-top-color: darken(@border, 5%); 10 | } 11 | .alert-link { 12 | color: darken(@text-color, 10%); 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /static/less/font-awesome/core.less: -------------------------------------------------------------------------------- 1 | // Base Class Definition 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix} { 5 | display: inline-block; 6 | font-family: FontAwesome; 7 | font-style: normal; 8 | font-weight: normal; 9 | line-height: 1; 10 | -webkit-font-smoothing: antialiased; 11 | -moz-osx-font-smoothing: grayscale; 12 | } 13 | -------------------------------------------------------------------------------- /templates/404.html: -------------------------------------------------------------------------------- 1 | {% extends "simple_base.html" %} 2 | 3 | {% block title %}EVEthing: Page not found{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |

404: Page Not Found

9 |

The requested page could not be found.

10 |
11 |
12 | {% endblock %} 13 | -------------------------------------------------------------------------------- /thing/sql/industryjob.postgresql_pyscopg2.sql: -------------------------------------------------------------------------------- 1 | ALTER TABLE thing_industryjob ALTER COLUMN install_time TYPE timestamp without time zone; 2 | ALTER TABLE thing_industryjob ALTER COLUMN begin_time TYPE timestamp without time zone; 3 | ALTER TABLE thing_industryjob ALTER COLUMN end_time TYPE timestamp without time zone; 4 | ALTER TABLE thing_industryjob ALTER COLUMN pause_time TYPE timestamp without time zone; 5 | -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "EVEthing", 3 | "version": "0.1.0", 4 | "devDependencies": { 5 | "grunt": "~0.4.5", 6 | "grunt-contrib-concat": "~0.5.1", 7 | "grunt-contrib-handlebars": "~0.10.2", 8 | "grunt-contrib-less": "~1.0.1", 9 | "grunt-contrib-uglify": "~0.9.1", 10 | "grunt-flake8": "^0.1.3", 11 | "grunt-cli": "~0.1.13", 12 | "less-plugin-clean-css": "~1.5.0" 13 | } 14 | } 15 | -------------------------------------------------------------------------------- /docker/first-setup.sh: -------------------------------------------------------------------------------- 1 | #!/bin/bash 2 | . /evething-env/bin/activate 3 | cd /evething/ 4 | 5 | if [ ! -e sqlite-latest.sqlite ]; then 6 | wget https://www.fuzzwork.co.uk/dump/sqlite-latest.sqlite.bz2 7 | bunzip2 sqlite-latest.sqlite.bz2 8 | fi 9 | 10 | npm install 11 | npm install npm-check-updates 12 | 13 | /evething/manage.py migrate --noinput 14 | /evething/import.py 15 | /evething/manage.py createsuperuser 16 | -------------------------------------------------------------------------------- /static/less/font-awesome/bordered-pulled.less: -------------------------------------------------------------------------------- 1 | // Bordered & Pulled 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-border { 5 | padding: .2em .25em .15em; 6 | border: solid .08em @fa-border-color; 7 | border-radius: .1em; 8 | } 9 | 10 | .pull-right { float: right; } 11 | .pull-left { float: left; } 12 | 13 | .@{fa-css-prefix} { 14 | &.pull-left { margin-right: .3em; } 15 | &.pull-right { margin-left: .3em; } 16 | } 17 | -------------------------------------------------------------------------------- /static/less/font-awesome/rotated-flipped.less: -------------------------------------------------------------------------------- 1 | // Rotated & Flipped Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-rotate-90 { .fa-icon-rotate(90deg, 1); } 5 | .@{fa-css-prefix}-rotate-180 { .fa-icon-rotate(180deg, 2); } 6 | .@{fa-css-prefix}-rotate-270 { .fa-icon-rotate(270deg, 3); } 7 | 8 | .@{fa-css-prefix}-flip-horizontal { .fa-icon-flip(-1, 1, 0); } 9 | .@{fa-css-prefix}-flip-vertical { .fa-icon-flip(1, -1, 2); } 10 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/nav-vertical-align.less: -------------------------------------------------------------------------------- 1 | // Navbar vertical align 2 | // 3 | // Vertically center elements in the navbar. 4 | // Example: an element has a height of 30px, so write out `.navbar-vertical-align(30px);` to calculate the appropriate top margin. 5 | 6 | .navbar-vertical-align(@element-height) { 7 | margin-top: ((@navbar-height - @element-height) / 2); 8 | margin-bottom: ((@navbar-height - @element-height) / 2); 9 | } 10 | -------------------------------------------------------------------------------- /templates/500.html: -------------------------------------------------------------------------------- 1 | 3 | 4 | 5 | Page unavailable 6 | 7 | 8 |

Page unavailable

9 | 10 |

Sorry, but the requested page is unavailable due to a 11 | server hiccup.

12 | 13 |

Our engineers have been notified, check back later.

14 | 15 | 16 | -------------------------------------------------------------------------------- /static/less/font-awesome/larger.less: -------------------------------------------------------------------------------- 1 | // Icon Sizes 2 | // ------------------------- 3 | 4 | /* makes the font 33% larger relative to the icon container */ 5 | .@{fa-css-prefix}-lg { 6 | font-size: (4em / 3); 7 | line-height: (3em / 4); 8 | vertical-align: -15%; 9 | } 10 | .@{fa-css-prefix}-2x { font-size: 2em; } 11 | .@{fa-css-prefix}-3x { font-size: 3em; } 12 | .@{fa-css-prefix}-4x { font-size: 4em; } 13 | .@{fa-css-prefix}-5x { font-size: 5em; } 14 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/responsive-visibility.less: -------------------------------------------------------------------------------- 1 | // Responsive utilities 2 | 3 | // 4 | // More easily include all the states for responsive-utilities.less. 5 | .responsive-visibility() { 6 | display: block !important; 7 | table& { display: table; } 8 | tr& { display: table-row !important; } 9 | th&, 10 | td& { display: table-cell !important; } 11 | } 12 | 13 | .responsive-invisibility() { 14 | display: none !important; 15 | } 16 | -------------------------------------------------------------------------------- /static/less/evething/home.less: -------------------------------------------------------------------------------- 1 | /* Home stuff */ 2 | .home-character hr { 3 | margin: 7px -6px 5px; 4 | border-bottom: 1px solid @text-color; 5 | } 6 | .home-notifications { 7 | .margin-half-top; 8 | font-size: 0.9em; 9 | } 10 | .home-group { 11 | .margin-half-bot; 12 | font-size: 110%; 13 | } 14 | span.security-status { 15 | padding-right: 5px; 16 | } 17 | 18 | .progress-bar { 19 | text-shadow: -1px -1px 1px #000,-1px 1px 1px #000,1px -1px 1px #000,1px 1px 1px #000; 20 | } -------------------------------------------------------------------------------- /static/less/font-awesome/list.less: -------------------------------------------------------------------------------- 1 | // List Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-ul { 5 | padding-left: 0; 6 | margin-left: @fa-li-width; 7 | list-style-type: none; 8 | > li { position: relative; } 9 | } 10 | .@{fa-css-prefix}-li { 11 | position: absolute; 12 | left: -@fa-li-width; 13 | width: @fa-li-width; 14 | top: (2em / 14); 15 | text-align: center; 16 | &.@{fa-css-prefix}-lg { 17 | left: -@fa-li-width + (4em / 14); 18 | } 19 | } 20 | -------------------------------------------------------------------------------- /static/less/theme-cyborg/cyborg.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: darken(@alert-warning-bg, 43%); 2 | @etErrorBackground: darken(@alert-danger-bg, 35%); 3 | @etSuccessBackground: darken(@alert-success-bg, 29%); 4 | @etInfoBackground: darken(@alert-info-bg, 40%); 5 | 6 | @etWarningBorder: @alert-warning-border; 7 | @etErrorBorder: @alert-danger-border; 8 | @etSuccessBorder: @alert-success-border; 9 | @etInfoBorder: @alert-info-border; 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /static/less/theme-yeti/yeti.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: lighten(@alert-warning-border, 40%); 2 | @etErrorBackground: lighten(@alert-danger-border, 40%); 3 | @etSuccessBackground: lighten(@alert-success-border, 50%); 4 | @etInfoBackground: lighten(@alert-info-bg, 20%); 5 | 6 | @etWarningBorder: @alert-warning-border; 7 | @etErrorBorder: @alert-danger-border; 8 | @etSuccessBorder: @alert-success-border; 9 | @etInfoBorder: @alert-info-border; 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /static/less/theme-cosmo/cosmo.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: lighten(@alert-warning-border, 45%); 2 | @etErrorBackground: lighten(@alert-danger-border, 50%); 3 | @etSuccessBackground: lighten(@alert-success-border, 50%); 4 | @etInfoBackground: lighten(@alert-info-border, 50%); 5 | 6 | @etWarningBorder: @alert-warning-border; 7 | @etErrorBorder: @alert-danger-border; 8 | @etSuccessBorder: @alert-success-border; 9 | @etInfoBorder: @alert-info-border; 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /static/less/theme-cerulean/cerulean.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: lighten(@alert-warning-border, 45%); 2 | @etErrorBackground: lighten(@alert-danger-border, 50%); 3 | @etSuccessBackground: lighten(@alert-success-border, 50%); 4 | @etInfoBackground: lighten(@alert-info-border, 50%); 5 | 6 | @etWarningBorder: @alert-warning-border; 7 | @etErrorBorder: @alert-danger-border; 8 | @etSuccessBorder: @alert-success-border; 9 | @etInfoBorder: @alert-info-border; 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /static/handlebars/mail_list.handlebars: -------------------------------------------------------------------------------- 1 | 2 | 3 | {{ senderText }} 4 | {{ toText }} 5 | {{ subjectText }} 6 | {{ sent_date }} 7 | 8 | -------------------------------------------------------------------------------- /static/less/theme-slate/slate.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: darken(@alert-warning-bg, 38%); 2 | @etErrorBackground: darken(@alert-danger-bg, 55%); 3 | @etSuccessBackground: darken(@alert-success-bg, 45%); 4 | @etInfoBackground: darken(@alert-info-bg, 40%); 5 | 6 | @etWarningBorder: darken(@alert-warning-border, 20%); 7 | @etErrorBorder: darken(@alert-danger-border, 40%); 8 | @etSuccessBorder: darken(@alert-success-border, 20%); 9 | @etInfoBorder: darken(@alert-info-border, 20%); 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /templates/thing/blueprints_export.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Blueprints: Export{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |

Blueprints Export

9 |
Blueprint,Original,ME,PE
10 | {% for bpi in bpis -%}
11 | {{ bpi.blueprint.name }},{% if bpi.original %}1{% else %}0{% endif %},{{ bpi.material_level }},{{ bpi.productivity_level }}
12 | {%- endfor %}
13 |
14 |
15 | {% endblock %} 16 | -------------------------------------------------------------------------------- /static/less/theme-darkthing/darkthing.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: darken(@alert-warning-bg, 44%); 2 | @etErrorBackground: darken(@alert-danger-bg, 50%); 3 | @etSuccessBackground: darken(@alert-success-bg, 30%); 4 | @etInfoBackground: darken(@alert-info-bg, 40%); 5 | 6 | @etWarningBorder: darken(@alert-warning-border, 30%); 7 | @etErrorBorder: darken(@alert-danger-border, 40%); 8 | @etSuccessBorder: darken(@alert-success-border, 5%); 9 | @etInfoBorder: darken(@alert-info-border, 20%); 10 | 11 | @white: #fff; -------------------------------------------------------------------------------- /thing/tests/views.py: -------------------------------------------------------------------------------- 1 | from django.test import TestCase 2 | from django.test.client import Client 3 | 4 | 5 | class HomeViewsTestCase(TestCase): 6 | fixtures = ['auth_testdata.json'] 7 | 8 | def test_index(self): 9 | c = Client() 10 | 11 | response = c.post('/accounts/login/', {'username': 'test', 'password': 'test'}, follow=True) 12 | self.assertEqual(response.status_code, 200) 13 | 14 | self.assertTrue('characters' in response.context) 15 | self.assertTrue('corporations' in response.context) 16 | -------------------------------------------------------------------------------- /static/less/evething/industry.less: -------------------------------------------------------------------------------- 1 | /* Industry layout */ 2 | td.industry-jobid { 3 | width: 5.5em; 4 | text-align: right; 5 | } 6 | td.industry-level { 7 | width: 2.1em; 8 | text-align: right; 9 | } 10 | td.industry-runs { 11 | width: 3.3em; 12 | text-align: right; 13 | } 14 | td.industry-units { 15 | width: 4.5em; 16 | text-align: right; 17 | } 18 | td.industry-ready { 19 | width: 3em; 20 | text-align: center; 21 | } 22 | td.industry-status { 23 | width: 5em; 24 | } 25 | #settings-status { 26 | padding-top: 12px; 27 | } 28 | -------------------------------------------------------------------------------- /thing/migrations/0002_auto_20160126_1128.py: -------------------------------------------------------------------------------- 1 | # -*- coding: utf-8 -*- 2 | from __future__ import unicode_literals 3 | 4 | from django.db import models, migrations 5 | 6 | 7 | class Migration(migrations.Migration): 8 | 9 | dependencies = [ 10 | ('thing', '0001_initial'), 11 | ] 12 | 13 | operations = [ 14 | migrations.AlterField( 15 | model_name='itemgroup', 16 | name='name', 17 | field=models.CharField(max_length=128), 18 | preserve_default=True, 19 | ), 20 | ] 21 | -------------------------------------------------------------------------------- /evething/celery.py: -------------------------------------------------------------------------------- 1 | from __future__ import absolute_import 2 | 3 | import os 4 | 5 | from celery import Celery 6 | 7 | from django.conf import settings 8 | 9 | # set the default Django settings module for the 'celery' program. 10 | os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'evething.settings') 11 | 12 | app = Celery('evething') 13 | 14 | # Using a string here means the worker will not have to 15 | # pickle the object when using Windows. 16 | app.config_from_object('django.conf:settings') 17 | app.autodiscover_tasks(lambda: settings.INSTALLED_APPS) 18 | -------------------------------------------------------------------------------- /static/less/evething/account.less: -------------------------------------------------------------------------------- 1 | /* account:apikeys */ 2 | td.api-id { 3 | width: 2.7em; 4 | } 5 | td.api-keyid { 6 | width: 4.5em; 7 | } 8 | td.api-valid { 9 | width: 2em; 10 | } 11 | td.api-vcode { 12 | width: 16em; 13 | } 14 | td.api-type { 15 | width: 6.5em; 16 | } 17 | td.api-mask { 18 | width: 6em; 19 | } 20 | td.api-expires { 21 | width: 5.2em; 22 | } 23 | td.api-time { 24 | width: 7em; 25 | } 26 | td.api-icons { 27 | width: 3.5em; 28 | white-space: nowrap; 29 | } 30 | td.api-name .pull-right { 31 | padding: 3px 2px 0 0; 32 | } 33 | -------------------------------------------------------------------------------- /static/less/theme-default/default.less: -------------------------------------------------------------------------------- 1 | @etWarningBackground: lighten(@alert-warning-border, 7%); 2 | @etErrorBackground: lighten(@alert-danger-border, 10%); 3 | @etSuccessBackground: lighten(@alert-success-border, 10%); 4 | @etInfoBackground: @alert-info-border; 5 | 6 | @etWarningBorder: lighten(@alert-warning-text, 10%); 7 | @etErrorBorder: @alert-danger-text; 8 | @etSuccessBorder: @alert-success-text; 9 | @etInfoBorder: @alert-info-text; 10 | 11 | @white: #fff; 12 | 13 | .navbar-default { 14 | .navbar-inverse; 15 | } -------------------------------------------------------------------------------- /static/less/font-awesome/font-awesome.less: -------------------------------------------------------------------------------- 1 | /*! 2 | * Font Awesome 4.1.0 by @davegandy - http://fontawesome.io - @fontawesome 3 | * License - http://fontawesome.io/license (Font: SIL OFL 1.1, CSS: MIT License) 4 | */ 5 | 6 | @import "variables.less"; 7 | @import "mixins.less"; 8 | @import "path.less"; 9 | @import "core.less"; 10 | @import "larger.less"; 11 | @import "fixed-width.less"; 12 | @import "list.less"; 13 | @import "bordered-pulled.less"; 14 | @import "spinning.less"; 15 | @import "rotated-flipped.less"; 16 | @import "stacked.less"; 17 | @import "icons.less"; 18 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/pagination.less: -------------------------------------------------------------------------------- 1 | // Pagination 2 | 3 | .pagination-size(@padding-vertical; @padding-horizontal; @font-size; @border-radius) { 4 | > li { 5 | > a, 6 | > span { 7 | padding: @padding-vertical @padding-horizontal; 8 | font-size: @font-size; 9 | } 10 | &:first-child { 11 | > a, 12 | > span { 13 | .border-left-radius(@border-radius); 14 | } 15 | } 16 | &:last-child { 17 | > a, 18 | > span { 19 | .border-right-radius(@border-radius); 20 | } 21 | } 22 | } 23 | } 24 | -------------------------------------------------------------------------------- /thing/views/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | 3 | from thing.views.home import * 4 | 5 | from thing.views.account import * 6 | from thing.views.assets import * 7 | from thing.views.blueprints import * 8 | from thing.views.character import * 9 | from thing.views.contracts import * 10 | from thing.views.events import * 11 | from thing.views.industry import * 12 | from thing.views.mail import * 13 | from thing.views.orders import * 14 | from thing.views.trade import * 15 | from thing.views.transactions import * 16 | from thing.views.wallet_journal import * 17 | from thing.views.pi import * -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/border-radius.less: -------------------------------------------------------------------------------- 1 | // Single side border-radius 2 | 3 | .border-top-radius(@radius) { 4 | border-top-right-radius: @radius; 5 | border-top-left-radius: @radius; 6 | } 7 | .border-right-radius(@radius) { 8 | border-bottom-right-radius: @radius; 9 | border-top-right-radius: @radius; 10 | } 11 | .border-bottom-radius(@radius) { 12 | border-bottom-right-radius: @radius; 13 | border-bottom-left-radius: @radius; 14 | } 15 | .border-left-radius(@radius) { 16 | border-bottom-left-radius: @radius; 17 | border-top-left-radius: @radius; 18 | } 19 | -------------------------------------------------------------------------------- /thing/media/thing.js: -------------------------------------------------------------------------------- 1 | $.tablesorter.addParser({ 2 | id: 'human', 3 | is: function (s) { 4 | return (/^[0-9.]+[KMB]?$/).test(s); 5 | }, 6 | format: function (s) { 7 | var l = s.length - 1, 8 | c = s.charAt(l); 9 | if (c == 'K') { 10 | return s.substr(0, l) * 1000; 11 | } else if (c == 'M') { 12 | return s.substr(0, l) * 1000000; 13 | } else if (c == 'B') { 14 | return s.substr(0, l) * 1000000000; 15 | } 16 | 17 | return s; 18 | }, 19 | type: 'numeric' 20 | }); 21 | -------------------------------------------------------------------------------- /static/js/evething/pi.js: -------------------------------------------------------------------------------- 1 | EVEthing.pi = { 2 | onload: function () { 3 | $('.pi-sidenav').affix({offset: EVEthing.pi.side_offset}); 4 | }, 5 | // Magic object with a function to calculate the sidenav offset 6 | side_offset: { 7 | top: function () { 8 | var window_h = window.innerHeight, 9 | sidenav_h = $('#sidenav').height(); 10 | 11 | if (window_h >= (sidenav_h + 75)) { 12 | return $('#sidenav-container').offset().top - 50; 13 | } 14 | return 999999; 15 | } 16 | } 17 | }; 18 | -------------------------------------------------------------------------------- /static/less/font-awesome/stacked.less: -------------------------------------------------------------------------------- 1 | // Stacked Icons 2 | // ------------------------- 3 | 4 | .@{fa-css-prefix}-stack { 5 | position: relative; 6 | display: inline-block; 7 | width: 2em; 8 | height: 2em; 9 | line-height: 2em; 10 | vertical-align: middle; 11 | } 12 | .@{fa-css-prefix}-stack-1x, .@{fa-css-prefix}-stack-2x { 13 | position: absolute; 14 | left: 0; 15 | width: 100%; 16 | text-align: center; 17 | } 18 | .@{fa-css-prefix}-stack-1x { line-height: inherit; } 19 | .@{fa-css-prefix}-stack-2x { font-size: 2em; } 20 | .@{fa-css-prefix}-inverse { color: @fa-inverse; } 21 | -------------------------------------------------------------------------------- /static/less/evething/walletjournal.less: -------------------------------------------------------------------------------- 1 | /* Wallet Journal layout */ 2 | td.journal-owner { 3 | width: 22em; 4 | } 5 | td.journal-date { 6 | text-align: center; 7 | width: 8.5em; 8 | } 9 | td.journal-amount { 10 | text-align: right; 11 | width: 8.5em; 12 | } 13 | td.journal-balance { 14 | text-align: right; 15 | width: 10em; 16 | } 17 | 18 | /* wallet journal aggregate layout */ 19 | .wja-date { 20 | text-align: center !important; 21 | width: 5em; 22 | } 23 | .wja-entries { 24 | text-align: right !important; 25 | width: 4em; 26 | } 27 | .wja-amount { 28 | text-align: right !important; 29 | width: 9em; 30 | } 31 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/panels.less: -------------------------------------------------------------------------------- 1 | // Panels 2 | 3 | .panel-variant(@border; @heading-text-color; @heading-bg-color; @heading-border) { 4 | border-color: @border; 5 | 6 | & > .panel-heading { 7 | color: @heading-text-color; 8 | background-color: @heading-bg-color; 9 | border-color: @heading-border; 10 | 11 | + .panel-collapse > .panel-body { 12 | border-top-color: @border; 13 | } 14 | .badge { 15 | color: @heading-bg-color; 16 | background-color: @heading-text-color; 17 | } 18 | } 19 | & > .panel-footer { 20 | + .panel-collapse > .panel-body { 21 | border-bottom-color: @border; 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /static/less/bootstrap/wells.less: -------------------------------------------------------------------------------- 1 | // 2 | // Wells 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .well { 8 | min-height: 20px; 9 | padding: 19px; 10 | margin-bottom: 20px; 11 | background-color: @well-bg; 12 | border: 1px solid @well-border; 13 | border-radius: @border-radius-base; 14 | .box-shadow(inset 0 1px 1px rgba(0,0,0,.05)); 15 | blockquote { 16 | border-color: #ddd; 17 | border-color: rgba(0,0,0,.15); 18 | } 19 | } 20 | 21 | // Sizes 22 | .well-lg { 23 | padding: 24px; 24 | border-radius: @border-radius-large; 25 | } 26 | .well-sm { 27 | padding: 9px; 28 | border-radius: @border-radius-small; 29 | } 30 | -------------------------------------------------------------------------------- /manage.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/env python 2 | 3 | import os 4 | import sys 5 | 6 | # Enforce Django 1.5 7 | from django import get_version 8 | if get_version() < '1.5': 9 | print 10 | print 'ERROR: EVEthing requires Django version 1.5 or above!' 11 | print 12 | sys.exit(1) 13 | 14 | # try using cdecimal for faster Decimal type 15 | try: 16 | import cdecimal 17 | except ImportError: 18 | pass 19 | else: 20 | sys.modules["decimal"] = cdecimal 21 | 22 | if __name__ == "__main__": 23 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") 24 | 25 | from django.core.management import execute_from_command_line 26 | 27 | execute_from_command_line(sys.argv) 28 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/list-group.less: -------------------------------------------------------------------------------- 1 | // List Groups 2 | 3 | .list-group-item-variant(@state; @background; @color) { 4 | .list-group-item-@{state} { 5 | color: @color; 6 | background-color: @background; 7 | 8 | a& { 9 | color: @color; 10 | 11 | .list-group-item-heading { 12 | color: inherit; 13 | } 14 | 15 | &:hover, 16 | &:focus { 17 | color: @color; 18 | background-color: darken(@background, 5%); 19 | } 20 | &.active, 21 | &.active:hover, 22 | &.active:focus { 23 | color: #fff; 24 | background-color: @color; 25 | border-color: @color; 26 | } 27 | } 28 | } 29 | } 30 | -------------------------------------------------------------------------------- /thing/fixtures/auth_testdata.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "pk": 1, 4 | "model": "auth.user", 5 | "fields": { 6 | "username": "test", 7 | "first_name": "", 8 | "last_name": "", 9 | "is_active": true, 10 | "is_superuser": false, 11 | "is_staff": false, 12 | "last_login": "2012-12-25T16:53:52.564", 13 | "groups": [], 14 | "user_permissions": [], 15 | "password": "pbkdf2_sha256$10000$uOcJOahQSEVy$YIWgOITLl/htGnPusEA8fjyDIfBox4T78SnoxXzVLeA=", 16 | "email": "test@example.com", 17 | "date_joined": "2012-12-25T16:53:30.485" 18 | } 19 | } 20 | ] -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/hide-text.less: -------------------------------------------------------------------------------- 1 | // CSS image replacement 2 | // 3 | // Heads up! v3 launched with with only `.hide-text()`, but per our pattern for 4 | // mixins being reused as classes with the same name, this doesn't hold up. As 5 | // of v3.0.1 we have added `.text-hide()` and deprecated `.hide-text()`. 6 | // 7 | // Source: https://github.com/h5bp/html5-boilerplate/commit/aa0396eae757 8 | 9 | // Deprecated as of v3.0.1 (will be removed in v4) 10 | .hide-text() { 11 | font: ~"0/0" a; 12 | color: transparent; 13 | text-shadow: none; 14 | background-color: transparent; 15 | border: 0; 16 | } 17 | 18 | // New mixin to use as of v3.0.1 19 | .text-hide() { 20 | .hide-text(); 21 | } 22 | -------------------------------------------------------------------------------- /static/js/evething/transactions.js: -------------------------------------------------------------------------------- 1 | EVEthing.transactions = { 2 | onload: function () { 3 | // Add query string to pagination links 4 | $('a').each(function () { 5 | var href = $(this).attr('href'); 6 | if (href !== undefined && href.substr(0, 5) === '?page') { 7 | var params = parseQueryString(); 8 | params.page = href.split(/=/)[1]; 9 | $(this).attr('href', '?' + $.param(params)); 10 | } 11 | }); 12 | 13 | // Bind filter events 14 | EVEthing.filters.bind_events(); 15 | 16 | // Load filters 17 | EVEthing.filters.load_filters(EVEthing.transactions.filters); 18 | } 19 | }; 20 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/clearfix.less: -------------------------------------------------------------------------------- 1 | // Clearfix 2 | // 3 | // For modern browsers 4 | // 1. The space content is one way to avoid an Opera bug when the 5 | // contenteditable attribute is included anywhere else in the document. 6 | // Otherwise it causes space to appear at the top and bottom of elements 7 | // that are clearfixed. 8 | // 2. The use of `table` rather than `block` is only necessary if using 9 | // `:before` to contain the top-margins of child elements. 10 | // 11 | // Source: http://nicolasgallagher.com/micro-clearfix-hack/ 12 | 13 | .clearfix() { 14 | &:before, 15 | &:after { 16 | content: " "; // 1 17 | display: table; // 2 18 | } 19 | &:after { 20 | clear: both; 21 | } 22 | } 23 | -------------------------------------------------------------------------------- /static/less/bootstrap/breadcrumbs.less: -------------------------------------------------------------------------------- 1 | // 2 | // Breadcrumbs 3 | // -------------------------------------------------- 4 | 5 | 6 | .breadcrumb { 7 | padding: @breadcrumb-padding-vertical @breadcrumb-padding-horizontal; 8 | margin-bottom: @line-height-computed; 9 | list-style: none; 10 | background-color: @breadcrumb-bg; 11 | border-radius: @border-radius-base; 12 | 13 | > li { 14 | display: inline-block; 15 | 16 | + li:before { 17 | content: "@{breadcrumb-separator}\00a0"; // Unicode space added since inline-block means non-collapsing white-space 18 | padding: 0 5px; 19 | color: @breadcrumb-color; 20 | } 21 | } 22 | 23 | > .active { 24 | color: @breadcrumb-active-color; 25 | } 26 | } 27 | -------------------------------------------------------------------------------- /static/less/bootstrap/responsive-embed.less: -------------------------------------------------------------------------------- 1 | // Embeds responsive 2 | // 3 | // Credit: Nicolas Gallagher and SUIT CSS. 4 | 5 | .embed-responsive { 6 | position: relative; 7 | display: block; 8 | height: 0; 9 | padding: 0; 10 | overflow: hidden; 11 | 12 | .embed-responsive-item, 13 | iframe, 14 | embed, 15 | object { 16 | position: absolute; 17 | top: 0; 18 | left: 0; 19 | bottom: 0; 20 | height: 100%; 21 | width: 100%; 22 | border: 0; 23 | } 24 | 25 | // Modifier class for 16:9 aspect ratio 26 | &.embed-responsive-16by9 { 27 | padding-bottom: 56.25%; 28 | } 29 | 30 | // Modifier class for 4:3 aspect ratio 31 | &.embed-responsive-4by3 { 32 | padding-bottom: 75%; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/less/bootstrap/component-animations.less: -------------------------------------------------------------------------------- 1 | // 2 | // Component animations 3 | // -------------------------------------------------- 4 | 5 | // Heads up! 6 | // 7 | // We don't use the `.opacity()` mixin here since it causes a bug with text 8 | // fields in IE7-8. Source: https://github.com/twbs/bootstrap/pull/3552. 9 | 10 | .fade { 11 | opacity: 0; 12 | .transition(opacity .15s linear); 13 | &.in { 14 | opacity: 1; 15 | } 16 | } 17 | 18 | .collapse { 19 | display: none; 20 | 21 | &.in { display: block; } 22 | tr&.in { display: table-row; } 23 | tbody&.in { display: table-row-group; } 24 | } 25 | 26 | .collapsing { 27 | position: relative; 28 | height: 0; 29 | overflow: hidden; 30 | .transition(height .35s ease); 31 | } 32 | -------------------------------------------------------------------------------- /static/less/font-awesome/path.less: -------------------------------------------------------------------------------- 1 | /* FONT PATH 2 | * -------------------------- */ 3 | 4 | @font-face { 5 | font-family: 'FontAwesome'; 6 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?v=@{fa-version}')"; 7 | src: ~"url('@{fa-font-path}/fontawesome-webfont.eot?#iefix&v=@{fa-version}') format('embedded-opentype')", 8 | ~"url('@{fa-font-path}/fontawesome-webfont.woff?v=@{fa-version}') format('woff')", 9 | ~"url('@{fa-font-path}/fontawesome-webfont.ttf?v=@{fa-version}') format('truetype')", 10 | ~"url('@{fa-font-path}/fontawesome-webfont.svg?v=@{fa-version}#fontawesomeregular') format('svg')"; 11 | // src: url('@{fa-font-path}/FontAwesome.otf') format('opentype'); // used when developing fonts 12 | font-weight: normal; 13 | font-style: normal; 14 | } 15 | -------------------------------------------------------------------------------- /static/less/font-awesome/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------- 3 | 4 | .fa-icon-rotate(@degrees, @rotation) { 5 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation); 6 | -webkit-transform: rotate(@degrees); 7 | -moz-transform: rotate(@degrees); 8 | -ms-transform: rotate(@degrees); 9 | -o-transform: rotate(@degrees); 10 | transform: rotate(@degrees); 11 | } 12 | 13 | .fa-icon-flip(@horiz, @vert, @rotation) { 14 | filter: progid:DXImageTransform.Microsoft.BasicImage(rotation=@rotation, mirror=1); 15 | -webkit-transform: scale(@horiz, @vert); 16 | -moz-transform: scale(@horiz, @vert); 17 | -ms-transform: scale(@horiz, @vert); 18 | -o-transform: scale(@horiz, @vert); 19 | transform: scale(@horiz, @vert); 20 | } 21 | -------------------------------------------------------------------------------- /static/less/bootstrap/close.less: -------------------------------------------------------------------------------- 1 | // 2 | // Close icons 3 | // -------------------------------------------------- 4 | 5 | 6 | .close { 7 | float: right; 8 | font-size: (@font-size-base * 1.5); 9 | font-weight: @close-font-weight; 10 | line-height: 1; 11 | color: @close-color; 12 | text-shadow: @close-text-shadow; 13 | .opacity(.2); 14 | 15 | &:hover, 16 | &:focus { 17 | color: @close-color; 18 | text-decoration: none; 19 | cursor: pointer; 20 | .opacity(.5); 21 | } 22 | 23 | // Additional properties for button version 24 | // iOS requires the button element instead of an anchor tag. 25 | // If you want the anchor version, it requires `href="#"`. 26 | button& { 27 | padding: 0; 28 | cursor: pointer; 29 | background: transparent; 30 | border: 0; 31 | -webkit-appearance: none; 32 | } 33 | } 34 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/table-row.less: -------------------------------------------------------------------------------- 1 | // Tables 2 | 3 | .table-row-variant(@state; @background) { 4 | // Exact selectors below required to override `.table-striped` and prevent 5 | // inheritance to nested tables. 6 | .table > thead > tr, 7 | .table > tbody > tr, 8 | .table > tfoot > tr { 9 | > td.@{state}, 10 | > th.@{state}, 11 | &.@{state} > td, 12 | &.@{state} > th { 13 | background-color: @background; 14 | } 15 | } 16 | 17 | // Hover states for `.table-hover` 18 | // Note: this is not available for cells or rows within `thead` or `tfoot`. 19 | .table-hover > tbody > tr { 20 | > td.@{state}:hover, 21 | > th.@{state}:hover, 22 | &.@{state}:hover > td, 23 | &:hover > .@{state}, 24 | &.@{state}:hover > th { 25 | background-color: darken(@background, 5%); 26 | } 27 | } 28 | } 29 | -------------------------------------------------------------------------------- /static/less/font-awesome/spinning.less: -------------------------------------------------------------------------------- 1 | // Spinning Icons 2 | // -------------------------- 3 | 4 | .@{fa-css-prefix}-spin { 5 | -webkit-animation: spin 2s infinite linear; 6 | -moz-animation: spin 2s infinite linear; 7 | -o-animation: spin 2s infinite linear; 8 | animation: spin 2s infinite linear; 9 | } 10 | 11 | @-moz-keyframes spin { 12 | 0% { -moz-transform: rotate(0deg); } 13 | 100% { -moz-transform: rotate(359deg); } 14 | } 15 | @-webkit-keyframes spin { 16 | 0% { -webkit-transform: rotate(0deg); } 17 | 100% { -webkit-transform: rotate(359deg); } 18 | } 19 | @-o-keyframes spin { 20 | 0% { -o-transform: rotate(0deg); } 21 | 100% { -o-transform: rotate(359deg); } 22 | } 23 | @keyframes spin { 24 | 0% { 25 | -webkit-transform: rotate(0deg); 26 | transform: rotate(0deg); 27 | } 28 | 100% { 29 | -webkit-transform: rotate(359deg); 30 | transform: rotate(359deg); 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /static/less/bootstrap/thumbnails.less: -------------------------------------------------------------------------------- 1 | // 2 | // Thumbnails 3 | // -------------------------------------------------- 4 | 5 | 6 | // Mixin and adjust the regular image class 7 | .thumbnail { 8 | display: block; 9 | padding: @thumbnail-padding; 10 | margin-bottom: @line-height-computed; 11 | line-height: @line-height-base; 12 | background-color: @thumbnail-bg; 13 | border: 1px solid @thumbnail-border; 14 | border-radius: @thumbnail-border-radius; 15 | .transition(all .2s ease-in-out); 16 | 17 | > img, 18 | a > img { 19 | &:extend(.img-responsive); 20 | margin-left: auto; 21 | margin-right: auto; 22 | } 23 | 24 | // Add a hover state for linked versions only 25 | a&:hover, 26 | a&:focus, 27 | a&.active { 28 | border-color: @link-color; 29 | } 30 | 31 | // Image captions 32 | .caption { 33 | padding: @thumbnail-caption-padding; 34 | color: @thumbnail-caption-color; 35 | } 36 | } 37 | -------------------------------------------------------------------------------- /static/less/evething.less: -------------------------------------------------------------------------------- 1 | @import 'evething/base.less'; 2 | @import 'evething/bootstrap.less'; 3 | 4 | @import 'evething/misc.less'; 5 | @import 'evething/tablesorter.less'; 6 | 7 | @import 'evething/account.less'; 8 | @import 'evething/assets.less'; 9 | @import 'evething/character.less'; 10 | @import 'evething/contracts.less'; 11 | @import 'evething/home.less'; 12 | @import 'evething/industry.less'; 13 | @import 'evething/mail.less'; 14 | @import 'evething/skillplan.less'; 15 | @import 'evething/walletjournal.less'; 16 | 17 | /* 18 | @etWarningBackground: lighten(@warningText, 40%); 19 | @etErrorBackground: lighten(@errorText, 40%); 20 | @etSuccessBackground: lighten(@successText, 40%); 21 | @etInfoBackground: lighten(@infoText, 40%); 22 | 23 | @etWarningBorder: @warningBackground; 24 | @etErrorBorder: @errorBackground; 25 | @etSuccessBorder: @successBackground; 26 | @etInfoBorder: @infoBackground; 27 | */ 28 | -------------------------------------------------------------------------------- /templates/thing/blueprints_import.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Blueprints: Import{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |

Blueprints Import

9 | 10 | {% if message -%} 11 |
12 | {{ message_type|capitalize }}: {{ message }} 13 |
14 | {%- endif %} 15 | 16 |
17 | {{ csrf() }} 18 |
19 | 20 |
21 |
22 | 23 |
24 |
25 |
26 |
27 |
28 | {% endblock %} 29 | -------------------------------------------------------------------------------- /templates/includes/assets_filters.html: -------------------------------------------------------------------------------- 1 |
2 |
3 |
4 | Filters 5 |
6 |

7 | Apply filters to the results here. Filters of different types are queried using AND while filters of 8 | the same type are queried using OR, for example "Character == Bob, Item == Pants, Item == Hats" will 9 | turn into something like "WHERE Character == Bob AND (Item == Pants OR Item == Hats)". 10 |

11 |
12 |
13 | 14 | Clear filters 15 |
16 |
17 | -------------------------------------------------------------------------------- /static/js/evething/wallet_journal.js: -------------------------------------------------------------------------------- 1 | EVEthing.wallet_journal = { 2 | onload: function () { 3 | // Add query string to pagination links 4 | $('a').each(function () { 5 | var href = $(this).attr('href'); 6 | if (href !== undefined && href.substr(0, 5) === '?page') { 7 | var params = parseQueryString(); 8 | params.page = href.split(/=/)[1]; 9 | $(this).attr('href', '?' + $.param(params)); 10 | } 11 | }); 12 | 13 | // Bind filter events 14 | EVEthing.filters.bind_events(); 15 | 16 | // Load filters 17 | EVEthing.filters.load_filters(EVEthing.wallet_journal.filters); 18 | 19 | // Bind aggregate button 20 | $('#aggregate-form').submit(function () { 21 | var action = $(this).attr('action'); 22 | var data = $('#filter-form, #aggregate-form').serialize(); 23 | window.location.href = action + '?' + data; 24 | return false; 25 | }); 26 | } 27 | }; 28 | -------------------------------------------------------------------------------- /static/less/evething/mail.less: -------------------------------------------------------------------------------- 1 | 2 | /* mail */ 3 | .mail-list { 4 | min-height: 200px; 5 | max-height: 200px; 6 | overflow: auto; 7 | } 8 | .mail-message { 9 | margin-top: 10px; 10 | min-height: 200px; 11 | max-height: 200px; 12 | overflow: auto; 13 | border: 1px solid @table-border-color; 14 | padding-left: 0; 15 | padding-right: 0; 16 | } 17 | .mail-message-heading { 18 | text-align: right !important; 19 | font-weight: bold; 20 | width: 6em; 21 | } 22 | .mail-side { 23 | .mail-read { 24 | margin-bottom: 10px; 25 | } 26 | } 27 | #mail-list-table { 28 | .mail-checkbox { 29 | width: 1em; 30 | 31 | input { 32 | margin: 0 0 4px 0; 33 | } 34 | } 35 | .mail-from { 36 | width: 14em; 37 | } 38 | .mail-to { 39 | width: 16em; 40 | } 41 | .mail-date { 42 | width: 9em; 43 | text-align: center; 44 | } 45 | } 46 | #mail-mark-read-button { 47 | width: 100%; 48 | margin-bottom: 10px; 49 | } 50 | #mail-message-table { 51 | tbody > tr:nth-child(1) > td { 52 | border-top: 0; 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /static/less/evething/base.less: -------------------------------------------------------------------------------- 1 | /* Base styles, mostly used by base.html */ 2 | html, body { 3 | height: 100%; 4 | } 5 | 6 | /* wrapper for page content to push down footer */ 7 | #wrap { 8 | min-height: 100%; 9 | height: auto !important; 10 | height: 100%; 11 | margin: 0 auto -40px; 12 | } 13 | #wrap > .container-fluid { 14 | padding-top: @navbar-height; 15 | padding-bottom: 5px; 16 | } 17 | @media (max-width: 767px) { 18 | #wrap > .container-fluid { 19 | //padding-top: 0px; 20 | } 21 | } 22 | .anchor { 23 | padding-top: 50px; 24 | margin-top: -50px; 25 | } 26 | 27 | /* footer */ 28 | #footer, #push { 29 | height: 40px; 30 | } 31 | #footer { 32 | background-color: @navbar-default-bg; 33 | color: @navbar-default-color; 34 | } 35 | #footer > .container-fluid { 36 | padding-top: 8px; 37 | } 38 | 39 | /* navbar mail/server status icons */ 40 | .navbar-mail, .navbar-server-status { 41 | color: lighten(@navbar-default-color, 20%); 42 | 43 | i { 44 | font-size: 125%; 45 | } 46 | } 47 | .navbar-server-status { 48 | padding-right: 10px; 49 | } 50 | -------------------------------------------------------------------------------- /static/less/evething/bootstrap.less: -------------------------------------------------------------------------------- 1 | /* Override Bootstrap styles */ 2 | .table-condensed th, .table-condensed td { 3 | padding: 3px 4px; 4 | } 5 | .well-info { 6 | margin-bottom: 1em; 7 | } 8 | .well-small .progress { 9 | margin-bottom: 2px; 10 | } 11 | .modal-footer { 12 | padding: 8px 9px 9px; 13 | } 14 | .form-horizontal .control-group { 15 | margin-bottom: 8px; 16 | } 17 | legend { 18 | margin-bottom: 0; 19 | } 20 | .nav-list .divider { 21 | margin: 4px -15px; 22 | } 23 | .nav-list > li > a, 24 | .nav-list .nav-header { 25 | text-shadow: none; 26 | } 27 | .nav-list > li > a:hover { 28 | text-decoration: none; 29 | //background-color: @tableBackgroundHover; 30 | } 31 | 32 | .progress { 33 | .bar { 34 | text-shadow: 35 | -1px -1px 1px black, 36 | -1px 1px 1px black, 37 | 1px -1px 1px black, 38 | 1px 1px 1px black; 39 | } 40 | } 41 | 42 | 43 | /* Strangely missing Bootstrap styles */ 44 | .alert-warn { 45 | background-color: @alert-warning-bg; 46 | border-color: @alert-warning-border; 47 | color: @alert-warning-text; 48 | } 49 | -------------------------------------------------------------------------------- /static/less/bootstrap/utilities.less: -------------------------------------------------------------------------------- 1 | // 2 | // Utility classes 3 | // -------------------------------------------------- 4 | 5 | 6 | // Floats 7 | // ------------------------- 8 | 9 | .clearfix { 10 | .clearfix(); 11 | } 12 | .center-block { 13 | .center-block(); 14 | } 15 | .pull-right { 16 | float: right !important; 17 | } 18 | .pull-left { 19 | float: left !important; 20 | } 21 | 22 | 23 | // Toggling content 24 | // ------------------------- 25 | 26 | // Note: Deprecated .hide in favor of .hidden or .sr-only (as appropriate) in v3.0.1 27 | .hide { 28 | display: none !important; 29 | } 30 | .show { 31 | display: block !important; 32 | } 33 | .invisible { 34 | visibility: hidden; 35 | } 36 | .text-hide { 37 | .text-hide(); 38 | } 39 | 40 | 41 | // Hide from screenreaders and browsers 42 | // 43 | // Credit: HTML5 Boilerplate 44 | 45 | .hidden { 46 | display: none !important; 47 | visibility: hidden !important; 48 | } 49 | 50 | 51 | // For Affix plugin 52 | // ------------------------- 53 | 54 | .affix { 55 | position: fixed; 56 | .translate3d(0, 0, 0); 57 | } 58 | -------------------------------------------------------------------------------- /static/less/bootstrap/media.less: -------------------------------------------------------------------------------- 1 | // Media objects 2 | // Source: http://stubbornella.org/content/?p=497 3 | // -------------------------------------------------- 4 | 5 | 6 | // Common styles 7 | // ------------------------- 8 | 9 | // Clear the floats 10 | .media, 11 | .media-body { 12 | overflow: hidden; 13 | zoom: 1; 14 | } 15 | 16 | // Proper spacing between instances of .media 17 | .media, 18 | .media .media { 19 | margin-top: 15px; 20 | } 21 | .media:first-child { 22 | margin-top: 0; 23 | } 24 | 25 | // For images and videos, set to block 26 | .media-object { 27 | display: block; 28 | } 29 | 30 | // Reset margins on headings for tighter default spacing 31 | .media-heading { 32 | margin: 0 0 5px; 33 | } 34 | 35 | 36 | // Media image alignment 37 | // ------------------------- 38 | 39 | .media { 40 | > .pull-left { 41 | margin-right: 10px; 42 | } 43 | > .pull-right { 44 | margin-left: 10px; 45 | } 46 | } 47 | 48 | 49 | // Media list variation 50 | // ------------------------- 51 | 52 | // Undo default ul/ol styles 53 | .media-list { 54 | padding-left: 0; 55 | list-style: none; 56 | } 57 | -------------------------------------------------------------------------------- /static/less/bootstrap/pager.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pager pagination 3 | // -------------------------------------------------- 4 | 5 | 6 | .pager { 7 | padding-left: 0; 8 | margin: @line-height-computed 0; 9 | list-style: none; 10 | text-align: center; 11 | &:extend(.clearfix all); 12 | li { 13 | display: inline; 14 | > a, 15 | > span { 16 | display: inline-block; 17 | padding: 5px 14px; 18 | background-color: @pager-bg; 19 | border: 1px solid @pager-border; 20 | border-radius: @pager-border-radius; 21 | } 22 | 23 | > a:hover, 24 | > a:focus { 25 | text-decoration: none; 26 | background-color: @pager-hover-bg; 27 | } 28 | } 29 | 30 | .next { 31 | > a, 32 | > span { 33 | float: right; 34 | } 35 | } 36 | 37 | .previous { 38 | > a, 39 | > span { 40 | float: left; 41 | } 42 | } 43 | 44 | .disabled { 45 | > a, 46 | > a:hover, 47 | > a:focus, 48 | > span { 49 | color: @pager-disabled-color; 50 | background-color: @pager-bg; 51 | cursor: not-allowed; 52 | } 53 | } 54 | 55 | } 56 | -------------------------------------------------------------------------------- /templates/macros/common.html: -------------------------------------------------------------------------------- 1 | {% macro skill_hover(skill, level='', extra_class='') -%} 2 | {{ skill.item.name }}{% if level %} {{ level|roman }}{% endif %} 3 | {%- endmacro %} 4 | 5 | {% macro span(text, span_class='') -%} 6 | {% if span_class -%} 7 | {{ text }} 8 | {%- else -%} 9 | {{ text }} 10 | {%- endif %} 11 | {%- endmacro %} 12 | 13 | {% macro security_hover(security, round=2) -%} 14 | {{ security|round(round) }} 15 | {%- endmacro %} 16 | -------------------------------------------------------------------------------- /templates/macros/icons.html: -------------------------------------------------------------------------------- 1 | {% macro player(mine=False) -%} 2 | 3 | {%- endmacro %} 4 | 5 | {% macro corporation() -%} 6 | 7 | {%- endmacro %} 8 | 9 | {% macro alliance() -%} 10 | 11 | {%- endmacro %} 12 | 13 | {% macro success_fail(success=True) -%} 14 | 15 | {%- endmacro %} 16 | 17 | {% macro contract_status(status) -%} 18 | {%- if status.startswith('Completed') -%} 19 | 20 | {%- elif status == 'InProgress' -%} 21 | 22 | {%- elif status in ('Cancelled', 'Deleted', 'Failed', 'Rejected') -%} 23 | 24 | {%- elif status == 'Outstanding' -%} 25 | 26 | {%- else -%} 27 | 28 | {%- endif -%} 29 | {%- endmacro %} 30 | 31 | {% macro close_modal() -%} 32 | 33 | {%- endmacro %} -------------------------------------------------------------------------------- /static/less/bootstrap/jumbotron.less: -------------------------------------------------------------------------------- 1 | // 2 | // Jumbotron 3 | // -------------------------------------------------- 4 | 5 | 6 | .jumbotron { 7 | padding: @jumbotron-padding; 8 | margin-bottom: @jumbotron-padding; 9 | color: @jumbotron-color; 10 | background-color: @jumbotron-bg; 11 | 12 | h1, 13 | .h1 { 14 | color: @jumbotron-heading-color; 15 | } 16 | p { 17 | margin-bottom: (@jumbotron-padding / 2); 18 | font-size: @jumbotron-font-size; 19 | font-weight: 200; 20 | } 21 | 22 | > hr { 23 | border-top-color: darken(@jumbotron-bg, 10%); 24 | } 25 | 26 | .container & { 27 | border-radius: @border-radius-large; // Only round corners at higher resolutions if contained in a container 28 | } 29 | 30 | .container { 31 | max-width: 100%; 32 | } 33 | 34 | @media screen and (min-width: @screen-sm-min) { 35 | padding-top: (@jumbotron-padding * 1.6); 36 | padding-bottom: (@jumbotron-padding * 1.6); 37 | 38 | .container & { 39 | padding-left: (@jumbotron-padding * 2); 40 | padding-right: (@jumbotron-padding * 2); 41 | } 42 | 43 | h1, 44 | .h1 { 45 | font-size: (@font-size-base * 4.5); 46 | } 47 | } 48 | } 49 | -------------------------------------------------------------------------------- /docker/Dockerfile-prod: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM ubuntu:14.04 3 | 4 | MAINTAINER Eric Gillingham "Gillingham@bikezen.net" 5 | 6 | # Setup unprivileged user 7 | RUN adduser --disabled-password --gecos '' evething && \ 8 | mkdir /evething-env && \ 9 | mkdir /evething && \ 10 | chown evething /evething-env && \ 11 | chown evething /evething 12 | 13 | # Install. 14 | RUN apt-get update && \ 15 | apt-get install -y python2.7 python2.7-dev python-virtualenv python-pip \ 16 | libpq-dev \ 17 | build-essential wget 18 | 19 | USER evething 20 | WORKDIR /evething 21 | 22 | COPY requirements.txt /evething/ 23 | COPY docker/requirements-docker.txt docker/requirements-docker-prod.txt /evething/docker/ 24 | 25 | VOLUME /evething 26 | 27 | # Install python deps into virtualenv, and activate at login 28 | RUN /usr/bin/virtualenv /evething-env && \ 29 | . /evething-env/bin/activate && \ 30 | pip install -r requirements.txt -r docker/requirements-docker.txt -r docker/requirements-docker-prod.txt && \ 31 | echo '. /evething-env/bin/activate' >> $HOME/.bashrc 32 | 33 | # Define default command, this gets overwritten by docker-compose 34 | CMD ["/evething/docker/gunicorn.sh"] 35 | -------------------------------------------------------------------------------- /docker-compose.yml: -------------------------------------------------------------------------------- 1 | # database container 2 | db: 3 | image: postgres:latest 4 | environment: 5 | POSTGRES_USER: evething 6 | POSTGRES_PASSWORD: evething 7 | # Expose for debugging/remote connection 8 | ports: 9 | - "5432:5432" 10 | # redis container 11 | redis: 12 | image: redis:latest 13 | # Expose redis port 14 | ports: 15 | - "6379:6379" 16 | # container with Django dev server 17 | django: 18 | build: . 19 | user: evething 20 | dockerfile: docker/Dockerfile-dev 21 | command: bash -c ". /evething-env/bin/activate && /evething/manage.py runserver 0.0.0.0:8000" 22 | volumes: 23 | - .:/evething # mount current directory inside container 24 | ports: 25 | - "8000:8000" 26 | links: 27 | - db:db 28 | - redis:redis 29 | environment: 30 | - PYTHONUNBUFFERED=1 31 | # container with celery worker 32 | celery: 33 | image: evething_django 34 | user: evething 35 | command: bash -c ". /evething-env/bin/activate && celery worker -A evething -B -Q et_high,et_medium,et_low -c 2" 36 | volumes_from: 37 | - django 38 | links: 39 | - db:db 40 | - redis:redis 41 | environment: 42 | - PYTHONUNBUFFERED=1 43 | -------------------------------------------------------------------------------- /docker/nginx.conf: -------------------------------------------------------------------------------- 1 | daemon off; 2 | worker_processes 4; 3 | 4 | events { worker_connections 1024; } 5 | 6 | http { 7 | include mime.types; 8 | 9 | gzip on; 10 | gzip_http_version 1.0; 11 | gzip_proxied any; 12 | gzip_min_length 500; 13 | gzip_disable "MSIE [1-6]\."; 14 | gzip_types text/plain text/xml text/css 15 | text/comma-separated-values 16 | text/javascript 17 | application/x-javascript 18 | application/atom+xml; 19 | 20 | upstream evething { 21 | server django:8000 fail_timeout=30s; 22 | } 23 | 24 | server { 25 | listen 80; 26 | 27 | location /static/ { 28 | alias /evething/static-dist/; 29 | } 30 | 31 | location / { 32 | proxy_redirect off; 33 | proxy_set_header Host $host; 34 | proxy_set_header X-Real-IP $remote_addr; 35 | proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; 36 | proxy_set_header X-Forwarded-Host $server_name; 37 | 38 | if (!-f $request_filename) { 39 | proxy_pass http://evething; 40 | } 41 | } 42 | } 43 | } 44 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins.less: -------------------------------------------------------------------------------- 1 | // Mixins 2 | // -------------------------------------------------- 3 | 4 | // Utilities 5 | @import "mixins/hide-text.less"; 6 | @import "mixins/opacity.less"; 7 | @import "mixins/image.less"; 8 | @import "mixins/labels.less"; 9 | @import "mixins/reset-filter.less"; 10 | @import "mixins/resize.less"; 11 | @import "mixins/responsive-visibility.less"; 12 | @import "mixins/size.less"; 13 | @import "mixins/tab-focus.less"; 14 | @import "mixins/text-emphasis.less"; 15 | @import "mixins/text-overflow.less"; 16 | @import "mixins/vendor-prefixes.less"; 17 | 18 | // Components 19 | @import "mixins/alerts.less"; 20 | @import "mixins/buttons.less"; 21 | @import "mixins/panels.less"; 22 | @import "mixins/pagination.less"; 23 | @import "mixins/list-group.less"; 24 | @import "mixins/nav-divider.less"; 25 | @import "mixins/forms.less"; 26 | @import "mixins/progress-bar.less"; 27 | @import "mixins/table-row.less"; 28 | 29 | // Skins 30 | @import "mixins/background-variant.less"; 31 | @import "mixins/border-radius.less"; 32 | @import "mixins/gradients.less"; 33 | 34 | // Layout 35 | @import "mixins/clearfix.less"; 36 | @import "mixins/center-block.less"; 37 | @import "mixins/nav-vertical-align.less"; 38 | @import "mixins/grid-framework.less"; 39 | @import "mixins/grid.less"; 40 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/image.less: -------------------------------------------------------------------------------- 1 | // Image Mixins 2 | // - Responsive image 3 | // - Retina image 4 | 5 | 6 | // Responsive image 7 | // 8 | // Keep images from scaling beyond the width of their parents. 9 | .img-responsive(@display: block) { 10 | display: @display; 11 | width: 100% \9; // Force IE10 and below to size SVG images correctly 12 | max-width: 100%; // Part 1: Set a maximum relative to the parent 13 | height: auto; // Part 2: Scale the height according to the width, otherwise you get stretching 14 | } 15 | 16 | 17 | // Retina image 18 | // 19 | // Short retina mixin for setting background-image and -size. Note that the 20 | // spelling of `min--moz-device-pixel-ratio` is intentional. 21 | .img-retina(@file-1x; @file-2x; @width-1x; @height-1x) { 22 | background-image: url("@{file-1x}"); 23 | 24 | @media 25 | only screen and (-webkit-min-device-pixel-ratio: 2), 26 | only screen and ( min--moz-device-pixel-ratio: 2), 27 | only screen and ( -o-min-device-pixel-ratio: 2/1), 28 | only screen and ( min-device-pixel-ratio: 2), 29 | only screen and ( min-resolution: 192dpi), 30 | only screen and ( min-resolution: 2dppx) { 31 | background-image: url("@{file-2x}"); 32 | background-size: @width-1x @height-1x; 33 | } 34 | } 35 | -------------------------------------------------------------------------------- /static/less/bootstrap/mixins/buttons.less: -------------------------------------------------------------------------------- 1 | // Button variants 2 | // 3 | // Easily pump out default styles, as well as :hover, :focus, :active, 4 | // and disabled options for all buttons 5 | 6 | .button-variant(@color; @background; @border) { 7 | color: @color; 8 | background-color: @background; 9 | border-color: @border; 10 | 11 | &:hover, 12 | &:focus, 13 | &:active, 14 | &.active, 15 | .open > .dropdown-toggle& { 16 | color: @color; 17 | background-color: darken(@background, 10%); 18 | border-color: darken(@border, 12%); 19 | } 20 | &:active, 21 | &.active, 22 | .open > .dropdown-toggle& { 23 | background-image: none; 24 | } 25 | &.disabled, 26 | &[disabled], 27 | fieldset[disabled] & { 28 | &, 29 | &:hover, 30 | &:focus, 31 | &:active, 32 | &.active { 33 | background-color: @background; 34 | border-color: @border; 35 | } 36 | } 37 | 38 | .badge { 39 | color: @background; 40 | background-color: @color; 41 | } 42 | } 43 | 44 | // Button sizes 45 | .button-size(@padding-vertical; @padding-horizontal; @font-size; @line-height; @border-radius) { 46 | padding: @padding-vertical @padding-horizontal; 47 | font-size: @font-size; 48 | line-height: @line-height; 49 | border-radius: @border-radius; 50 | } 51 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Copyright (c) 2010-2013, EVEthing team 2 | All rights reserved. 3 | 4 | Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 5 | 6 | Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 7 | Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 8 | 9 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 10 | -------------------------------------------------------------------------------- /static/less/bootstrap/badges.less: -------------------------------------------------------------------------------- 1 | // 2 | // Badges 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base class 7 | .badge { 8 | display: inline-block; 9 | min-width: 10px; 10 | padding: 3px 7px; 11 | font-size: @font-size-small; 12 | font-weight: @badge-font-weight; 13 | color: @badge-color; 14 | line-height: @badge-line-height; 15 | vertical-align: baseline; 16 | white-space: nowrap; 17 | text-align: center; 18 | background-color: @badge-bg; 19 | border-radius: @badge-border-radius; 20 | 21 | // Empty badges collapse automatically (not available in IE8) 22 | &:empty { 23 | display: none; 24 | } 25 | 26 | // Quick fix for badges in buttons 27 | .btn & { 28 | position: relative; 29 | top: -1px; 30 | } 31 | .btn-xs & { 32 | top: 0; 33 | padding: 1px 5px; 34 | } 35 | 36 | // Hover state, but only for links 37 | a& { 38 | &:hover, 39 | &:focus { 40 | color: @badge-link-hover-color; 41 | text-decoration: none; 42 | cursor: pointer; 43 | } 44 | } 45 | 46 | // Account for badges in navs 47 | a.list-group-item.active > &, 48 | .nav-pills > .active > a > & { 49 | color: @badge-active-color; 50 | background-color: @badge-active-bg; 51 | } 52 | .nav-pills > li > a > & { 53 | margin-left: 3px; 54 | } 55 | } 56 | -------------------------------------------------------------------------------- /templates/thing/trade.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Trade{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |

Trade Results

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | {% for transaction in transactions -%} 20 | 21 | 22 | 23 | 24 | 25 | 26 | {%- else -%} 27 | 28 | 29 | 30 | {%- endfor %} 31 | 32 |
Time PeriodBuy TotalSell TotalBalance
{{ transaction.name }}{{ transaction.buy_total|commas }}{{ transaction.sell_total|commas }}{{ transaction.balance|commas|balance|safe }}
No transactions found.
33 |
34 |
35 | {% endblock %} 36 | -------------------------------------------------------------------------------- /static/less/bootstrap/bootstrap.less: -------------------------------------------------------------------------------- 1 | // Core variables and mixins 2 | @import "variables.less"; 3 | @import "mixins.less"; 4 | 5 | // Reset and dependencies 6 | @import "normalize.less"; 7 | @import "print.less"; 8 | @import "glyphicons.less"; 9 | 10 | // Core CSS 11 | @import "scaffolding.less"; 12 | @import "type.less"; 13 | @import "code.less"; 14 | @import "grid.less"; 15 | @import "tables.less"; 16 | @import "forms.less"; 17 | @import "buttons.less"; 18 | 19 | // Components 20 | @import "component-animations.less"; 21 | @import "dropdowns.less"; 22 | @import "button-groups.less"; 23 | @import "input-groups.less"; 24 | @import "navs.less"; 25 | @import "navbar.less"; 26 | @import "breadcrumbs.less"; 27 | @import "pagination.less"; 28 | @import "pager.less"; 29 | @import "labels.less"; 30 | @import "badges.less"; 31 | @import "jumbotron.less"; 32 | @import "thumbnails.less"; 33 | @import "alerts.less"; 34 | @import "progress-bars.less"; 35 | @import "media.less"; 36 | @import "list-group.less"; 37 | @import "panels.less"; 38 | @import "responsive-embed.less"; 39 | @import "wells.less"; 40 | @import "close.less"; 41 | 42 | // Components w/ JavaScript 43 | @import "modals.less"; 44 | @import "tooltip.less"; 45 | @import "popovers.less"; 46 | @import "carousel.less"; 47 | 48 | // Utility classes 49 | @import "utilities.less"; 50 | @import "responsive-utilities.less"; 51 | -------------------------------------------------------------------------------- /static/less/bootstrap/labels.less: -------------------------------------------------------------------------------- 1 | // 2 | // Labels 3 | // -------------------------------------------------- 4 | 5 | .label { 6 | display: inline; 7 | padding: .2em .6em .3em; 8 | font-size: 75%; 9 | font-weight: bold; 10 | line-height: 1; 11 | color: @label-color; 12 | text-align: center; 13 | white-space: nowrap; 14 | vertical-align: baseline; 15 | border-radius: .25em; 16 | 17 | // Add hover effects, but only for links 18 | a& { 19 | &:hover, 20 | &:focus { 21 | color: @label-link-hover-color; 22 | text-decoration: none; 23 | cursor: pointer; 24 | } 25 | } 26 | 27 | // Empty labels collapse automatically (not available in IE8) 28 | &:empty { 29 | display: none; 30 | } 31 | 32 | // Quick fix for labels in buttons 33 | .btn & { 34 | position: relative; 35 | top: -1px; 36 | } 37 | } 38 | 39 | // Colors 40 | // Contextual variations (linked labels get darker on :hover) 41 | 42 | .label-default { 43 | .label-variant(@label-default-bg); 44 | } 45 | 46 | .label-primary { 47 | .label-variant(@label-primary-bg); 48 | } 49 | 50 | .label-success { 51 | .label-variant(@label-success-bg); 52 | } 53 | 54 | .label-info { 55 | .label-variant(@label-info-bg); 56 | } 57 | 58 | .label-warning { 59 | .label-variant(@label-warning-bg); 60 | } 61 | 62 | .label-danger { 63 | .label-variant(@label-danger-bg); 64 | } 65 | -------------------------------------------------------------------------------- /docker/Dockerfile-dev: -------------------------------------------------------------------------------- 1 | # Pull base image. 2 | FROM ubuntu:14.04 3 | 4 | MAINTAINER Eric Gillingham "Eric.J.Gillingham@jpl.nasa.gov" 5 | 6 | # Setup unprivileged user 7 | RUN adduser --disabled-password --gecos '' evething && \ 8 | mkdir /evething-env && \ 9 | mkdir /evething && \ 10 | chown evething /evething-env && \ 11 | chown evething /evething 12 | 13 | # Install. 14 | RUN apt-get update && \ 15 | apt-get install -y python2.7 python2.7-dev python-virtualenv python-pip \ 16 | libpq-dev \ 17 | nodejs nodejs-legacy npm \ 18 | build-essential wget 19 | 20 | USER evething 21 | WORKDIR /evething 22 | 23 | COPY requirements.txt /evething/ 24 | COPY docker/requirements-docker.txt docker/requirements-docker-dev.txt /evething/docker/ 25 | # Install python deps into virtualenv, and activate at login 26 | RUN /usr/bin/virtualenv /evething-env && \ 27 | . /evething-env/bin/activate && \ 28 | pip install -U pip && \ 29 | pip install -r /evething/requirements.txt -r /evething/docker/requirements-docker.txt -r /evething/docker/requirements-docker-dev.txt && \ 30 | echo '. /evething-env/bin/activate' >> $HOME/.bashrc 31 | 32 | # Add node_modules to PATH 33 | RUN echo 'export PATH=${PATH}:/evething/node_modules/.bin' >> $HOME/.bashrc 34 | 35 | EXPOSE 8000 36 | 37 | # Define default command, this gets overwritten by docker-compose 38 | CMD ["/evething/docker/devserver.sh"] 39 | -------------------------------------------------------------------------------- /evething/wsgi.py: -------------------------------------------------------------------------------- 1 | """ 2 | WSGI config for evething project. 3 | 4 | This module contains the WSGI application used by Django's development server 5 | and any production WSGI deployments. It should expose a module-level variable 6 | named ``application``. Django's ``runserver`` and ``runfcgi`` commands discover 7 | this application via the ``WSGI_APPLICATION`` setting. 8 | 9 | Usually you will have the standard Django WSGI application here, but it also 10 | might make sense to replace the whole Django WSGI application with a custom one 11 | that later delegates to the Django one. For example, you could introduce WSGI 12 | middleware here, or combine a Django application with an application of another 13 | framework. 14 | 15 | """ 16 | import os 17 | import sys 18 | 19 | # try using cdecimal for faster Decimal type 20 | try: 21 | import cdecimal 22 | except ImportError: 23 | pass 24 | else: 25 | sys.modules["decimal"] = cdecimal 26 | 27 | os.environ.setdefault("DJANGO_SETTINGS_MODULE", "evething.settings") 28 | 29 | # This application object is used by any WSGI server configured to use this 30 | # file. This includes Django's development server, if the WSGI_APPLICATION 31 | # setting points here. 32 | from django.core.wsgi import get_wsgi_application 33 | application = get_wsgi_application() 34 | 35 | # Apply WSGI middleware here. 36 | # from helloworld.wsgi import HelloWorldApplication 37 | # application = HelloWorldApplication(application) 38 | -------------------------------------------------------------------------------- /thing/media/thing.css: -------------------------------------------------------------------------------- 1 | body { 2 | font-family: Frutiger, "Frutiger Linotype", Univers, Calibri, "Gill Sans", "Gill Sans MT", "Myriad Pro", Myriad, "DejaVu Sans Condensed", "Liberation Sans", "Nimbus Sans L", Tahoma, Geneva, "Helvetica Neue", Helvetica, Arial, sans-serif; 3 | } 4 | a { 5 | color: #0000FF; 6 | } 7 | 8 | table { 9 | empty-cells: hide; 10 | border-spacing: 1px; 11 | } 12 | td { 13 | padding: 4px 6px 4px 6px; 14 | } 15 | 16 | th, tfoot tr td { 17 | background: #BFBFCF; 18 | padding: 4px 6px 4px 6px; 19 | } 20 | td.head { 21 | text-align: center; 22 | font-weight: bold; 23 | background: #BFBFCF; 24 | padding: 4px 6px 4px 6px; 25 | } 26 | tr.odd td { 27 | background: #EFEFFF; 28 | } 29 | tr.even td { 30 | background: #DFDFEF; 31 | } 32 | tr.odd td.alt { 33 | background: #DFDFEF; 34 | } 35 | tr.even td.alt { 36 | background: #CECEDE; 37 | } 38 | tr.oddB td { 39 | background: #EFAFAF; 40 | } 41 | tr.evenB td { 42 | background: #DF9F9F; 43 | } 44 | tr.oddS td { 45 | background: #8FEF8F; 46 | } 47 | tr.evenS td { 48 | background: #7FDF7F; 49 | } 50 | 51 | span.pos { color: #009800; } 52 | span.neg { color: #FF0000; } 53 | 54 | table.tablesorter thead tr .header { 55 | background-image: url(/thing_media/bg.gif); 56 | background-repeat: no-repeat; 57 | background-position: center right; 58 | cursor: pointer; 59 | } 60 | table.tablesorter thead tr .headerSortUp { 61 | background-image: url(/thing_media/asc.gif); 62 | } 63 | table.tablesorter thead tr .headerSortDown { 64 | background-image: url(/thing_media/desc.gif); 65 | } 66 | -------------------------------------------------------------------------------- /thing/tasks/__init__.py: -------------------------------------------------------------------------------- 1 | # flake8: noqa 2 | # Internal tasks 3 | from purgeapikey import purge_api_key 4 | from tablecleaner import table_cleaner 5 | from taskspawner import task_spawner 6 | 7 | # APIKey tasks 8 | from accountbalance import AccountBalance 9 | from accountstatus import AccountStatus 10 | from apikeyinfo import APIKeyInfo 11 | from assetlist import AssetList 12 | from characterinfo import CharacterInfo 13 | from charactersheet import CharacterSheet 14 | from contracts import Contracts 15 | from corporationsheet import CorporationSheet 16 | from industryjobs import IndustryJobs 17 | from locations import Locations 18 | from mailinglists import MailingLists 19 | from mailbodies import MailBodies 20 | from mailmessages import MailMessages 21 | from marketorders import MarketOrders 22 | # from membertracking import MemberTracking 23 | # from shareholders import Shareholders 24 | from skillqueue import SkillQueue 25 | from standings import Standings 26 | from walletjournal import WalletJournal 27 | from wallettransactions import WalletTransactions 28 | from planetarycolonies import PlanetaryColonies 29 | from planetarypins import PlanetaryPins 30 | 31 | # Global API tasks 32 | from alliancelist import AllianceList 33 | from conquerablestationlist import ConquerableStationList 34 | from reftypes import RefTypes 35 | from serverstatus import ServerStatus 36 | 37 | # Periodic tasks 38 | from fixnames import FixNames 39 | from historyupdater import HistoryUpdater 40 | from priceupdater import PriceUpdater 41 | from fixcontracts import FixContracts 42 | -------------------------------------------------------------------------------- /static/less/evething/assets.less: -------------------------------------------------------------------------------- 1 | /* Assets layout */ 2 | .assets-sidenav .fa-chevron-right, .pi-sidenav .fa-chevron-right { 3 | float: right; 4 | margin-right: -6px; 5 | margin-top: 3px; 6 | margin-left: 5px; 7 | opacity: 0.6; 8 | } 9 | .assets-sidenav:not(.affix), .pi-sidenav:not(.affix) { 10 | } 11 | .assets-sidenav.affix, .pi-sidenav.affix { 12 | top: 55px; 13 | width: percentage((3 / @grid-columns)); 14 | padding-right: @grid-gutter-width; 15 | } 16 | @media (max-width: 767px) { 17 | .assets-sidenav.affix, .pi-sidenav.affix { 18 | position: static; 19 | width: auto; 20 | top: 0; 21 | } 22 | } 23 | div.asset-filter { 24 | margin-bottom: 10px; 25 | } 26 | 27 | td.assets-summary-items { 28 | text-align: right; 29 | width: 8em; 30 | } 31 | td.assets-summary-volume { 32 | text-align: right; 33 | width: 10em; 34 | } 35 | td.assets-summary-value { 36 | text-align: right; 37 | width: 12em; 38 | } 39 | 40 | td.assets-location { 41 | font-size: 1.05em; 42 | font-weight: bold; 43 | } 44 | td.assets-img { 45 | padding: 0; 46 | margin: 0; 47 | width: 32px; 48 | } 49 | td.assets-item { 50 | width: 28em; 51 | } 52 | td.assets-group { 53 | width: 11em; 54 | } 55 | td.assets-slot { 56 | width: 8em; 57 | } 58 | td.assets-quantity { 59 | width: 5em; 60 | text-align: right; 61 | } 62 | td.assets-volume { 63 | width: 10em; 64 | text-align: right; 65 | } 66 | td.assets-value { 67 | width: 10em; 68 | text-align: right; 69 | } 70 | td.assets-total { 71 | font-weight: bold; 72 | text-align: right; 73 | } 74 | tr.asset-sneaky { 75 | display: none; 76 | } 77 | -------------------------------------------------------------------------------- /static/less/bootstrap/code.less: -------------------------------------------------------------------------------- 1 | // 2 | // Code (inline and block) 3 | // -------------------------------------------------- 4 | 5 | 6 | // Inline and block code styles 7 | code, 8 | kbd, 9 | pre, 10 | samp { 11 | font-family: @font-family-monospace; 12 | } 13 | 14 | // Inline code 15 | code { 16 | padding: 2px 4px; 17 | font-size: 90%; 18 | color: @code-color; 19 | background-color: @code-bg; 20 | border-radius: @border-radius-base; 21 | } 22 | 23 | // User input typically entered via keyboard 24 | kbd { 25 | padding: 2px 4px; 26 | font-size: 90%; 27 | color: @kbd-color; 28 | background-color: @kbd-bg; 29 | border-radius: @border-radius-small; 30 | box-shadow: inset 0 -1px 0 rgba(0,0,0,.25); 31 | 32 | kbd { 33 | padding: 0; 34 | font-size: 100%; 35 | box-shadow: none; 36 | } 37 | } 38 | 39 | // Blocks of code 40 | pre { 41 | display: block; 42 | padding: ((@line-height-computed - 1) / 2); 43 | margin: 0 0 (@line-height-computed / 2); 44 | font-size: (@font-size-base - 1); // 14px to 13px 45 | line-height: @line-height-base; 46 | word-break: break-all; 47 | word-wrap: break-word; 48 | color: @pre-color; 49 | background-color: @pre-bg; 50 | border: 1px solid @pre-border-color; 51 | border-radius: @border-radius-base; 52 | 53 | // Account for some code outputs that place code tags in pre tags 54 | code { 55 | padding: 0; 56 | font-size: inherit; 57 | color: inherit; 58 | white-space: pre-wrap; 59 | background-color: transparent; 60 | border-radius: 0; 61 | } 62 | } 63 | 64 | // Enable scrollable blocks of code 65 | .pre-scrollable { 66 | max-height: @pre-scrollable-max-height; 67 | overflow-y: scroll; 68 | } 69 | -------------------------------------------------------------------------------- /static/less/bootstrap/grid.less: -------------------------------------------------------------------------------- 1 | // 2 | // Grid system 3 | // -------------------------------------------------- 4 | 5 | 6 | // Container widths 7 | // 8 | // Set the container width, and override it for fixed navbars in media queries. 9 | 10 | .container { 11 | .container-fixed(); 12 | 13 | @media (min-width: @screen-sm-min) { 14 | width: @container-sm; 15 | } 16 | @media (min-width: @screen-md-min) { 17 | width: @container-md; 18 | } 19 | @media (min-width: @screen-lg-min) { 20 | width: @container-lg; 21 | } 22 | } 23 | 24 | 25 | // Fluid container 26 | // 27 | // Utilizes the mixin meant for fixed width containers, but without any defined 28 | // width for fluid, full width layouts. 29 | 30 | .container-fluid { 31 | .container-fixed(); 32 | } 33 | 34 | 35 | // Row 36 | // 37 | // Rows contain and clear the floats of your columns. 38 | 39 | .row { 40 | .make-row(); 41 | } 42 | 43 | 44 | // Columns 45 | // 46 | // Common styles for small and large grid columns 47 | 48 | .make-grid-columns(); 49 | 50 | 51 | // Extra small grid 52 | // 53 | // Columns, offsets, pushes, and pulls for extra small devices like 54 | // smartphones. 55 | 56 | .make-grid(xs); 57 | 58 | 59 | // Small grid 60 | // 61 | // Columns, offsets, pushes, and pulls for the small device range, from phones 62 | // to tablets. 63 | 64 | @media (min-width: @screen-sm-min) { 65 | .make-grid(sm); 66 | } 67 | 68 | 69 | // Medium grid 70 | // 71 | // Columns, offsets, pushes, and pulls for the desktop device range. 72 | 73 | @media (min-width: @screen-md-min) { 74 | .make-grid(md); 75 | } 76 | 77 | 78 | // Large grid 79 | // 80 | // Columns, offsets, pushes, and pulls for the large desktop device range. 81 | 82 | @media (min-width: @screen-lg-min) { 83 | .make-grid(lg); 84 | } 85 | -------------------------------------------------------------------------------- /thing/forms.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django import forms 27 | 28 | 29 | class UploadSkillPlanForm(forms.Form): 30 | name = forms.CharField(max_length=64) 31 | file = forms.FileField() 32 | visibility = forms.IntegerField() 33 | -------------------------------------------------------------------------------- /templates/thing/events.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Event log{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |

Event log

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | {% for event in events.object_list %} 19 | 20 | 21 | 22 | 23 | 24 | {% else %} 25 | 26 | 27 | 28 | {% endfor %} 29 | 30 |
DateAgeText
{{ event.issued }}{{ event.get_age()|duration }}{{ event.text|safe }}
No events found.
31 |
32 |
    33 | {% if events.has_previous() %} 34 |
  • Prev
  • 35 | {% else %} 36 |
  • Prev
  • 37 | {% endif %} 38 |
  • {{ events.number }}
  • 39 | {% if events.has_next() %} 40 |
  • Next
  • 41 | {% else %} 42 |
  • Next
  • 43 | {% endif %} 44 |
45 |
46 |
47 |
48 | {% endblock %} 49 | -------------------------------------------------------------------------------- /static/less/bootstrap/alerts.less: -------------------------------------------------------------------------------- 1 | // 2 | // Alerts 3 | // -------------------------------------------------- 4 | 5 | 6 | // Base styles 7 | // ------------------------- 8 | 9 | .alert { 10 | padding: @alert-padding; 11 | margin-bottom: @line-height-computed; 12 | border: 1px solid transparent; 13 | border-radius: @alert-border-radius; 14 | 15 | // Headings for larger alerts 16 | h4 { 17 | margin-top: 0; 18 | // Specified for the h4 to prevent conflicts of changing @headings-color 19 | color: inherit; 20 | } 21 | // Provide class for links that match alerts 22 | .alert-link { 23 | font-weight: @alert-link-font-weight; 24 | } 25 | 26 | // Improve alignment and spacing of inner content 27 | > p, 28 | > ul { 29 | margin-bottom: 0; 30 | } 31 | > p + p { 32 | margin-top: 5px; 33 | } 34 | } 35 | 36 | // Dismissible alerts 37 | // 38 | // Expand the right padding and account for the close button's positioning. 39 | 40 | .alert-dismissable, // The misspelled .alert-dismissable was deprecated in 3.2.0. 41 | .alert-dismissible { 42 | padding-right: (@alert-padding + 20); 43 | 44 | // Adjust close link position 45 | .close { 46 | position: relative; 47 | top: -2px; 48 | right: -21px; 49 | color: inherit; 50 | } 51 | } 52 | 53 | // Alternate styles 54 | // 55 | // Generate contextual modifier classes for colorizing the alert. 56 | 57 | .alert-success { 58 | .alert-variant(@alert-success-bg; @alert-success-border; @alert-success-text); 59 | } 60 | .alert-info { 61 | .alert-variant(@alert-info-bg; @alert-info-border; @alert-info-text); 62 | } 63 | .alert-warning { 64 | .alert-variant(@alert-warning-bg; @alert-warning-border; @alert-warning-text); 65 | } 66 | .alert-danger { 67 | .alert-variant(@alert-danger-bg; @alert-danger-border; @alert-danger-text); 68 | } 69 | -------------------------------------------------------------------------------- /thing/models/faction.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class Faction(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=64) 32 | 33 | class Meta: 34 | app_label = 'thing' 35 | -------------------------------------------------------------------------------- /thing/models/mailinglist.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class MailingList(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=255) 32 | 33 | class Meta: 34 | app_label = 'thing' 35 | -------------------------------------------------------------------------------- /templates/registration/login.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Login{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |
9 | Login 10 |
11 | {{ csrf() }} 12 | 13 |
14 | 15 |
16 | 17 | {% if form.errors %} 18 | Your username and/or password are incorrect, please check them and try again. 19 | {% endif %} 20 |
21 |
22 |
23 | 24 |
25 | 26 |
27 |
28 |
29 |
30 | 31 |
32 |
33 |
34 |
35 |
36 | {% endblock %} 37 | -------------------------------------------------------------------------------- /static/less/evething/tablesorter.less: -------------------------------------------------------------------------------- 1 | /* jQuery.tablesorter styles */ 2 | table .header { 3 | cursor: pointer; 4 | } 5 | table .header:after { 6 | content: ""; 7 | float: right; 8 | margin-top: 7px; 9 | border-width: 0 4px 4px; 10 | border-style: solid; 11 | border-color: #000000 transparent; 12 | visibility: hidden; 13 | } 14 | table .headerSortUp, table .headerSortDown { 15 | background-color: #d7d7d9; 16 | text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75); 17 | } 18 | table .header:hover:after { 19 | visibility: visible; 20 | } 21 | table .headerSortDown:after, table .headerSortDown:hover:after { 22 | visibility: visible; 23 | filter: alpha(opacity=60); 24 | -moz-opacity: 0.6; 25 | opacity: 0.6; 26 | } 27 | table .headerSortUp:after { 28 | border-bottom: none; 29 | border-left: 4px solid transparent; 30 | border-right: 4px solid transparent; 31 | border-top: 4px solid #000000; 32 | visibility: visible; 33 | -webkit-box-shadow: none; 34 | -moz-box-shadow: none; 35 | box-shadow: none; 36 | filter: alpha(opacity=60); 37 | -moz-opacity: 0.6; 38 | opacity: 0.6; 39 | } 40 | 41 | /* Some basic styling for sortable tables */ 42 | .table-sortable { 43 | th:not(.sorter-false) { 44 | cursor: pointer; 45 | } 46 | .tablesorter-header i { 47 | position: absolute; 48 | right: 2px; 49 | top: 50%; 50 | margin-top: -7px; 51 | display: inline-block; 52 | } 53 | .tablesorter-headerAsc, .tablesorter-headerDesc { 54 | background: @etInfoBackground; 55 | } 56 | i.fa-caret-up { 57 | margin-top: -11px; 58 | } 59 | i.fa-caret-down { 60 | margin-top: -4px; 61 | } 62 | } 63 | 64 | .tablesorter-bootstrap { 65 | width: 100%; 66 | .tablesorter-filter-row .tablesorter-filter { 67 | .form-control; 68 | .input-sm; 69 | } 70 | .tablesorter-header-inner { 71 | white-space: nowrap; 72 | } 73 | } 74 | 75 | -------------------------------------------------------------------------------- /thing/models/alliance.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class Alliance(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=64) 32 | short_name = models.CharField(max_length=5) 33 | 34 | class Meta: 35 | app_label = 'thing' 36 | -------------------------------------------------------------------------------- /thing/models/reftype.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class RefType(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=64) 32 | 33 | class Meta: 34 | app_label = 'thing' 35 | 36 | def __unicode__(self): 37 | return self.name 38 | -------------------------------------------------------------------------------- /thing/models/itemcategory.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class ItemCategory(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=64) 32 | 33 | class Meta: 34 | app_label = 'thing' 35 | 36 | def __unicode__(self): 37 | return self.name 38 | -------------------------------------------------------------------------------- /thing/models/region.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class Region(models.Model): 30 | id = models.IntegerField(primary_key=True) 31 | name = models.CharField(max_length=64) 32 | 33 | def __unicode__(self): 34 | return self.name 35 | 36 | class Meta: 37 | app_label = 'thing' 38 | ordering = ('name'), 39 | -------------------------------------------------------------------------------- /thing/middleware.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | import datetime 27 | 28 | 29 | class LastSeenMiddleware(object): 30 | def process_request(self, request): 31 | if not request.user.is_authenticated(): 32 | return None 33 | profile = request.user.profile 34 | profile.last_seen = datetime.datetime.utcnow() 35 | profile.save() 36 | return None 37 | -------------------------------------------------------------------------------- /thing/models/itemgroup.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.itemcategory import ItemCategory 29 | 30 | 31 | class ItemGroup(models.Model): 32 | id = models.IntegerField(primary_key=True) 33 | name = models.CharField(max_length=128) 34 | 35 | category = models.ForeignKey(ItemCategory) 36 | 37 | class Meta: 38 | app_label = 'thing' 39 | 40 | def __unicode__(self): 41 | return self.name 42 | -------------------------------------------------------------------------------- /static/js/evething/blueprints.js: -------------------------------------------------------------------------------- 1 | EVEthing.blueprints = { 2 | onload: function () { 3 | $('#checkall').on('click', function () { 4 | $('.js-check').prop('checked', this.checked ? 'checked' : false); 5 | }); 6 | 7 | // bind the edit buttons 8 | $('.bp-edit').on('click', function () { 9 | var $tr = $(this).parents('tr'); 10 | $('#bp-edit-bpi_id').attr('value', $tr.find('td').eq(0).text()); 11 | $('#bp-edit-name').val($tr.find('td').eq(1).text()); 12 | $('#bp-edit-ml').val($tr.find('td').eq(3).text()); 13 | $('#bp-edit-pl').val($tr.find('td').eq(4).text()); 14 | $('#edit-blueprint').modal('show'); 15 | }); 16 | 17 | // bind the delete buttons 18 | $('.bp-delete').on('click', function () { 19 | $tr = $(this).parents('tr'); 20 | $('#bp-del-bpi_id').attr('value', $tr.find('td').eq(0).text()); 21 | $('#bp-del-id').text($tr.find('td').eq(0).text()); 22 | $('#bp-del-name').text($tr.find('td').eq(1).text()); 23 | $('#bp-del-type').text($tr.find('td').eq(2).text()); 24 | $('#bp-del-ml').text($tr.find('td').eq(3).text()); 25 | $('#bp-del-pl').text($tr.find('td').eq(4).text()); 26 | $('#del-blueprint').modal('show'); 27 | }); 28 | 29 | // call the tablesorter plugin 30 | /*$("#blueprints-table").tablesorter({ 31 | 'headers': { 32 | 2: { sorter: false }, 33 | 3: { sorter: false }, 34 | 4: { sorter: false }, 35 | 5: { sorter: false }, 36 | 6: { sorter: false }, 37 | 7: { sorter: 'human' }, 38 | 8: { sorter: 'human' }, 39 | 9: { sorter: 'human' }, 40 | 10: { sorter: 'human' }, 41 | 11: { sorter: 'human' }, 42 | 12: { sorter: false }, 43 | }, 44 | 'sortList': [[0, 1]], 45 | });*/ 46 | } 47 | }; 48 | -------------------------------------------------------------------------------- /static/less/bootstrap.less: -------------------------------------------------------------------------------- 1 | // This is so icons work in the debug server, we override this to ../fonts/ in grunt 2 | @icon-font-path: "/static/fonts/"; 3 | 4 | // Core variables and mixins 5 | //@import "variables.less"; 6 | @import "bootstrap/mixins.less"; 7 | 8 | // Reset and dependencies 9 | @import "bootstrap/normalize.less"; 10 | @import "bootstrap/print.less"; 11 | @import "bootstrap/glyphicons.less"; 12 | 13 | // Core CSS 14 | @import "bootstrap/scaffolding.less"; 15 | @import "bootstrap/type.less"; 16 | @import "bootstrap/code.less"; 17 | @import "bootstrap/grid.less"; 18 | @import "bootstrap/tables.less"; 19 | @import "bootstrap/forms.less"; 20 | @import "bootstrap/buttons.less"; 21 | 22 | // Components 23 | @import "bootstrap/component-animations.less"; 24 | @import "bootstrap/dropdowns.less"; 25 | @import "bootstrap/button-groups.less"; 26 | @import "bootstrap/input-groups.less"; 27 | @import "bootstrap/navs.less"; 28 | @import "bootstrap/navbar.less"; 29 | @import "bootstrap/breadcrumbs.less"; 30 | @import "bootstrap/pagination.less"; 31 | @import "bootstrap/pager.less"; 32 | @import "bootstrap/labels.less"; 33 | @import "bootstrap/badges.less"; 34 | @import "bootstrap/jumbotron.less"; 35 | //@import "bootstrap/thumbnails.less"; 36 | @import "bootstrap/alerts.less"; 37 | @import "bootstrap/progress-bars.less"; 38 | //@import "bootstrap/media.less"; 39 | @import "bootstrap/list-group.less"; 40 | @import "bootstrap/panels.less"; 41 | @import "bootstrap/responsive-embed.less"; 42 | @import "bootstrap/wells.less"; 43 | @import "bootstrap/close.less"; 44 | 45 | // Components w/ JavaScript 46 | @import "bootstrap/modals.less"; 47 | @import "bootstrap/tooltip.less"; 48 | @import "bootstrap/popovers.less"; 49 | //@import "bootstrap/carousel.less"; 50 | 51 | // Utility classes 52 | @import "bootstrap/utilities.less"; 53 | @import "bootstrap/responsive-utilities.less"; 54 | 55 | // EVEthing stuff 56 | @import "evething.less"; 57 | 58 | // Font-awesome 59 | @import "font-awesome/font-awesome.less"; 60 | 61 | // Datepicker 62 | @import "datepicker.less"; 63 | -------------------------------------------------------------------------------- /thing/models/apikeyfailure.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.contrib.auth.models import User 27 | from django.db import models 28 | 29 | 30 | class APIKeyFailure(models.Model): 31 | """APIKey permanent failure log""" 32 | user = models.ForeignKey(User) 33 | keyid = models.IntegerField() 34 | 35 | fail_time = models.DateTimeField(db_index=True) 36 | fail_reason = models.CharField(max_length=255) 37 | 38 | class Meta: 39 | app_label = 'thing' 40 | -------------------------------------------------------------------------------- /thing/models/constellation.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.region import Region 29 | 30 | 31 | class Constellation(models.Model): 32 | id = models.IntegerField(primary_key=True) 33 | name = models.CharField(max_length=64) 34 | 35 | region = models.ForeignKey(Region) 36 | 37 | class Meta: 38 | app_label = 'thing' 39 | ordering = ('name'), 40 | 41 | def __unicode__(self): 42 | return self.name 43 | -------------------------------------------------------------------------------- /thing/models/spskill.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.skill import Skill 29 | 30 | 31 | class SPSkill(models.Model): 32 | skill = models.ForeignKey(Skill) 33 | 34 | level = models.IntegerField() 35 | priority = models.IntegerField() 36 | 37 | class Meta: 38 | app_label = 'thing' 39 | 40 | def __unicode__(self): 41 | return '%s, level %d, priority %d' % (self.skill.item.name, self.level, self.priority) 42 | -------------------------------------------------------------------------------- /thing/models/system.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.constellation import Constellation 29 | 30 | 31 | class System(models.Model): 32 | id = models.IntegerField(primary_key=True) 33 | name = models.CharField(max_length=32) 34 | 35 | constellation = models.ForeignKey(Constellation) 36 | 37 | class Meta: 38 | app_label = 'thing' 39 | ordering = ('name'), 40 | 41 | def __unicode__(self): 42 | return self.name 43 | -------------------------------------------------------------------------------- /static/js/bootstrap/transition.js: -------------------------------------------------------------------------------- 1 | /* ======================================================================== 2 | * Bootstrap: transition.js v3.2.0 3 | * http://getbootstrap.com/javascript/#transitions 4 | * ======================================================================== 5 | * Copyright 2011-2014 Twitter, Inc. 6 | * Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE) 7 | * ======================================================================== */ 8 | 9 | 10 | +function ($) { 11 | 'use strict'; 12 | 13 | // CSS TRANSITION SUPPORT (Shoutout: http://www.modernizr.com/) 14 | // ============================================================ 15 | 16 | function transitionEnd() { 17 | var el = document.createElement('bootstrap') 18 | 19 | var transEndEventNames = { 20 | WebkitTransition : 'webkitTransitionEnd', 21 | MozTransition : 'transitionend', 22 | OTransition : 'oTransitionEnd otransitionend', 23 | transition : 'transitionend' 24 | } 25 | 26 | for (var name in transEndEventNames) { 27 | if (el.style[name] !== undefined) { 28 | return { end: transEndEventNames[name] } 29 | } 30 | } 31 | 32 | return false // explicit for ie8 ( ._.) 33 | } 34 | 35 | // http://blog.alexmaccaw.com/css-transitions 36 | $.fn.emulateTransitionEnd = function (duration) { 37 | var called = false 38 | var $el = this 39 | $(this).one('bsTransitionEnd', function () { called = true }) 40 | var callback = function () { if (!called) $($el).trigger($.support.transition.end) } 41 | setTimeout(callback, duration) 42 | return this 43 | } 44 | 45 | $(function () { 46 | $.support.transition = transitionEnd() 47 | 48 | if (!$.support.transition) return 49 | 50 | $.event.special.bsTransitionEnd = { 51 | bindType: $.support.transition.end, 52 | delegateType: $.support.transition.end, 53 | handle: function (e) { 54 | if ($(e.target).is(this)) return e.handleObj.handler.apply(this, arguments) 55 | } 56 | } 57 | }) 58 | 59 | }(jQuery); 60 | -------------------------------------------------------------------------------- /thing/models/corporationstanding.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.corporation import Corporation 30 | 31 | 32 | class CorporationStanding(models.Model): 33 | corporation = models.ForeignKey(Corporation) 34 | character = models.ForeignKey(Character) 35 | 36 | standing = models.DecimalField(max_digits=4, decimal_places=2) 37 | 38 | class Meta: 39 | app_label = 'thing' 40 | ordering = ('-standing',) 41 | -------------------------------------------------------------------------------- /thing/models/blueprint.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | # from thing.models.blueprintcomponent import BlueprintComponent 29 | 30 | 31 | class Blueprint(models.Model): 32 | """Blueprints""" 33 | id = models.IntegerField(primary_key=True) 34 | name = models.CharField(max_length=128) 35 | 36 | productionLimit = models.IntegerField() 37 | 38 | class Meta: 39 | app_label = 'thing' 40 | ordering = ('name',) 41 | 42 | def __unicode__(self): 43 | return self.name 44 | -------------------------------------------------------------------------------- /thing/models/factionstanding.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.faction import Faction 30 | 31 | 32 | class FactionStanding(models.Model): 33 | """Faction standings""" 34 | faction = models.ForeignKey(Faction) 35 | character = models.ForeignKey(Character) 36 | 37 | standing = models.DecimalField(max_digits=4, decimal_places=2) 38 | 39 | class Meta: 40 | app_label = 'thing' 41 | ordering = ('-standing',) 42 | -------------------------------------------------------------------------------- /thing/models/event.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | import datetime 27 | 28 | from django.contrib.auth.models import User 29 | from django.db import models 30 | 31 | from core.util import total_seconds 32 | 33 | 34 | class Event(models.Model): 35 | user = models.ForeignKey(User) 36 | issued = models.DateTimeField() 37 | text = models.TextField() 38 | 39 | class Meta: 40 | app_label = 'thing' 41 | ordering = ('-issued', '-id') 42 | 43 | def get_age(self): 44 | return total_seconds(datetime.datetime.now() - self.issued) 45 | -------------------------------------------------------------------------------- /docker-compose-prod.yml: -------------------------------------------------------------------------------- 1 | # database container 2 | db: 3 | image: postgres:latest 4 | environment: 5 | POSTGRES_USER: evething 6 | POSTGRES_PASSWORD: evething 7 | # redis container 8 | redis: 9 | image: redis:latest 10 | # Persistant data container 11 | data: 12 | build: . 13 | dockerfile: docker/Dockerfile-data 14 | # container with gunicorn running evething 15 | django: 16 | build: . 17 | dockerfile: docker/Dockerfile-prod 18 | command: bash -c ". /evething-env/bin/activate && gunicorn evething.wsgi -b 0.0.0.0" 19 | volumes_from: 20 | - data 21 | links: 22 | - db:db 23 | - redis:redis 24 | environment: 25 | - PYTHONUNBUFFERED=1 26 | nginx: 27 | build: . 28 | dockerfile: docker/Dockerfile-nginx 29 | volumes_from: 30 | - data 31 | ports: 32 | - "80:80" 33 | links: 34 | - django:django 35 | # celery workers 36 | celerybeat: 37 | image: evething_django 38 | volumes_from: 39 | - data 40 | command: bash -c ". /evething-env/bin/activate && celery beat -A evething" 41 | links: 42 | - db:db 43 | - redis:redis 44 | environment: 45 | - PYTHONUNBUFFERED=1 46 | celerylow: 47 | image: evething_django 48 | volumes_from: 49 | - data 50 | command: bash -c ". /evething-env/bin/activate && celery worker -A evething -Q et_low -c 5" 51 | links: 52 | - db:db 53 | - redis:redis 54 | environment: 55 | - PYTHONUNBUFFERED=1 56 | celerymedium: 57 | image: evething_django 58 | volumes_from: 59 | - data 60 | command: bash -c ". /evething-env/bin/activate && celery worker -A evething -Q et_medium -c 5" 61 | links: 62 | - db:db 63 | - redis:redis 64 | environment: 65 | - PYTHONUNBUFFERED=1 66 | celeryhigh: 67 | volumes_from: 68 | - data 69 | image: evething_django 70 | command: bash -c ". /evething-env/bin/activate && celery worker -A evething -Q et_high -c 1" 71 | links: 72 | - db:db 73 | - redis:redis 74 | environment: 75 | - PYTHONUNBUFFERED=1 -------------------------------------------------------------------------------- /thing/models/contractitem.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.item import Item 29 | 30 | 31 | class ContractItem(models.Model): 32 | """Contract items""" 33 | contract_id = models.IntegerField(db_index=True) 34 | item = models.ForeignKey(Item, related_name='contract_items') 35 | 36 | quantity = models.IntegerField() 37 | raw_quantity = models.IntegerField() 38 | singleton = models.BooleanField(default=False) 39 | included = models.BooleanField(default=False) 40 | 41 | class Meta: 42 | app_label = 'thing' 43 | -------------------------------------------------------------------------------- /thing/models/spremap.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class SPRemap(models.Model): 30 | int_stat = models.IntegerField() 31 | mem_stat = models.IntegerField() 32 | per_stat = models.IntegerField() 33 | wil_stat = models.IntegerField() 34 | cha_stat = models.IntegerField() 35 | 36 | class Meta: 37 | app_label = 'thing' 38 | 39 | def __unicode__(self): 40 | return 'Int: %d, Mem: %d, Per: %d, Wil: %d, Cha: %d' % ( 41 | self.int_stat, self.mem_stat, self.per_stat, self.wil_stat, self.cha_stat 42 | ) 43 | -------------------------------------------------------------------------------- /static/less/bootstrap/print.less: -------------------------------------------------------------------------------- 1 | // 2 | // Basic print styles 3 | // -------------------------------------------------- 4 | // Source: https://github.com/h5bp/html5-boilerplate/blob/master/css/main.css 5 | 6 | @media print { 7 | 8 | * { 9 | text-shadow: none !important; 10 | color: #000 !important; // Black prints faster: h5bp.com/s 11 | background: transparent !important; 12 | box-shadow: none !important; 13 | } 14 | 15 | a, 16 | a:visited { 17 | text-decoration: underline; 18 | } 19 | 20 | a[href]:after { 21 | content: " (" attr(href) ")"; 22 | } 23 | 24 | abbr[title]:after { 25 | content: " (" attr(title) ")"; 26 | } 27 | 28 | // Don't show links for images, or javascript/internal links 29 | a[href^="javascript:"]:after, 30 | a[href^="#"]:after { 31 | content: ""; 32 | } 33 | 34 | pre, 35 | blockquote { 36 | border: 1px solid #999; 37 | page-break-inside: avoid; 38 | } 39 | 40 | thead { 41 | display: table-header-group; // h5bp.com/t 42 | } 43 | 44 | tr, 45 | img { 46 | page-break-inside: avoid; 47 | } 48 | 49 | img { 50 | max-width: 100% !important; 51 | } 52 | 53 | p, 54 | h2, 55 | h3 { 56 | orphans: 3; 57 | widows: 3; 58 | } 59 | 60 | h2, 61 | h3 { 62 | page-break-after: avoid; 63 | } 64 | 65 | // Chrome (OSX) fix for https://github.com/twbs/bootstrap/issues/11245 66 | // Once fixed, we can just straight up remove this. 67 | select { 68 | background: #fff !important; 69 | } 70 | 71 | // Bootstrap components 72 | .navbar { 73 | display: none; 74 | } 75 | .table { 76 | td, 77 | th { 78 | background-color: #fff !important; 79 | } 80 | } 81 | .btn, 82 | .dropup > .btn { 83 | > .caret { 84 | border-top-color: #000 !important; 85 | } 86 | } 87 | .label { 88 | border: 1px solid #000; 89 | } 90 | 91 | .table { 92 | border-collapse: collapse !important; 93 | } 94 | .table-bordered { 95 | th, 96 | td { 97 | border: 1px solid #ddd !important; 98 | } 99 | } 100 | 101 | } 102 | -------------------------------------------------------------------------------- /thing/models/blueprintproduct.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.blueprint import Blueprint 29 | from thing.models.item import Item 30 | from thing.models.industryjob import IndustryJob 31 | 32 | 33 | class BlueprintProduct(models.Model): 34 | """Blueprint products""" 35 | blueprint = models.ForeignKey(Blueprint) 36 | 37 | activity = models.IntegerField(choices=IndustryJob.ACTIVITY_CHOICES) 38 | item = models.ForeignKey(Item) 39 | count = models.IntegerField() 40 | 41 | class Meta: 42 | app_label = 'thing' 43 | 44 | def __unicode__(self): 45 | return '%dx %s' % (self.activity, self.item.name) 46 | -------------------------------------------------------------------------------- /thing/models/marketgroup.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | from django.utils.text import slugify 28 | 29 | from mptt.models import MPTTModel, TreeForeignKey 30 | 31 | 32 | class MarketGroup(MPTTModel): 33 | id = models.IntegerField(primary_key=True) 34 | name = models.CharField(max_length=100) 35 | 36 | parent = TreeForeignKey('self', blank=True, null=True, related_name='children') 37 | 38 | class Meta: 39 | app_label = 'thing' 40 | 41 | class MPTTMeta: 42 | order_insertion_by = ['name'] 43 | 44 | def __unicode__(self): 45 | return self.name 46 | 47 | def slug(self): 48 | return slugify(unicode(self.name)) 49 | -------------------------------------------------------------------------------- /thing/tasks/accountstatus.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from .apitask import APITask 27 | 28 | 29 | class AccountStatus(APITask): 30 | name = 'thing.account_status' 31 | 32 | def run(self, url, taskstate_id, apikey_id, zero): 33 | if self.init(taskstate_id, apikey_id) is False: 34 | return 35 | 36 | # Fetch the API data 37 | if self.fetch_api(url, {}) is False or self.root is None: 38 | return 39 | 40 | # Update paid_until 41 | paidUntil = self.parse_api_date(self.root.findtext('result/paidUntil')) 42 | if paidUntil != self.apikey.paid_until: 43 | self.apikey.paid_until = paidUntil 44 | self.apikey.save() 45 | 46 | return True 47 | -------------------------------------------------------------------------------- /thing/models/blueprintcomponent.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.blueprint import Blueprint 29 | from thing.models.item import Item 30 | from thing.models.industryjob import IndustryJob 31 | 32 | 33 | class BlueprintComponent(models.Model): 34 | """Blueprint components""" 35 | blueprint = models.ForeignKey(Blueprint) 36 | 37 | activity = models.IntegerField(choices=IndustryJob.ACTIVITY_CHOICES) 38 | item = models.ForeignKey(Item) 39 | count = models.IntegerField() 40 | consumed = models.BooleanField(default=False) 41 | 42 | class Meta: 43 | app_label = 'thing' 44 | 45 | def __unicode__(self): 46 | return '%dx %s' % (self.count, self.item.name) 47 | -------------------------------------------------------------------------------- /thing/models/characterskill.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.skill import Skill 30 | 31 | ROMAN = ['', 'I', 'II', 'III', 'IV', 'V'] 32 | 33 | 34 | class CharacterSkill(models.Model): 35 | """Character skill""" 36 | character = models.ForeignKey(Character) 37 | skill = models.ForeignKey(Skill) 38 | 39 | level = models.SmallIntegerField() 40 | points = models.IntegerField() 41 | 42 | class Meta: 43 | app_label = 'thing' 44 | 45 | def __unicode__(self): 46 | return '%s: %s (%s; %s SP)' % (self.character, self.skill.item.name, self.level, self.points) 47 | 48 | def get_roman_level(self): 49 | return ROMAN[self.level] 50 | -------------------------------------------------------------------------------- /thing/models/spentry.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.skillplan import SkillPlan 29 | from thing.models.spremap import SPRemap 30 | from thing.models.spskill import SPSkill 31 | 32 | 33 | class SPEntry(models.Model): 34 | skill_plan = models.ForeignKey(SkillPlan, related_name='entries') 35 | 36 | position = models.IntegerField() 37 | 38 | sp_remap = models.ForeignKey(SPRemap, blank=True, null=True) 39 | sp_skill = models.ForeignKey(SPSkill, blank=True, null=True) 40 | 41 | class Meta: 42 | app_label = 'thing' 43 | ordering = ('position',) 44 | 45 | def __unicode__(self): 46 | if self.sp_remap is None: 47 | return str(self.sp_skill) 48 | else: 49 | return str(self.sp_remap) 50 | -------------------------------------------------------------------------------- /templates/registration/register.html: -------------------------------------------------------------------------------- 1 | {% extends "base.html" %} 2 | 3 | {% block title %}Register{% endblock %} 4 | 5 | {% block content %} 6 |
7 |
8 |
9 | Register 10 | {{ csrf() }} 11 | 12 |
13 |
14 | 15 |
16 | 17 |
18 |
19 |
20 | 21 |
22 | 23 | {% for error in form.password1.error_messages %} 24 | {{ error }} 25 | {% endfor %} 26 |
27 |
28 |
29 | 30 |
31 | 32 | {% for error in form.password2.error_messages %} 33 | {{ error }} 34 | {% endfor %} 35 |
36 |
37 |
38 |
39 | 40 |
41 |
42 |
43 |
44 |
45 | {% endblock %} 46 | -------------------------------------------------------------------------------- /thing/models/assetsummary.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.station import Station 30 | from thing.models.system import System 31 | 32 | 33 | class AssetSummary(models.Model): 34 | character = models.ForeignKey(Character) 35 | corporation_id = models.IntegerField(default=0) 36 | system = models.ForeignKey(System) 37 | station = models.ForeignKey(Station, blank=True, null=True) 38 | 39 | total_items = models.BigIntegerField() 40 | # 1,234,567,890.12 41 | total_volume = models.DecimalField(max_digits=12, decimal_places=2) 42 | # 1,234,567,890,123,456.78 43 | total_value = models.DecimalField(max_digits=18, decimal_places=2) 44 | 45 | class Meta: 46 | app_label = 'thing' 47 | -------------------------------------------------------------------------------- /static/less/bootstrap/pagination.less: -------------------------------------------------------------------------------- 1 | // 2 | // Pagination (multiple pages) 3 | // -------------------------------------------------- 4 | .pagination { 5 | display: inline-block; 6 | padding-left: 0; 7 | margin: @line-height-computed 0; 8 | border-radius: @border-radius-base; 9 | 10 | > li { 11 | display: inline; // Remove list-style and block-level defaults 12 | > a, 13 | > span { 14 | position: relative; 15 | float: left; // Collapse white-space 16 | padding: @padding-base-vertical @padding-base-horizontal; 17 | line-height: @line-height-base; 18 | text-decoration: none; 19 | color: @pagination-color; 20 | background-color: @pagination-bg; 21 | border: 1px solid @pagination-border; 22 | margin-left: -1px; 23 | } 24 | &:first-child { 25 | > a, 26 | > span { 27 | margin-left: 0; 28 | .border-left-radius(@border-radius-base); 29 | } 30 | } 31 | &:last-child { 32 | > a, 33 | > span { 34 | .border-right-radius(@border-radius-base); 35 | } 36 | } 37 | } 38 | 39 | > li > a, 40 | > li > span { 41 | &:hover, 42 | &:focus { 43 | color: @pagination-hover-color; 44 | background-color: @pagination-hover-bg; 45 | border-color: @pagination-hover-border; 46 | } 47 | } 48 | 49 | > .active > a, 50 | > .active > span { 51 | &, 52 | &:hover, 53 | &:focus { 54 | z-index: 2; 55 | color: @pagination-active-color; 56 | background-color: @pagination-active-bg; 57 | border-color: @pagination-active-border; 58 | cursor: default; 59 | } 60 | } 61 | 62 | > .disabled { 63 | > span, 64 | > span:hover, 65 | > span:focus, 66 | > a, 67 | > a:hover, 68 | > a:focus { 69 | color: @pagination-disabled-color; 70 | background-color: @pagination-disabled-bg; 71 | border-color: @pagination-disabled-border; 72 | cursor: not-allowed; 73 | } 74 | } 75 | } 76 | 77 | // Sizing 78 | // -------------------------------------------------- 79 | 80 | // Large 81 | .pagination-lg { 82 | .pagination-size(@padding-large-vertical; @padding-large-horizontal; @font-size-large; @border-radius-large); 83 | } 84 | 85 | // Small 86 | .pagination-sm { 87 | .pagination-size(@padding-small-vertical; @padding-small-horizontal; @font-size-small; @border-radius-small); 88 | } 89 | -------------------------------------------------------------------------------- /thing/models/planetarycolony.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2014, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.system import System 30 | 31 | 32 | class Colony(models.Model): 33 | """Planetary Colony""" 34 | character = models.ForeignKey(Character) 35 | system = models.ForeignKey(System) 36 | planet_id = models.IntegerField() 37 | planet = models.CharField(max_length=128) 38 | planet_type = models.CharField(max_length=32) 39 | 40 | last_update = models.DateTimeField() 41 | 42 | level = models.IntegerField() 43 | pins = models.IntegerField() 44 | 45 | class Meta: 46 | app_label = 'thing' 47 | unique_together = ('character', 'planet_id') 48 | 49 | def __str__(self): 50 | return '%s - %s' % (self.system.name, self.planet) 51 | -------------------------------------------------------------------------------- /thing/models/characterconfig.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | 30 | 31 | class CharacterConfig(models.Model): 32 | """Character configuration information""" 33 | character = models.OneToOneField(Character, unique=True, primary_key=True, related_name='config') 34 | 35 | is_public = models.BooleanField(default=False) 36 | show_implants = models.BooleanField(default=False) 37 | show_skill_queue = models.BooleanField(default=False) 38 | show_standings = models.BooleanField(default=False) 39 | show_wallet = models.BooleanField(default=False) 40 | anon_key = models.CharField(max_length=16, default='') 41 | 42 | class Meta: 43 | app_label = 'thing' 44 | 45 | def __unicode__(self): 46 | return self.character.name 47 | -------------------------------------------------------------------------------- /thing/models/taskstate.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | 29 | class TaskState(models.Model): 30 | """Task States""" 31 | READY_STATE = 0 32 | QUEUED_STATE = 1 33 | STATES = ( 34 | (READY_STATE, 'Ready'), 35 | (QUEUED_STATE, 'Queued'), 36 | ) 37 | 38 | keyid = models.IntegerField(db_index=True) 39 | url = models.CharField(max_length=64, db_index=True) 40 | parameter = models.IntegerField(db_index=True) 41 | state = models.IntegerField(db_index=True) 42 | 43 | mod_time = models.DateTimeField(db_index=True) 44 | next_time = models.DateTimeField(db_index=True) 45 | 46 | class Meta: 47 | app_label = 'thing' 48 | 49 | # Are we ready to queue? 50 | def queue_now(self, now): 51 | return ((self.state == self.READY_STATE) and self.next_time <= now) 52 | -------------------------------------------------------------------------------- /thing/tasks/serverstatus.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.core.cache import cache 27 | 28 | from .apitask import APITask 29 | 30 | 31 | class ServerStatus(APITask): 32 | name = 'thing.server_status' 33 | 34 | def run(self, url, taskstate_id, apikey_id, zero): 35 | if self.init(taskstate_id, apikey_id) is False: 36 | return 37 | 38 | # Fetch the API data 39 | if self.fetch_api(url, {}, use_auth=False) is False or self.root is None: 40 | return 41 | 42 | # Parse the API data 43 | serverOpen = (self.root.findtext('result/serverOpen', 'False') == 'True') 44 | onlinePlayers = int(self.root.findtext('result/onlinePlayers', '0')) 45 | 46 | # Cache the data 47 | cache.set('server_open', serverOpen, 300) 48 | cache.set('online_players', onlinePlayers, 300) 49 | 50 | return True 51 | -------------------------------------------------------------------------------- /thing/models/pricehistory.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.item import Item 29 | from thing.models.region import Region 30 | 31 | 32 | class PriceHistory(models.Model): 33 | """Historical item price data""" 34 | region = models.ForeignKey(Region) 35 | item = models.ForeignKey(Item) 36 | 37 | date = models.DateField() 38 | minimum = models.DecimalField(max_digits=18, decimal_places=2) 39 | maximum = models.DecimalField(max_digits=18, decimal_places=2) 40 | average = models.DecimalField(max_digits=18, decimal_places=2) 41 | movement = models.BigIntegerField() 42 | orders = models.IntegerField() 43 | 44 | class Meta: 45 | app_label = 'thing' 46 | ordering = ('-date',) 47 | unique_together = ('region', 'item', 'date') 48 | 49 | def __unicode__(self): 50 | return '%s (%s)' % (self.item, self.date) 51 | -------------------------------------------------------------------------------- /thing/models/character.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | from django.db.models import Sum 28 | 29 | from thing.models.corporation import Corporation 30 | 31 | 32 | class Character(models.Model): 33 | id = models.IntegerField(primary_key=True) 34 | 35 | name = models.CharField(max_length=64) 36 | corporation = models.ForeignKey(Corporation, blank=True, null=True) 37 | 38 | class Meta: 39 | app_label = 'thing' 40 | ordering = ('name',) 41 | 42 | def __unicode__(self): 43 | return self.name 44 | 45 | @models.permalink 46 | def get_absolute_url(self): 47 | return ('character', (), {'character_name': self.name, }) 48 | 49 | def get_total_skill_points(self): 50 | from thing.models.characterskill import CharacterSkill 51 | return CharacterSkill.objects.filter(character=self).aggregate(total_sp=Sum('points'))['total_sp'] 52 | -------------------------------------------------------------------------------- /thing/models/mailmessage.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | import re 27 | 28 | from django.db import models 29 | 30 | from thing.models.character import Character 31 | 32 | 33 | TAG_RE = re.compile('<[^>]+>') 34 | 35 | 36 | class MailMessage(models.Model): 37 | character = models.ForeignKey(Character) 38 | 39 | message_id = models.BigIntegerField() 40 | sender_id = models.IntegerField() 41 | sent_date = models.DateTimeField() 42 | title = models.CharField(max_length=255) 43 | to_characters = models.ManyToManyField(Character, related_name='+') 44 | to_corp_or_alliance_id = models.IntegerField() 45 | to_list_id = models.IntegerField() 46 | 47 | body = models.TextField(blank=True, null=True) 48 | 49 | read = models.BooleanField(default=False) 50 | 51 | class Meta: 52 | app_label = 'thing' 53 | ordering = ('-sent_date',) 54 | 55 | def stripped_body(self): 56 | return TAG_RE.sub('', self.body or '') 57 | -------------------------------------------------------------------------------- /thing/models/skillplan.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.contrib.auth.models import User 27 | from django.db import models 28 | 29 | 30 | class SkillPlan(models.Model): 31 | PRIVATE_VISIBILITY = 1 32 | PUBLIC_VISIBILITY = 2 33 | GLOBAL_VISIBILITY = 3 34 | MASTERY_VISIBILITY = 99 35 | VISIBILITY_CHOICES = ( 36 | (PRIVATE_VISIBILITY, 'Private'), 37 | (PUBLIC_VISIBILITY, 'Public'), 38 | (GLOBAL_VISIBILITY, 'Global'), 39 | ) 40 | 41 | user = models.ForeignKey(User, null=True, blank=True) 42 | 43 | name = models.CharField(max_length=64) 44 | visibility = models.IntegerField(default=1, choices=VISIBILITY_CHOICES) 45 | 46 | class Meta: 47 | app_label = 'thing' 48 | ordering = ('name',) 49 | 50 | def __unicode__(self): 51 | if hasattr(self.user, 'username'): 52 | return '%s - %s' % (self.user.username, self.name) 53 | else: 54 | return '%s' % self.name 55 | -------------------------------------------------------------------------------- /thing/models/implant.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.item import Item 29 | 30 | 31 | class Implant(models.Model): 32 | CHARISMA_ATTRIBUTE = 175 33 | INTELLIGENCE_ATTRIBUTE = 176 34 | MEMORY_ATTRIBUTE = 177 35 | PERCEPTION_ATTRIBUTE = 178 36 | WILLPOWER_ATTRIBUTE = 179 37 | IMPLANT_SLOT_ATTRIBUTE = 331 38 | 39 | item = models.OneToOneField(Item, primary_key=True) 40 | 41 | description = models.TextField() 42 | 43 | charisma_modifier = models.SmallIntegerField() 44 | intelligence_modifier = models.SmallIntegerField() 45 | memory_modifier = models.SmallIntegerField() 46 | perception_modifier = models.SmallIntegerField() 47 | willpower_modifier = models.SmallIntegerField() 48 | 49 | implant_slot = models.SmallIntegerField() 50 | 51 | class Meta: 52 | app_label = 'thing' 53 | 54 | def __unicode__(self): 55 | return "%s (Slot %d)" % (self.item.name, self.implant_slot) 56 | -------------------------------------------------------------------------------- /thing/media/g.dot-min.js: -------------------------------------------------------------------------------- 1 | /* 2 | * g.Raphael 0.4.1 - Charting library, based on Raphaël 3 | * 4 | * Copyright (c) 2009 Dmitry Baranovskiy (http://g.raphaeljs.com) 5 | * Licensed under the MIT (http://www.opensource.org/licenses/mit-license.php) license. 6 | */ 7 | Raphael.fn.g.dotchart=function(K,J,a,f,w,v,r,F){function Q(b){+b[0]&&(b[0]=c.g.axis(K+q,J+q,a-2*q,B,n,F.axisxstep||Math.floor((a-2*q)/20),2,F.axisxlabels||null,F.axisxtype||"t"));+b[1]&&(b[1]=c.g.axis(K+a-q,J+f-q,f-2*q,A,m,F.axisystep||Math.floor((f-2*q)/20),3,F.axisylabels||null,F.axisytype||"t"));+b[2]&&(b[2]=c.g.axis(K+q,J+f-q+E,a-2*q,B,n,F.axisxstep||Math.floor((a-2*q)/20),0,F.axisxlabels||null,F.axisxtype||"t"));+b[3]&&(b[3]=c.g.axis(K+q-E,J+f-q,f-2*q,A,m,F.axisystep||Math.floor((f-2*q)/20),1,F.axisylabels||null,F.axisytype||"t"));}F=F||{};var u=this.g.snapEnds(Math.min.apply(Math,w),Math.max.apply(Math,w),w.length-1),B=u.from,n=u.to,q=F.gutter||10,I=this.g.snapEnds(Math.min.apply(Math,v),Math.max.apply(Math,v),v.length-1),A=I.from,m=I.to,z=Math.max(w.length,v.length,r.length),t=this.g.markers[F.symbol]||"disc",G=this.set(),s=this.set(),D=F.max||100,p=Math.max.apply(Math,r),o=[],c=this,N=Math.sqrt(p/Math.PI)*2/D;for(var O=0;O= 2.0.0-beta.1"],"main":function(depth0,helpers,partials,data) { 5 | var helper, alias1=helpers.helperMissing, alias2="function", alias3=this.escapeExpression; 6 | 7 | return " \n \n " 14 | + alias3(((helper = (helper = helpers.senderText || (depth0 != null ? depth0.senderText : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"senderText","hash":{},"data":data}) : helper))) 15 | + "\n " 16 | + alias3(((helper = (helper = helpers.toText || (depth0 != null ? depth0.toText : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"toText","hash":{},"data":data}) : helper))) 17 | + "\n " 20 | + alias3(((helper = (helper = helpers.subjectText || (depth0 != null ? depth0.subjectText : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"subjectText","hash":{},"data":data}) : helper))) 21 | + "\n " 22 | + alias3(((helper = (helper = helpers.sent_date || (depth0 != null ? depth0.sent_date : depth0)) != null ? helper : alias1),(typeof helper === alias2 ? helper.call(depth0,{"name":"sent_date","hash":{},"data":data}) : helper))) 23 | + "\n \n"; 24 | },"useData":true}); -------------------------------------------------------------------------------- /thing/models/transaction.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.db import models 27 | 28 | from thing.models.character import Character 29 | from thing.models.corporation import Corporation 30 | from thing.models.corpwallet import CorpWallet 31 | from thing.models.item import Item 32 | from thing.models.station import Station 33 | 34 | 35 | class Transaction(models.Model): 36 | """Wallet Transactions""" 37 | station = models.ForeignKey(Station) 38 | item = models.ForeignKey(Item) 39 | 40 | character = models.ForeignKey(Character) 41 | corp_wallet = models.ForeignKey(CorpWallet, null=True, blank=True) 42 | other_char = models.ForeignKey(Character, null=True, blank=True, related_name='transaction_others') 43 | other_corp = models.ForeignKey(Corporation, null=True, blank=True) 44 | 45 | transaction_id = models.BigIntegerField(db_index=True) 46 | date = models.DateTimeField(db_index=True) 47 | buy_transaction = models.BooleanField(default=False) 48 | quantity = models.IntegerField() 49 | price = models.DecimalField(max_digits=14, decimal_places=2) 50 | total_price = models.DecimalField(max_digits=17, decimal_places=2) 51 | 52 | class Meta: 53 | app_label = 'thing' 54 | -------------------------------------------------------------------------------- /thing/views/events.py: -------------------------------------------------------------------------------- 1 | # ------------------------------------------------------------------------------ 2 | # Copyright (c) 2010-2013, EVEthing team 3 | # All rights reserved. 4 | # 5 | # Redistribution and use in source and binary forms, with or without modification, 6 | # are permitted provided that the following conditions are met: 7 | # 8 | # Redistributions of source code must retain the above copyright notice, this 9 | # list of conditions and the following disclaimer. 10 | # Redistributions in binary form must reproduce the above copyright notice, 11 | # this list of conditions and the following disclaimer in the documentation 12 | # and/or other materials provided with the distribution. 13 | # 14 | # THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND 15 | # ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED 16 | # WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. 17 | # IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, 18 | # INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 19 | # NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR 20 | # PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, 21 | # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 22 | # ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY 23 | # OF SUCH DAMAGE. 24 | # ------------------------------------------------------------------------------ 25 | 26 | from django.contrib.auth.decorators import login_required 27 | from django.core.paginator import Paginator, EmptyPage, InvalidPage 28 | 29 | from thing.models import * # NOPEP8 30 | from thing.stuff import * # NOPEP8 31 | 32 | 33 | @login_required 34 | def events(request): 35 | """Events""" 36 | # Get profile 37 | profile = request.user.profile 38 | 39 | # Get a QuerySet of events for this user 40 | events = Event.objects.filter(user=request.user) 41 | 42 | # Create a new paginator 43 | paginator = Paginator(events, profile.entries_per_page) 44 | 45 | # Make sure page request is an int, default to 1st page 46 | try: 47 | page = int(request.GET.get('page', '1')) 48 | except ValueError: 49 | page = 1 50 | 51 | # If page request is out of range, deliver last page of results 52 | try: 53 | events = paginator.page(page) 54 | except (EmptyPage, InvalidPage): 55 | events = paginator.page(paginator.num_pages) 56 | 57 | # Render template 58 | return render_page( 59 | 'thing/events.html', 60 | { 61 | 'events': events, 62 | }, 63 | request, 64 | ) 65 | -------------------------------------------------------------------------------- /static/less/bootstrap/progress-bars.less: -------------------------------------------------------------------------------- 1 | // 2 | // Progress bars 3 | // -------------------------------------------------- 4 | 5 | 6 | // Bar animations 7 | // ------------------------- 8 | 9 | // WebKit 10 | @-webkit-keyframes progress-bar-stripes { 11 | from { background-position: 40px 0; } 12 | to { background-position: 0 0; } 13 | } 14 | 15 | // Spec and IE10+ 16 | @keyframes progress-bar-stripes { 17 | from { background-position: 40px 0; } 18 | to { background-position: 0 0; } 19 | } 20 | 21 | 22 | 23 | // Bar itself 24 | // ------------------------- 25 | 26 | // Outer container 27 | .progress { 28 | overflow: hidden; 29 | height: @line-height-computed; 30 | margin-bottom: @line-height-computed; 31 | background-color: @progress-bg; 32 | border-radius: @border-radius-base; 33 | .box-shadow(inset 0 1px 2px rgba(0,0,0,.1)); 34 | } 35 | 36 | // Bar of progress 37 | .progress-bar { 38 | float: left; 39 | width: 0%; 40 | height: 100%; 41 | font-size: @font-size-small; 42 | line-height: @line-height-computed; 43 | color: @progress-bar-color; 44 | text-align: center; 45 | background-color: @progress-bar-bg; 46 | .box-shadow(inset 0 -1px 0 rgba(0,0,0,.15)); 47 | .transition(width .6s ease); 48 | } 49 | 50 | // Striped bars 51 | // 52 | // `.progress-striped .progress-bar` is deprecated as of v3.2.0 in favor of the 53 | // `.progress-bar-striped` class, which you just add to an existing 54 | // `.progress-bar`. 55 | .progress-striped .progress-bar, 56 | .progress-bar-striped { 57 | #gradient > .striped(); 58 | background-size: 40px 40px; 59 | } 60 | 61 | // Call animation for the active one 62 | // 63 | // `.progress.active .progress-bar` is deprecated as of v3.2.0 in favor of the 64 | // `.progress-bar.active` approach. 65 | .progress.active .progress-bar, 66 | .progress-bar.active { 67 | .animation(progress-bar-stripes 2s linear infinite); 68 | } 69 | 70 | // Account for lower percentages 71 | .progress-bar { 72 | &[aria-valuenow="1"], 73 | &[aria-valuenow="2"] { 74 | min-width: 30px; 75 | } 76 | 77 | &[aria-valuenow="0"] { 78 | color: @gray-light; 79 | min-width: 30px; 80 | background-color: transparent; 81 | background-image: none; 82 | box-shadow: none; 83 | } 84 | } 85 | 86 | 87 | 88 | // Variations 89 | // ------------------------- 90 | 91 | .progress-bar-success { 92 | .progress-bar-variant(@progress-bar-success-bg); 93 | } 94 | 95 | .progress-bar-info { 96 | .progress-bar-variant(@progress-bar-info-bg); 97 | } 98 | 99 | .progress-bar-warning { 100 | .progress-bar-variant(@progress-bar-warning-bg); 101 | } 102 | 103 | .progress-bar-danger { 104 | .progress-bar-variant(@progress-bar-danger-bg); 105 | } 106 | --------------------------------------------------------------------------------