diff --git a/app/game/templates/game/base.html b/app/game/templates/game/base.html index 85be5d4..390ddd9 100644 --- a/app/game/templates/game/base.html +++ b/app/game/templates/game/base.html @@ -38,8 +38,8 @@
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> -<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en"> -<head><script src="//archive.org/includes/analytics.js?v=cf34f82" type="text/javascript"></script> -<script type="text/javascript">window.addEventListener('DOMContentLoaded',function(){var v=archive_analytics.values;v.service='wb';v.server_name='wwwb-app202.us.archive.org';v.server_ms=842;archive_analytics.send_pageview({});});</script> -<script type="text/javascript" src="/_static/js/bundle-playback.js?v=UfTkgsKx" charset="utf-8"></script> -<script type="text/javascript" src="/_static/js/wombat.js?v=UHAOicsW" charset="utf-8"></script> -<script type="text/javascript"> - __wm.init("https://web.archive.org/web"); - __wm.wombat("http://www.bloonsworld.com:80/level_editor/","20070716211456","https://web.archive.org/","web","/_static/", - "1184620496"); -</script> -<link rel="stylesheet" type="text/css" href="/_static/css/banner-styles.css?v=omkqRugM" /> -<link rel="stylesheet" type="text/css" href="/_static/css/iconochive.css?v=qtvMKcIJ" /> -<!-- End Wayback Rewrite JS Include --> - -<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/> -<meta name="title" content="Bloonsworld!"/> -<meta name="robots" content="index, follow"/> -<meta name="description" content="Finally, the creators of Bloons bring you Bloonsworld!"/> -<meta name="keywords" content="flash, games, awesome"/> -<meta name="language" content="en"/> -<title>Bloonsworld!</title> -<!--[if IE6]> -<style> -#wrapper { - background: url(/images/alpha.png); - filter:alpha(opacity=75); -} -</style> -<![endif]--> -<link rel="shortcut icon" href="/web/20070716211456im_/http://www.bloonsworld.com/favicon.ico"/> -<script type="text/javascript" src="/web/20070716211456js_/http://www.bloonsworld.com/sf/sf_web_debug/js/main.js"></script> -<link rel="stylesheet" type="text/css" media="screen" href="/web/20070716211456cs_/http://www.bloonsworld.com/sf/sf_web_debug/css/main.css"/> -<link rel="stylesheet" type="text/css" media="screen" href="/web/20070716211456cs_/http://www.bloonsworld.com/css/main.css"/> - -</head> -<body id="body"><!-- BEGIN WAYBACK TOOLBAR INSERT --> -<style type="text/css"> -body { - margin-top:0 !important; - padding-top:0 !important; - /*min-width:800px !important;*/ -} -</style> -<script>__wm.rw(0);</script> -<div id="wm-ipp-base" lang="en" style="display:none;direction:ltr;"> -<div id="wm-ipp" style="position:fixed;left:0;top:0;right:0;"> -<div id="wm-ipp-inside"> - <div style="position:relative;"> - <div id="wm-logo" style="float:left;width:110px;padding-top:12px;"> - <a href="/web/" title="Wayback Machine home page"><img src="/_static/images/toolbar/wayback-toolbar-logo-200.png" srcset="/_static/images/toolbar/wayback-toolbar-logo-100.png, /_static/images/toolbar/wayback-toolbar-logo-150.png 1.5x, /_static/images/toolbar/wayback-toolbar-logo-200.png 2x" alt="Wayback Machine" style="width:100px" border="0" /></a> - </div> - <div class="r" style="float:right;"> - <div id="wm-btns" style="text-align:right;height:25px;"> - <div id="wm-save-snapshot-success">success</div> - <div id="wm-save-snapshot-fail">fail</div> - <a id="wm-save-snapshot-open" href="#" - title="Share via My Web Archive" > - <span class="iconochive-web"></span> - </a> - <a href="https://archive.org/account/login.php" - title="Sign In" - id="wm-sign-in" - > - <span class="iconochive-person"></span> - </a> - <span id="wm-save-snapshot-in-progress" class="iconochive-web"></span> - <a href="http://faq.web.archive.org/" title="Get some help using the Wayback Machine" style="top:-6px;"><span class="iconochive-question" style="color:rgb(87,186,244);font-size:160%;"></span></a> - <a id="wm-tb-close" href="#close" onclick="__wm.h(event);return false;" style="top:-2px;" title="Close the toolbar"><span class="iconochive-remove-circle" style="color:#888888;font-size:240%;"></span></a> - </div> - <div id="wm-share"> - <a href="/web/20070716211456/http://web.archive.org/screenshot/http://www.bloonsworld.com/level_editor/" - id="wm-screenshot" - title="screenshot"> - <span class="wm-icon-screen-shot"></span> - </a> - <a href="#" - id="wm-video" - title="video"> - <span class="iconochive-movies"></span> - </a> - <a id="wm-share-facebook" href="#" data-url="https://web.archive.org/web/20070716211456/http://www.bloonsworld.com:80/level_editor/" title="Share on Facebook" style="margin-right:5px;" target="_blank"><span class="iconochive-facebook" style="color:#3b5998;font-size:160%;"></span></a> - <a id="wm-share-twitter" href="#" data-url="https://web.archive.org/web/20070716211456/http://www.bloonsworld.com:80/level_editor/" title="Share on Twitter" style="margin-right:5px;" target="_blank"><span class="iconochive-twitter" style="color:#1dcaff;font-size:160%;"></span></a> - </div> - </div> - <table class="c" style=""> - <tbody> - <tr> - <td class="u" colspan="2"> - <form target="_top" method="get" action="/web/submit" name="wmtb" id="wmtb"><input type="text" name="url" id="wmtbURL" value="http://www.bloonsworld.com/level_editor/" onfocus="this.focus();this.select();" /><input type="hidden" name="type" value="replay" /><input type="hidden" name="date" value="20070716211456" /><input type="submit" value="Go" /></form> - </td> - <td class="n" rowspan="2" style="width:110px;"> - <table> - <tbody> - <!-- NEXT/PREV MONTH NAV AND MONTH INDICATOR --> - <tr class="m"> - <td class="b" nowrap="nowrap">Jun</td> - <td class="c" id="displayMonthEl" title="You are here: 21:14:56 Jul 16, 2007">JUL</td> - <td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20070908214107/http://bloonsworld.com:80/level_editor" title="08 Sep 2007"><strong>Sep</strong></a></td> - </tr> - <!-- NEXT/PREV CAPTURE NAV AND DAY OF MONTH INDICATOR --> - <tr class="d"> - <td class="b" nowrap="nowrap"><img src="/_static/images/toolbar/wm_tb_prv_off.png" alt="Previous capture" width="14" height="16" border="0" /></td> - <td class="c" id="displayDayEl" style="width:34px;font-size:24px;white-space:nowrap;" title="You are here: 21:14:56 Jul 16, 2007">16</td> - <td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20070908214107/http://bloonsworld.com:80/level_editor" title="21:41:07 Sep 08, 2007"><img src="/_static/images/toolbar/wm_tb_nxt_on.png" alt="Next capture" width="14" height="16" border="0" /></a></td> - </tr> - <!-- NEXT/PREV YEAR NAV AND YEAR INDICATOR --> - <tr class="y"> - <td class="b" nowrap="nowrap">2006</td> - <td class="c" id="displayYearEl" title="You are here: 21:14:56 Jul 16, 2007">2007</td> - <td class="f" nowrap="nowrap"><a href="https://web.archive.org/web/20081026060307/http://www.bloonsworld.com:80/level_editor" title="26 Oct 2008"><strong>2008</strong></a></td> - </tr> - </tbody> - </table> - </td> - </tr> - <tr> - <td class="s"> - <div id="wm-nav-captures"> - <a class="t" href="/web/20070716211456*/http://www.bloonsworld.com/level_editor/" title="See a list of every capture for this URL">160 captures</a> - <div class="r" title="Timespan for captures of this URL">16 Jul 2007 - 07 Aug 2014</div> - </div> - </td> - <td class="k"> - <a href="" id="wm-graph-anchor"> - <div id="wm-ipp-sparkline" title="Explore captures for this URL" style="position: relative"> - <canvas id="wm-sparkline-canvas" width="650" height="27" border="0"></canvas> - </div> - </a> - </td> - </tr> - </tbody> - </table> - <div style="position:absolute;bottom:0;right:2px;text-align:right;"> - <a id="wm-expand" class="wm-btn wm-closed" href="#expand" onclick="__wm.ex(event);return false;"><span id="wm-expand-icon" class="iconochive-down-solid"></span> <span style="font-size:80%">About this capture</span></a> - </div> - </div> - <div id="wm-capinfo" style="border-top:1px solid #777;display:none; overflow: hidden"> - <div id="wm-capinfo-collected-by"> - <div style="background-color:#666;color:#fff;font-weight:bold;text-align:center">COLLECTED BY</div> - <div style="padding:3px;position:relative" id="wm-collected-by-content"> - <div style="display:inline-block;vertical-align:top;width:50%;"> - <span class="c-logo" style="background-image:url(https://archive.org/services/img/alexacrawls);"></span> - Organization: <a style="color:#33f;" href="https://archive.org/details/alexacrawls" target="_new"><span class="wm-title">Alexa Crawls</span></a> - <div style="max-height:75px;overflow:hidden;position:relative;"> - <div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div> - Starting in 1996, <a href="http://www.alexa.com/">Alexa Internet</a> has been donating their crawl data to the Internet Archive. Flowing in every day, these data are added to the <a href="http://web.archive.org/">Wayback Machine</a> after an embargo period. - </div> - </div> - <div style="display:inline-block;vertical-align:top;width:49%;"> - <span class="c-logo" style="background-image:url(https://archive.org/services/img/42_crawl)"></span> - <div>Collection: <a style="color:#33f;" href="https://archive.org/details/42_crawl" target="_new"><span class="wm-title">42_crawl</span></a></div> - <div style="max-height:75px;overflow:hidden;position:relative;"> - <div style="position:absolute;top:0;left:0;width:100%;height:75px;background:linear-gradient(to bottom,rgba(255,255,255,0) 0%,rgba(255,255,255,0) 90%,rgba(255,255,255,255) 100%);"></div> - this data is currently not publicly accessible. - </div> - </div> - </div> - </div> - <div id="wm-capinfo-timestamps"> - <div style="background-color:#666;color:#fff;font-weight:bold;text-align:center" title="Timestamps for the elements of this page">TIMESTAMPS</div> - <div> - <div id="wm-capresources" style="margin:0 5px 5px 5px;max-height:250px;overflow-y:scroll !important"></div> - <div id="wm-capresources-loading" style="text-align:left;margin:0 20px 5px 5px;display:none"><img src="/_static/images/loading.gif" alt="loading" /></div> - </div> - </div> - </div></div></div></div><div id="wm-ipp-print">The Wayback Machine - https://web.archive.org/web/20070716211456/http://www.bloonsworld.com:80/level_editor/</div> -<div id="donato" style="position:relative;width:100%;"> - <div id="donato-base"> - <iframe id="donato-if" src="https://archive.org/includes/donate.php?as_page=1&platform=wb&referer=https%3A//web.archive.org/web/20070716211456/http%3A//www.bloonsworld.com/level_editor/" - scrolling="no" frameborder="0" style="width:100%; height:100%"> - </iframe> - </div> -</div><script type="text/javascript"> -__wm.bt(650,27,25,2,"web","http://www.bloonsworld.com/level_editor/","20070716211456",1996,"/_static/",["/_static/css/banner-styles.css?v=omkqRugM","/_static/css/iconochive.css?v=qtvMKcIJ"], "False"); - __wm.rw(1); -</script> -<!-- END WAYBACK TOOLBAR INSERT --> - <div id="wrapper"> - <div id="inner_wrapper"> - <div id="alpha"></div> - <a href="/web/20070716211456/http://www.bloonsworld.com/public_dev.php/" id="header"></a> - <div id="content"> - <div class="wide full"> - <h1>Our apologies</h1> - <p>There has been an error - we're working on it right away!<p> - <br/> - <p>While we're away, please visit <a href="https://web.archive.org/web/20070716211456/http://www.ninjakiwi.com/">Ninja Kiwi</a>.<p> - <br/> - <p>Thanks for your patience!</p> - <br/> - <p>Sincerely, </p> - <p>The Bloonsworld Team</p> - </div> - </div> - </div> - </div> - </div> -</div><!-- - FILE ARCHIVED ON 21:14:56 Jul 16, 2007 AND RETRIEVED FROM THE - INTERNET ARCHIVE ON 15:04:19 Sep 29, 2021. - JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. - - ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. - SECTION 108(a)(3)). ---> -<!-- -playback timings (ms): - captures_list: 219.132 - exclusion.robots: 0.145 - exclusion.robots.policy: 0.139 - RedisCDXSource: 2.998 - esindex: 0.004 - LoadShardBlock: 197.401 (3) - PetaboxLoader3.datanode: 193.251 (4) - CDXLines.iter: 15.727 (3) - load_resource: 619.351 - PetaboxLoader3.resolve: 530.559 --->\ No newline at end of file +error.html \ No newline at end of file diff --git a/app/users/__init__.py b/app/users/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/users/admin.py b/app/users/admin.py new file mode 100644 index 0000000..8c38f3f --- /dev/null +++ b/app/users/admin.py @@ -0,0 +1,3 @@ +from django.contrib import admin + +# Register your models here. diff --git a/app/users/apps.py b/app/users/apps.py new file mode 100644 index 0000000..86c66f5 --- /dev/null +++ b/app/users/apps.py @@ -0,0 +1,6 @@ +from django.apps import AppConfig + + +class PlayersConfig(AppConfig): + default_auto_field = 'django.db.models.BigAutoField' + name = 'players' diff --git a/app/users/migrations/__init__.py b/app/users/migrations/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/app/users/models.py b/app/users/models.py new file mode 100644 index 0000000..a9986bc --- /dev/null +++ b/app/users/models.py @@ -0,0 +1,25 @@ +from django.db import models +from django.utils import timezone +from django.contrib.auth.models import User + +from game.models import Level + +class CustomUser(User): + ... + +class Player(models.Model): + user = models.ForeignKey(CustomUser, on_delete=models.CASCADE, null=True, blank=True) + # Savedata + levelsPlayed = models.ManyToManyField(Level, blank=True) + levelsBeaten = models.ManyToManyField(Level, blank=True) + levelsRated = ... + # Logging + creationIP = models.GenericIPAddressField() + latestIP = models.GenericIPAddressField() + creationDate = models.DateTimeField(default=timezone.now) + latestActivity = models.DateTimeField(default=timezone.now) + suspectedCheater = models.BooleanField(default=False) + # States + suspended = models.BooleanField(default=False) + banned = models.BooleanField(default=False) + admin = models.BooleanField(default=False) \ No newline at end of file diff --git a/app/users/templates/user/login.html b/app/users/templates/user/login.html new file mode 100644 index 0000000..82c7b2c --- /dev/null +++ b/app/users/templates/user/login.html @@ -0,0 +1 @@ +{% extends "game/base.html" %} \ No newline at end of file diff --git a/app/users/templates/user/register.html b/app/users/templates/user/register.html new file mode 100644 index 0000000..82c7b2c --- /dev/null +++ b/app/users/templates/user/register.html @@ -0,0 +1 @@ +{% extends "game/base.html" %} \ No newline at end of file diff --git a/app/users/tests.py b/app/users/tests.py new file mode 100644 index 0000000..7ce503c --- /dev/null +++ b/app/users/tests.py @@ -0,0 +1,3 @@ +from django.test import TestCase + +# Create your tests here. diff --git a/app/users/validators.py b/app/users/validators.py new file mode 100644 index 0000000..8b5ab27 --- /dev/null +++ b/app/users/validators.py @@ -0,0 +1,7 @@ +from django.core.exceptions import ValidationError + +from users.models import User, Player + +def usernameValidator(username): + if User.objects.filter(username__iexact=username).first() is not None: + raise ValidationError("Sorry, deze gebruikersnaam is al in gebruik") \ No newline at end of file diff --git a/app/users/views.py b/app/users/views.py new file mode 100644 index 0000000..ed84443 --- /dev/null +++ b/app/users/views.py @@ -0,0 +1,11 @@ +from django.shortcuts import render +from django.contrib.auth.forms import UserCreationForm + + + + +class + + + +# Create your views here.