Permalink
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...
1 parent 6eca4ca commit c006938b9d73cc7a19c9998b7848c402eae21ae4 @micolous committed Apr 19, 2012
Showing with 42 additions and 5 deletions.
  1. +1 −1 manage.py
  2. +34 −0 setup.py
  3. 0 { → tollgate}/__init__.py
  4. 0 { → tollgate}/api/__init__.py
  5. 0 { → tollgate}/api/models.py
  6. 0 { → tollgate}/api/urls.py
  7. 0 { → tollgate}/api/views.py
  8. 0 { → 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/management → 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/migrations → 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 {scripts → 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. BIN { → tollgate}/frontend/static/tollgate/console_icons/apple.png
  30. BIN { → tollgate}/frontend/static/tollgate/console_icons/cisco.png
  31. BIN { → tollgate}/frontend/static/tollgate/console_icons/nintendo.png
  32. BIN { → tollgate}/frontend/static/tollgate/console_icons/pc.png
  33. BIN { → tollgate}/frontend/static/tollgate/console_icons/playstation.png
  34. BIN { → tollgate}/frontend/static/tollgate/console_icons/xbox.png
  35. BIN { → 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. BIN { → tollgate}/frontend/static/tollgate/greenstripes.png
  40. 0 { → tollgate}/frontend/static/tollgate/platinum.css
  41. BIN { → tollgate}/frontend/static/tollgate/portal-bg.png
  42. BIN { → tollgate}/frontend/static/tollgate/portal2.png
  43. 0 { → tollgate}/frontend/static/tollgate/terminal.css
  44. BIN { → 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 {scripts/management → tollgate/scripts}/__init__.py
  85. 0 {scripts/management/commands → 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
@@ -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
@@ -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',
+ ],
+ },
+
+)
+
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
@@ -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()
File renamed without changes.
File renamed without changes.
@@ -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
File renamed without changes.
File renamed without changes.
@@ -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
File renamed without changes.
File renamed without changes.
@@ -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
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 comments on commit c006938

Please sign in to comment.