Skip to content
Snippets Groups Projects
Commit 9aa4344d authored by Brian Moe's avatar Brian Moe
Browse files

Removed requirement that project have any certain name.

parent b5769333
No related branches found
No related tags found
No related merge requests found
...@@ -9,7 +9,7 @@ from django.conf import settings ...@@ -9,7 +9,7 @@ from django.conf import settings
from django.contrib.sites.models import Site from django.contrib.sites.models import Site
from django.core.urlresolvers import reverse, get_script_prefix from django.core.urlresolvers import reverse, get_script_prefix
from gracedb.userprofile.models import Trigger, AnalysisType from userprofile.models import Trigger, AnalysisType
import glue.ligolw.utils import glue.ligolw.utils
import glue.lvalert.utils import glue.lvalert.utils
......
...@@ -8,11 +8,12 @@ See the VOEvent specification for details ...@@ -8,11 +8,12 @@ See the VOEvent specification for details
http://www.ivoa.net/Documents/latest/VOEvent.html http://www.ivoa.net/Documents/latest/VOEvent.html
""" """
from gracedb.VOEventLib.VOEvent import * from VOEventLib.VOEvent import *
from gracedb.VOEventLib.Vutil import * from VOEventLib.Vutil import *
import sys, os import sys, os
from gracedb.utils import gpsToUtc # XXX ER2.utils. utils is in project directory. ugh.
from utils import gpsToUtc
from django.conf import settings from django.conf import settings
def buildVOEvent(gevent): def buildVOEvent(gevent):
......
from django.contrib.auth import authenticate from django.contrib.auth import authenticate
from gracedb.gracedb.models import User from gracedb.models import User
from django.contrib.auth.models import User as DjangoUser from django.contrib.auth.models import User as DjangoUser
import re import re
......
...@@ -5,7 +5,8 @@ import string ...@@ -5,7 +5,8 @@ import string
import os import os
from gracedb.utils import posixToGpsTime # XXX ER2.utils. utils is in project directory. ugh.
from utils import posixToGpsTime
from django.conf import settings from django.conf import settings
import pytz, time import pytz, time
......
...@@ -6,7 +6,8 @@ from django.utils import dateformat ...@@ -6,7 +6,8 @@ from django.utils import dateformat
from django.utils.html import conditional_escape from django.utils.html import conditional_escape
from django.utils.safestring import mark_safe from django.utils.safestring import mark_safe
from gracedb.utils import posixToGpsTime, gpsToUtc # XXX utils is in the project root. this is not right. ER2.utils
from utils import posixToGpsTime, gpsToUtc
import pytz import pytz
import time import time
......
...@@ -3,7 +3,7 @@ from django.conf.urls.defaults import * ...@@ -3,7 +3,7 @@ from django.conf.urls.defaults import *
#import django.views.generic.list_detail #import django.views.generic.list_detail
urlpatterns = patterns('gracedb.gracedb.views', urlpatterns = patterns('gracedb.views',
url (r'^$', 'index', name="home"), url (r'^$', 'index', name="home"),
url (r'^create/$', 'create', name="create"), url (r'^create/$', 'create', name="create"),
url (r'^search/(?P<format>(json|flex))?$', 'search', name="search"), url (r'^search/(?P<format>(json|flex))?$', 'search', name="search"),
......
...@@ -720,7 +720,7 @@ def oldsearch(request): ...@@ -720,7 +720,7 @@ def oldsearch(request):
context_instance=RequestContext(request)) context_instance=RequestContext(request))
def timeline(request): def timeline(request):
from gracedb.utils import gpsToUtc from utils import gpsToUtc
from django.utils import dateformat from django.utils import dateformat
response = HttpResponse(mimetype='application/javascript') response = HttpResponse(mimetype='application/javascript')
......
#!/usr/bin/env python #!/usr/bin/env python
from django.core.management import execute_manager from django.core.management import execute_manager
# THIS IS TERRIBLE, but some idiot named the project AND application gracedb.
# Things looking for gracedb.settings fail because they find the app not the proj.
# This also causes things wanting the app having to do gracedb.gracedb.whatever
# all the time, but that mess has already been made.
import sys, os
sys.path.insert(0, os.path.join(os.path.dirname(__file__),'..'))
try: try:
import settings # Assumed to be in the same directory. import settings # Assumed to be in the same directory.
......
...@@ -17,6 +17,9 @@ ROOT_PATH = os.path.abspath( os.path.join( os.path.dirname(__file__), os.pardir ...@@ -17,6 +17,9 @@ ROOT_PATH = os.path.abspath( os.path.join( os.path.dirname(__file__), os.pardir
configs = { configs = {
'/home/bmoe/ER2': 'development_er2', '/home/bmoe/ER2': 'development_er2',
'/home/bmoe/er2box/lib/python2.6/site-packages/gracedb' : 'development_er2', '/home/bmoe/er2box/lib/python2.6/site-packages/gracedb' : 'development_er2',
'/home/bmoe/er2box/lib/python2.6/site-packages/ER2' : 'development_er2',
'/home/bmoe/gracedb': 'development', '/home/bmoe/gracedb': 'development',
'/home/gracedb/gracedb': 'production', '/home/gracedb/gracedb': 'production',
} }
......
...@@ -150,21 +150,21 @@ TEMPLATE_CONTEXT_PROCESSORS = ( ...@@ -150,21 +150,21 @@ TEMPLATE_CONTEXT_PROCESSORS = (
"django.core.context_processors.media", "django.core.context_processors.media",
"django.core.context_processors.request", "django.core.context_processors.request",
"gracedb.middleware.auth.LigoAuthContext", "gracedb.middleware.auth.LigoAuthContext",
'gracedb.middleware.debug.LigoDebugContext', 'middleware.debug.LigoDebugContext',
) )
AUTHENTICATION_BACKENDS = ('gracedb.middleware.auth.LigoAuthBackend',) AUTHENTICATION_BACKENDS = ('gracedb.middleware.auth.LigoAuthBackend',)
MIDDLEWARE_CLASSES = [ MIDDLEWARE_CLASSES = [
'gracedb.middleware.accept.AcceptMiddleware', 'middleware.accept.AcceptMiddleware',
'gracedb.middleware.auth.LigoAuthMiddleware', 'gracedb.middleware.auth.LigoAuthMiddleware',
'gracedb.middleware.cli.CliExceptionMiddleware', 'middleware.cli.CliExceptionMiddleware',
'django.middleware.common.CommonMiddleware', 'django.middleware.common.CommonMiddleware',
'django.contrib.sessions.middleware.SessionMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware',
'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware',
] ]
ROOT_URLCONF = 'gracedb.urls' ROOT_URLCONF = 'urls'
TEMPLATE_DIRS = ( TEMPLATE_DIRS = (
# Put strings here, like "/home/html/django_templates" or "C:/www/django/templates". # Put strings here, like "/home/html/django_templates" or "C:/www/django/templates".
...@@ -179,6 +179,6 @@ INSTALLED_APPS = ( ...@@ -179,6 +179,6 @@ INSTALLED_APPS = (
'django.contrib.contenttypes', 'django.contrib.contenttypes',
'django.contrib.sessions', 'django.contrib.sessions',
'django.contrib.sites', 'django.contrib.sites',
'gracedb.gracedb', 'gracedb',
'gracedb.userprofile', 'userprofile',
) )
...@@ -14,20 +14,20 @@ feeds = { ...@@ -14,20 +14,20 @@ feeds = {
urlpatterns = patterns('', urlpatterns = patterns('',
url (r'^$', 'gracedb.gracedb.views.index', name="home"), url (r'^$', 'gracedb.views.index', name="home"),
(r'^events/', include('gracedb.gracedb.urls')), (r'^events/', include('gracedb.urls')),
(r'^options/', include('gracedb.userprofile.urls')), (r'^options/', include('userprofile.urls')),
(r'^cli/create', 'gracedb.gracedb.views.create'), (r'^cli/create', 'gracedb.views.create'),
(r'^cli/ping', 'gracedb.gracedb.views.ping'), (r'^cli/ping', 'gracedb.views.ping'),
(r'^cli/log', 'gracedb.gracedb.views.log'), (r'^cli/log', 'gracedb.views.log'),
(r'^cli/upload', 'gracedb.gracedb.views.upload'), (r'^cli/upload', 'gracedb.views.upload'),
(r'^cli/tag', 'gracedb.gracedb.views.cli_tag'), (r'^cli/tag', 'gracedb.views.cli_tag'),
(r'^cli/label', 'gracedb.gracedb.views.cli_label'), (r'^cli/label', 'gracedb.views.cli_label'),
(r'^cli/search', 'gracedb.gracedb.views.cli_search'), (r'^cli/search', 'gracedb.views.cli_search'),
(r'^feeds/(?P<url>.*)/$', EventFeed()), (r'^feeds/(?P<url>.*)/$', EventFeed()),
url (r'^feeds/$', feedview, name="feeds"), url (r'^feeds/$', feedview, name="feeds"),
url (r'^reports/$', 'gracedb.gracedb.reports.histo', name="reports"), url (r'^reports/$', 'gracedb.reports.histo', name="reports"),
(r'^reports/(?P<path>.+)$', 'django.views.static.serve', (r'^reports/(?P<path>.+)$', 'django.views.static.serve',
{'document_root': settings.LATENCY_REPORT_DEST_DIR}), {'document_root': settings.LATENCY_REPORT_DEST_DIR}),
......
from django.db import models from django.db import models
from gracedb.gracedb.models import User, Label, Event from gracedb.models import User, Label, Event
#class Notification(models.Model): #class Notification(models.Model):
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
from django.conf.urls.defaults import * from django.conf.urls.defaults import *
urlpatterns = patterns('gracedb.userprofile.views', urlpatterns = patterns('userprofile.views',
url (r'^$', 'index', name="userprofile-home"), url (r'^$', 'index', name="userprofile-home"),
url (r'^contact/create$', 'createContact', name="userprofile-create-contact"), url (r'^contact/create$', 'createContact', name="userprofile-create-contact"),
url (r'^contact/delete/(?P<id>[\d]+)$', 'deleteContact', name="userprofile-delete-contact"), url (r'^contact/delete/(?P<id>[\d]+)$', 'deleteContact', name="userprofile-delete-contact"),
......
...@@ -8,7 +8,7 @@ from django.core.urlresolvers import reverse ...@@ -8,7 +8,7 @@ from django.core.urlresolvers import reverse
from django.template import RequestContext from django.template import RequestContext
from django.shortcuts import render_to_response from django.shortcuts import render_to_response
from gracedb.userprofile.models import Trigger, Contact from models import Trigger, Contact
from forms import ContactForm, triggerFormFactory from forms import ContactForm, triggerFormFactory
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment