mirror of
https://github.com/postgres/pgweb.git
synced 2025-08-03 15:38:59 +00:00
Prefix cross-application imports with pgweb
As required by the new project layout.
This commit is contained in:
@ -23,13 +23,13 @@ from pgweb.util.misc import get_client_ip, is_behind_cache, varnish_purge
|
||||
from pgweb.util.sitestruct import get_all_pages_struct
|
||||
|
||||
# models needed for the pieces on the frontpage
|
||||
from news.models import NewsArticle
|
||||
from events.models import Event
|
||||
from quotes.models import Quote
|
||||
from pgweb.news.models import NewsArticle
|
||||
from pgweb.events.models import Event
|
||||
from pgweb.quotes.models import Quote
|
||||
from models import Version, ImportedRSSItem
|
||||
|
||||
# models needed for the pieces on the community page
|
||||
from survey.models import Survey
|
||||
from pgweb.survey.models import Survey
|
||||
|
||||
# models and forms needed for core objects
|
||||
from models import Organisation
|
||||
|
@ -1,5 +1,5 @@
|
||||
from django.db import connection
|
||||
from core.models import Version
|
||||
from pgweb.core.models import Version
|
||||
|
||||
def get_struct():
|
||||
currentversion = Version.objects.get(current=True)
|
||||
|
@ -4,7 +4,7 @@ from django.forms import ValidationError
|
||||
|
||||
import re
|
||||
|
||||
from util.admin import PgwebAdmin
|
||||
from pgweb.util.admin import PgwebAdmin
|
||||
from models import StackBuilderApp, Mirror, Category, Product, LicenceType
|
||||
|
||||
class MirrorAdmin(admin.ModelAdmin):
|
||||
|
@ -1,7 +1,7 @@
|
||||
from django.contrib import admin
|
||||
from django import forms
|
||||
|
||||
from util.admin import PgwebAdmin
|
||||
from pgweb.util.admin import PgwebAdmin
|
||||
from models import Event
|
||||
|
||||
def approve_event(modeladmin, request, queryset):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
from core.models import Country, Language, Organisation
|
||||
from pgweb.core.models import Country, Language, Organisation
|
||||
|
||||
class Event(models.Model):
|
||||
approved = models.BooleanField(null=False, blank=False, default=False)
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from util.admin import PgwebAdmin
|
||||
from pgweb.util.admin import PgwebAdmin
|
||||
from models import NewsArticle
|
||||
|
||||
class NewsArticleAdmin(PgwebAdmin):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from util.admin import PgwebAdmin
|
||||
from pgweb.util.admin import PgwebAdmin
|
||||
from models import ProfessionalService
|
||||
|
||||
class ProfessionalServiceAdmin(PgwebAdmin):
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.contrib import admin
|
||||
|
||||
from util.admin import PgwebAdmin
|
||||
from pgweb.util.admin import PgwebAdmin
|
||||
from models import PUG
|
||||
|
||||
class PUGAdmin(PgwebAdmin):
|
||||
|
@ -1,4 +1,4 @@
|
||||
from util.admin import register_pgwebadmin
|
||||
from pgweb.util.admin import register_pgwebadmin
|
||||
from models import PwnPost
|
||||
|
||||
register_pgwebadmin(PwnPost)
|
||||
|
@ -12,7 +12,7 @@ import psycopg2
|
||||
import json
|
||||
import socket
|
||||
|
||||
from lists.models import MailingList
|
||||
from pgweb.lists.models import MailingList
|
||||
|
||||
# Conditionally import memcached library. Everything will work without
|
||||
# it, so we allow development installs to run without it...
|
||||
|
@ -58,13 +58,13 @@ TEMPLATE_LOADERS = (
|
||||
)
|
||||
|
||||
MIDDLEWARE_CLASSES = [
|
||||
'util.middleware.RequestCheckMiddleware',
|
||||
'pgweb.util.middleware.RequestCheckMiddleware',
|
||||
'django.middleware.common.CommonMiddleware',
|
||||
'django.contrib.sessions.middleware.SessionMiddleware',
|
||||
'django.contrib.messages.middleware.MessageMiddleware',
|
||||
'django.middleware.csrf.CsrfViewMiddleware',
|
||||
'django.contrib.auth.middleware.AuthenticationMiddleware',
|
||||
'util.middleware.PgMiddleware',
|
||||
'pgweb.util.middleware.PgMiddleware',
|
||||
]
|
||||
|
||||
CSRF_FAILURE_VIEW='pgweb.core.views.csrf_failure'
|
||||
@ -80,7 +80,7 @@ TEMPLATE_CONTEXT_PROCESSORS = (
|
||||
'django.contrib.auth.context_processors.auth',
|
||||
'django.contrib.messages.context_processors.messages',
|
||||
'django.core.context_processors.media',
|
||||
'util.contexts.PGWebContextProcessor',
|
||||
'pgweb.util.contexts.PGWebContextProcessor',
|
||||
)
|
||||
|
||||
LOGIN_URL='/account/login/'
|
||||
@ -88,7 +88,7 @@ LOGIN_REDIRECT_URL='/account/'
|
||||
LOGOUT_URL='/account/logout/'
|
||||
|
||||
AUTHENTICATION_BACKENDS = (
|
||||
'util.auth.AuthBackend',
|
||||
'pgweb.util.auth.AuthBackend',
|
||||
)
|
||||
|
||||
INSTALLED_APPS = [
|
||||
|
@ -1,6 +1,6 @@
|
||||
from django.db import models
|
||||
|
||||
from core.models import Country
|
||||
from pgweb.core.models import Country
|
||||
|
||||
class SponsorType(models.Model):
|
||||
typename = models.CharField(max_length=32, null=False, blank=False)
|
||||
|
@ -2,7 +2,7 @@ from django.contrib import admin
|
||||
from django.conf import settings
|
||||
|
||||
from pgweb.core.models import ModerationNotification
|
||||
from mailqueue.util import send_simple_mail
|
||||
from pgweb.mailqueue.util import send_simple_mail
|
||||
|
||||
|
||||
class PgwebAdmin(admin.ModelAdmin):
|
||||
|
@ -1,11 +1,11 @@
|
||||
# models needed to generate unapproved list
|
||||
from news.models import NewsArticle
|
||||
from events.models import Event
|
||||
from core.models import Organisation
|
||||
from docs.models import DocComment
|
||||
from downloads.models import Product
|
||||
from profserv.models import ProfessionalService
|
||||
from quotes.models import Quote
|
||||
from pgweb.news.models import NewsArticle
|
||||
from pgweb.events.models import Event
|
||||
from pgweb.core.models import Organisation
|
||||
from pgweb.docs.models import DocComment
|
||||
from pgweb.downloads.models import Product
|
||||
from pgweb.profserv.models import ProfessionalService
|
||||
from pgweb.quotes.models import Quote
|
||||
|
||||
# Pending moderation requests (including URLs for the admin interface))
|
||||
def _get_unapproved_list(objecttype):
|
||||
|
@ -12,7 +12,7 @@ sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])), '../
|
||||
import settings
|
||||
setup_environ(settings)
|
||||
|
||||
from core.models import ImportedRSSFeed, ImportedRSSItem
|
||||
from pgweb.core.models import ImportedRSSFeed, ImportedRSSItem
|
||||
from django.db import transaction, connection
|
||||
|
||||
# Set timeout for loading RSS feeds
|
||||
|
Reference in New Issue
Block a user