Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Big reshuffle so that everything is in the "tollgate" package. Starte…

…d working on a setup.py for issue #7
  • Loading branch information...
commit c006938b9d73cc7a19c9998b7848c402eae21ae4 1 parent 6eca4ca
@micolous authored
Showing with 42 additions and 5 deletions.
  1. +1 −1  manage.py
  2. +34 −0 setup.py
  3. 0  {scripts/management/commands → tollgate}/__init__.py
  4. 0  {scripts/management → tollgate/api}/__init__.py
  5. 0  { → tollgate}/api/models.py
  6. 0  { → tollgate}/api/urls.py
  7. 0  { → tollgate}/api/views.py
  8. 0  {scripts → tollgate/backend}/__init__.py
  9. 0  { → tollgate}/backend/iptables.py
  10. 0  { → tollgate}/backend/tollgate_backend.py
  11. 0  { → tollgate}/captive_landing/.gitignore
  12. 0  { → tollgate}/captive_landing/README.md
  13. 0  {frontend/migrations → tollgate/captive_landing}/__init__.py
  14. +4 −1 { → tollgate}/captive_landing/tproxy.py
  15. 0  { → tollgate}/frontend/__init__.py
  16. 0  { → tollgate}/frontend/admin.py
  17. +1 −1  { → tollgate}/frontend/common.py
  18. 0  { → tollgate}/frontend/forms.py
  19. 0  {frontend/management/commands → tollgate/frontend/management}/__init__.py
  20. 0  {frontend/management → tollgate/frontend/management/commands}/__init__.py
  21. 0  { → tollgate}/frontend/management/commands/refresh_hosts.py
  22. 0  { → tollgate}/frontend/migrations/0001_initial.py
  23. 0  {backend → tollgate/frontend/migrations}/__init__.py
  24. +1 −1  { → tollgate}/frontend/models.py
  25. 0  { → tollgate}/frontend/platform/__init__.py
  26. 0  { → tollgate}/frontend/platform/dummy.py
  27. 0  { → tollgate}/frontend/platform/linux.py
  28. 0  { → tollgate}/frontend/static/tollgate/cake.css
  29. 0  { → tollgate}/frontend/static/tollgate/console_icons/apple.png
  30. 0  { → tollgate}/frontend/static/tollgate/console_icons/cisco.png
  31. 0  { → tollgate}/frontend/static/tollgate/console_icons/nintendo.png
  32. 0  { → tollgate}/frontend/static/tollgate/console_icons/pc.png
  33. 0  { → tollgate}/frontend/static/tollgate/console_icons/playstation.png
  34. 0  { → tollgate}/frontend/static/tollgate/console_icons/xbox.png
  35. 0  { → tollgate}/frontend/static/tollgate/doasisay.png
  36. 0  { → tollgate}/frontend/static/tollgate/flot/excanvas.min.js
  37. 0  { → tollgate}/frontend/static/tollgate/flot/jquery.flot.min.js
  38. 0  { → tollgate}/frontend/static/tollgate/flot/jquery.min.js
  39. 0  { → tollgate}/frontend/static/tollgate/greenstripes.png
  40. 0  { → tollgate}/frontend/static/tollgate/platinum.css
  41. 0  { → tollgate}/frontend/static/tollgate/portal-bg.png
  42. 0  { → tollgate}/frontend/static/tollgate/portal2.png
  43. 0  { → tollgate}/frontend/static/tollgate/terminal.css
  44. 0  { → tollgate}/frontend/static/tollgate/virtue.ttf
  45. 0  { → tollgate}/frontend/templates/admin/base_site.html
  46. 0  { → tollgate}/frontend/templates/frontend/arp-cache-error.html
  47. 0  { → tollgate}/frontend/templates/frontend/base-internet.html
  48. 0  { → tollgate}/frontend/templates/frontend/base-pclist.html
  49. 0  { → tollgate}/frontend/templates/frontend/base-usage.html
  50. 0  { → tollgate}/frontend/templates/frontend/base.html
  51. 0  { → tollgate}/frontend/templates/frontend/cant-reset-yourself.html
  52. 0  { → tollgate}/frontend/templates/frontend/captive_landing.html
  53. 0  { → tollgate}/frontend/templates/frontend/controller-error.html
  54. 0  { → tollgate}/frontend/templates/frontend/error.html
  55. 0  { → tollgate}/frontend/templates/frontend/event-not-active.html
  56. 0  { → tollgate}/frontend/templates/frontend/help/api.html
  57. 0  { → tollgate}/frontend/templates/frontend/help/new.html
  58. 0  { → tollgate}/frontend/templates/frontend/help/source.html
  59. 0  { → tollgate}/frontend/templates/frontend/index.html
  60. 0  { → tollgate}/frontend/templates/frontend/internet.html
  61. 0  { → tollgate}/frontend/templates/frontend/internet_login-already_owned.html
  62. 0  { → tollgate}/frontend/templates/frontend/internet_login-not_in_subnet.html
  63. 0  { → tollgate}/frontend/templates/frontend/internet_login.html
  64. 0  { → tollgate}/frontend/templates/frontend/internet_login_here-failure.html
  65. 0  { → tollgate}/frontend/templates/frontend/ip4portforward_confirm_delete.html
  66. 0  { → tollgate}/frontend/templates/frontend/ip4portforward_form.html
  67. 0  { → tollgate}/frontend/templates/frontend/ip4portforward_list.html
  68. 0  { → tollgate}/frontend/templates/frontend/login.html
  69. 0  { → tollgate}/frontend/templates/frontend/logout.html
  70. 0  { → tollgate}/frontend/templates/frontend/not-a-console.html
  71. 0  { → tollgate}/frontend/templates/frontend/not-signed-in.html
  72. 0  { → tollgate}/frontend/templates/frontend/pclist.html
  73. 0  { → tollgate}/frontend/templates/frontend/quota.html
  74. 0  { → tollgate}/frontend/templates/frontend/reset-lecture.html
  75. 0  { → tollgate}/frontend/templates/frontend/signin1.html
  76. 0  { → tollgate}/frontend/templates/frontend/signin2.html
  77. 0  { → tollgate}/frontend/templates/frontend/signin3.html
  78. 0  { → tollgate}/frontend/templates/frontend/usage-info.html
  79. 0  { → tollgate}/frontend/templates/frontend/usage.html
  80. +1 −1  { → tollgate/frontend}/tollgate_controller_api.py
  81. 0  { → tollgate}/frontend/urls.py
  82. 0  { → tollgate}/frontend/views.py
  83. 0  { → tollgate}/scraper.dat
  84. 0  {api → tollgate/scripts}/__init__.py
  85. 0  { → tollgate/scripts/management}/__init__.py
  86. 0  tollgate/scripts/management/commands/__init__.py
  87. 0  { → tollgate}/scripts/management/commands/repair_permissions.py
  88. 0  { → tollgate}/scripts/management/commands/scraper.py
  89. 0  { → tollgate}/scripts/management/commands/setup_settings.py
  90. 0  { → tollgate}/settings/__init__.py
  91. 0  { → tollgate}/settings/base.py
  92. 0  { → tollgate}/tollgate.wsgi
  93. 0  { → tollgate}/urls.py
View
2  manage.py
@@ -1,7 +1,7 @@
#!/usr/bin/python
from django.core.management import execute_manager
try:
- import settings # Assumed to be in the same directory.
+ import tollgate.settings as settings
except ImportError:
import sys
sys.stderr.write("Error: Can't find the file 'settings.py' in the directory containing %r. It appears you've customized things.\nYou'll have to run django-admin.py, passing it your settings module.\n(If the file settings.py does indeed exist, it's causing an ImportError somehow.)\n" % __file__)
View
34 setup.py
@@ -0,0 +1,34 @@
+#!/usr/bin/env python
+
+from setuptools import setup, find_packages
+
+setup(
+ name="tollgate",
+ version="2.8.4-dev",
+ description="Python/Django-based captive portal for LAN parties.",
+ author="Michael Farrell",
+ author_email="micolous@gmail.com",
+ url="https://github.com/micolous/tollgate",
+ license="AGPL3",
+ requires=(
+ 'Django (>=1.3)',
+ 'South (>=0.7.4)',
+ 'progressbar (>=2.2)',
+ 'configparser_plus (>=1.0)',
+ 'lxml',
+ 'dbus',
+ 'daemon',
+ ),
+
+ packages=find_packages(),
+ include_package_data=True,
+
+ entry_points = {
+ 'console_scripts': [
+ 'tollgate_backend = tollgate.backend.tollgate_backend:main_optparse',
+ 'tollgate_captivity = tollgate.captive_landing.tproxy:main_optparse',
+ ],
+ },
+
+)
+
View
0  scripts/management/commands/__init__.py → tollgate/__init__.py
File renamed without changes
View
0  scripts/management/__init__.py → tollgate/api/__init__.py
File renamed without changes
View
0  api/models.py → tollgate/api/models.py
File renamed without changes
View
0  api/urls.py → tollgate/api/urls.py
File renamed without changes
View
0  api/views.py → tollgate/api/views.py
File renamed without changes
View
0  scripts/__init__.py → tollgate/backend/__init__.py
File renamed without changes
View
0  backend/iptables.py → tollgate/backend/iptables.py
File renamed without changes
View
0  backend/tollgate_backend.py → tollgate/backend/tollgate_backend.py
File renamed without changes
View
0  captive_landing/.gitignore → tollgate/captive_landing/.gitignore
File renamed without changes
View
0  captive_landing/README.md → tollgate/captive_landing/README.md
File renamed without changes
View
0  frontend/migrations/__init__.py → tollgate/captive_landing/__init__.py
File renamed without changes
View
5 captive_landing/tproxy.py → tollgate/captive_landing/tproxy.py
@@ -78,7 +78,8 @@ def run(self):
while self.keep_running:
self.httpd.handle_request()
-if __name__ == '__main__':
+def main_optparse():
+ "Entrypoint for the tproxy handler, that uses optparse to parse commandline arguments."
parser = OptionParser(usage="%prog [-D] -l 'https://tollgate.example.com'")
parser.add_option('-D', '--daemon', action='store_true', dest='daemon', help='start as a daemon')
parser.add_option('-l', '--tollgate-uri', dest='tollgate_uri', metavar='URI', help='root URI of tollgate frontend HTTPS server')
@@ -110,3 +111,5 @@ def run(self):
else:
server.run()
+if __name__ == '__main__':
+ main_optparse()
View
0  frontend/__init__.py → tollgate/frontend/__init__.py
File renamed without changes
View
0  frontend/admin.py → tollgate/frontend/admin.py
File renamed without changes
View
2  frontend/common.py → tollgate/frontend/common.py
@@ -18,7 +18,7 @@
from django.shortcuts import render_to_response
from django.template import RequestContext
from traceback import extract_tb
-from tollgate.tollgate_controller_api import NotAConsoleException
+from tollgate.frontend.tollgate_controller_api import NotAConsoleException
from django.conf import settings
from base64 import b32decode, b64decode
from django.core.validators import URLValidator
View
0  frontend/forms.py → tollgate/frontend/forms.py
File renamed without changes
View
0  frontend/management/commands/__init__.py → tollgate/frontend/management/__init__.py
File renamed without changes
View
0  frontend/management/__init__.py → .../frontend/management/commands/__init__.py
File renamed without changes
View
0  ...tend/management/commands/refresh_hosts.py → ...tend/management/commands/refresh_hosts.py
File renamed without changes
View
0  frontend/migrations/0001_initial.py → tollgate/frontend/migrations/0001_initial.py
File renamed without changes
View
0  backend/__init__.py → tollgate/frontend/migrations/__init__.py
File renamed without changes
View
2  frontend/models.py → tollgate/frontend/models.py
@@ -19,7 +19,7 @@
from django.contrib.auth.models import User
from datetime import datetime
from django.conf import settings
-from tollgate.tollgate_controller_api import TollgateController
+from tollgate.frontend.tollgate_controller_api import TollgateController
from os import popen
from django.core.exceptions import ObjectDoesNotExist
from socket import gethostbyaddr
View
0  frontend/platform/__init__.py → tollgate/frontend/platform/__init__.py
File renamed without changes
View
0  frontend/platform/dummy.py → tollgate/frontend/platform/dummy.py
File renamed without changes
View
0  frontend/platform/linux.py → tollgate/frontend/platform/linux.py
File renamed without changes
View
0  frontend/static/tollgate/cake.css → tollgate/frontend/static/tollgate/cake.css
File renamed without changes
View
0  ...d/static/tollgate/console_icons/apple.png → ...d/static/tollgate/console_icons/apple.png
File renamed without changes
View
0  ...d/static/tollgate/console_icons/cisco.png → ...d/static/tollgate/console_icons/cisco.png
File renamed without changes
View
0  ...tatic/tollgate/console_icons/nintendo.png → ...tatic/tollgate/console_icons/nintendo.png
File renamed without changes
View
0  ...tend/static/tollgate/console_icons/pc.png → ...tend/static/tollgate/console_icons/pc.png
File renamed without changes
View
0  ...ic/tollgate/console_icons/playstation.png → ...ic/tollgate/console_icons/playstation.png
File renamed without changes
View
0  ...nd/static/tollgate/console_icons/xbox.png → ...nd/static/tollgate/console_icons/xbox.png
File renamed without changes
View
0  frontend/static/tollgate/doasisay.png → ...ate/frontend/static/tollgate/doasisay.png
File renamed without changes
View
0  ...tend/static/tollgate/flot/excanvas.min.js → ...tend/static/tollgate/flot/excanvas.min.js
File renamed without changes
View
0  ...d/static/tollgate/flot/jquery.flot.min.js → ...d/static/tollgate/flot/jquery.flot.min.js
File renamed without changes
View
0  frontend/static/tollgate/flot/jquery.min.js → ...ontend/static/tollgate/flot/jquery.min.js
File renamed without changes
View
0  frontend/static/tollgate/greenstripes.png → ...frontend/static/tollgate/greenstripes.png
File renamed without changes
View
0  frontend/static/tollgate/platinum.css → ...ate/frontend/static/tollgate/platinum.css
File renamed without changes
View
0  frontend/static/tollgate/portal-bg.png → ...te/frontend/static/tollgate/portal-bg.png
File renamed without changes
View
0  frontend/static/tollgate/portal2.png → ...gate/frontend/static/tollgate/portal2.png
File renamed without changes
View
0  frontend/static/tollgate/terminal.css → ...ate/frontend/static/tollgate/terminal.css
File renamed without changes
View
0  frontend/static/tollgate/virtue.ttf → tollgate/frontend/static/tollgate/virtue.ttf
File renamed without changes
View
0  frontend/templates/admin/base_site.html → ...e/frontend/templates/admin/base_site.html
File renamed without changes
View
0  ...d/templates/frontend/arp-cache-error.html → ...d/templates/frontend/arp-cache-error.html
File renamed without changes
View
0  ...end/templates/frontend/base-internet.html → ...end/templates/frontend/base-internet.html
File renamed without changes
View
0  frontend/templates/frontend/base-pclist.html → ...ntend/templates/frontend/base-pclist.html
File renamed without changes
View
0  frontend/templates/frontend/base-usage.html → ...ontend/templates/frontend/base-usage.html
File renamed without changes
View
0  frontend/templates/frontend/base.html → ...ate/frontend/templates/frontend/base.html
File renamed without changes
View
0  ...mplates/frontend/cant-reset-yourself.html → ...mplates/frontend/cant-reset-yourself.html
File renamed without changes
View
0  ...d/templates/frontend/captive_landing.html → ...d/templates/frontend/captive_landing.html
File renamed without changes
View
0  .../templates/frontend/controller-error.html → .../templates/frontend/controller-error.html
File renamed without changes
View
0  frontend/templates/frontend/error.html → ...te/frontend/templates/frontend/error.html
File renamed without changes
View
0  .../templates/frontend/event-not-active.html → .../templates/frontend/event-not-active.html
File renamed without changes
View
0  frontend/templates/frontend/help/api.html → ...frontend/templates/frontend/help/api.html
File renamed without changes
View
0  frontend/templates/frontend/help/new.html → ...frontend/templates/frontend/help/new.html
File renamed without changes
View
0  frontend/templates/frontend/help/source.html → ...ntend/templates/frontend/help/source.html
File renamed without changes
View
0  frontend/templates/frontend/index.html → ...te/frontend/templates/frontend/index.html
File renamed without changes
View
0  frontend/templates/frontend/internet.html → ...frontend/templates/frontend/internet.html
File renamed without changes
View
0  ...rontend/internet_login-already_owned.html → ...rontend/internet_login-already_owned.html
File renamed without changes
View
0  ...rontend/internet_login-not_in_subnet.html → ...rontend/internet_login-not_in_subnet.html
File renamed without changes
View
0  ...nd/templates/frontend/internet_login.html → ...nd/templates/frontend/internet_login.html
File renamed without changes
View
0  ...frontend/internet_login_here-failure.html → ...frontend/internet_login_here-failure.html
File renamed without changes
View
0  ...ontend/ip4portforward_confirm_delete.html → ...ontend/ip4portforward_confirm_delete.html
File renamed without changes
View
0  ...mplates/frontend/ip4portforward_form.html → ...mplates/frontend/ip4portforward_form.html
File renamed without changes
View
0  ...mplates/frontend/ip4portforward_list.html → ...mplates/frontend/ip4portforward_list.html
File renamed without changes
View
0  frontend/templates/frontend/login.html → ...te/frontend/templates/frontend/login.html
File renamed without changes
View
0  frontend/templates/frontend/logout.html → ...e/frontend/templates/frontend/logout.html
File renamed without changes
View
0  ...end/templates/frontend/not-a-console.html → ...end/templates/frontend/not-a-console.html
File renamed without changes
View
0  ...end/templates/frontend/not-signed-in.html → ...end/templates/frontend/not-signed-in.html
File renamed without changes
View
0  frontend/templates/frontend/pclist.html → ...e/frontend/templates/frontend/pclist.html
File renamed without changes
View
0  frontend/templates/frontend/quota.html → ...te/frontend/templates/frontend/quota.html
File renamed without changes
View
0  ...end/templates/frontend/reset-lecture.html → ...end/templates/frontend/reset-lecture.html
File renamed without changes
View
0  frontend/templates/frontend/signin1.html → .../frontend/templates/frontend/signin1.html
File renamed without changes
View
0  frontend/templates/frontend/signin2.html → .../frontend/templates/frontend/signin2.html
File renamed without changes
View
0  frontend/templates/frontend/signin3.html → .../frontend/templates/frontend/signin3.html
File renamed without changes
View
0  frontend/templates/frontend/usage-info.html → ...ontend/templates/frontend/usage-info.html
File renamed without changes
View
0  frontend/templates/frontend/usage.html → ...te/frontend/templates/frontend/usage.html
File renamed without changes
View
2  tollgate_controller_api.py → tollgate/frontend/tollgate_controller_api.py
@@ -1,6 +1,6 @@
#!/usr/bin/python
"""Tollgate Controller API
-Copyright 2008-2011 Michael Farrell <http://micolous.id.au/>
+Copyright 2008-2012 Michael Farrell <http://micolous.id.au/>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU Affero General Public License as published by
View
0  frontend/urls.py → tollgate/frontend/urls.py
File renamed without changes
View
0  frontend/views.py → tollgate/frontend/views.py
File renamed without changes
View
0  scraper.dat → tollgate/scraper.dat
File renamed without changes
View
0  api/__init__.py → tollgate/scripts/__init__.py
File renamed without changes
View
0  __init__.py → tollgate/scripts/management/__init__.py
File renamed without changes
View
0  tollgate/scripts/management/commands/__init__.py
No changes.
View
0  ...management/commands/repair_permissions.py → ...management/commands/repair_permissions.py
File renamed without changes
View
0  scripts/management/commands/scraper.py → ...te/scripts/management/commands/scraper.py
File renamed without changes
View
0  ...pts/management/commands/setup_settings.py → ...pts/management/commands/setup_settings.py
File renamed without changes
View
0  settings/__init__.py → tollgate/settings/__init__.py
File renamed without changes
View
0  settings/base.py → tollgate/settings/base.py
File renamed without changes
View
0  tollgate.wsgi → tollgate/tollgate.wsgi
File renamed without changes
View
0  urls.py → tollgate/urls.py
File renamed without changes

0 comments on commit c006938

Please sign in to comment.
Something went wrong with that request. Please try again.