Exemplo n.º 1
0
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'folkrnn\.org', 'composer.urls', name='composer'),
    host(r'themachinefolksession\.org', 'archiver.urls', name='archiver'),
)
Exemplo n.º 2
0
# Copyright: 2019, NLnet Labs and the Internet.nl contributors
# SPDX-License-Identifier: Apache-2.0
from django.conf import settings
from django_hosts import patterns, host

testid = r'((?P<test_id>[a-zA-Z0-9]*))?'
nstype = r'(?P<ns_type>(test-ns-signed|test-ns6-signed))'

cb = 'checks.views.connection.hostname_callback'
bcb = 'checks.views.connection.hostname_bogus_callback'

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(testid + r'.aaaa.conn.' + nstype,
         'checks.conntesturls.ipv6_urls',
         name='ipv6-test',
         callback=cb),
    host(testid + r'.a.conn.' + nstype,
         'checks.conntesturls.ipv4_urls',
         name='ipv4-test',
         callback=cb),
    host(testid + r'.a-aaaa.conn.' + nstype,
         'checks.conntesturls.resolver_urls',
         name='resolver-test',
         callback=cb),
    host(testid + r'.bogus.conn.' + nstype,
         'checks.conntesturls.resolver_urls',
         name='resolver-bogus-test',
         callback=bcb),
    host(r'', settings.ROOT_URLCONF, name='empty'),
Exemplo n.º 3
0
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'rare', 'rarefm_urls', name='rarefm'),
    host(r'^recordings/', 'urls', name='raretunes'),
)
Exemplo n.º 4
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'admin', 'redressal.admin_urls', name='admin'),
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'redressal', 'redressal.committee_urls', name='redressal'),
    # host(r'(\w+)', settings.ROOT_URLCONF, name='wildcard'),
)
Exemplo n.º 5
0
from django_hosts import patterns, host
from django.conf import settings

host_patterns = patterns(
    '',
    host('www', settings.ROOT_URLCONF, name='www'),
    host('(?!www)\w+', 'fablersite.urls', name='site'),
)
Exemplo n.º 6
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www\.example\.com', 'django_hosts.tests.urls.simple', name='www'),
    host(r'static', 'django_hosts.tests.urls.simple', name='static'),
    host(r'^s(?P<subdomain>\w+)', 'django_hosts.tests.urls.complex',
         name='with_view_kwargs'),
    host(r'wiki\.(?P<domain>\w+)', 'django_hosts.tests.urls.simple',
         callback='django_hosts.callbacks.host_site', name='with_callback'),
    host(r'admin\.(?P<domain>\w+)', 'django_hosts.tests.urls.simple',
         callback='django_hosts.callbacks.cached_host_site',
         name='with_cached_callback'),
    host(r'(?P<username>\w+)', 'django_hosts.tests.urls.simple',
         name='with_kwargs'),
    host(r'(\w+)', 'django_hosts.tests.urls.simple', name='with_args'),
)
from django_hosts import patterns, host

from hosts_common import host_patterns
from settings.deployment import phase

main_pattern = patterns('',
    host(r'feeds.streams.%sxenim.de' % phase, 'xenim.urls.feeds', name="feeds", scheme="http://"),
    host(r'review.streams.%sxenim.de' % phase, 'xenim.urls.review', name="review", scheme="https://"),
    host(r'dashboard.%sxenim.de' % phase, 'xenim.urls.dashboard', name="dashboard", scheme="https://"),
    host(r'streams.%sxenim.de' % phase, 'xenim.urls.www', name="www"),
    host(r'%sxsn.io' % phase, 'xenim.urls.shorturl', name="shorturl"),
)

host_patterns += main_pattern
Exemplo n.º 8
0
from django_hosts import patterns, host
from django.conf import settings
from django.contrib import admin
from django.conf.urls import include
from django.contrib import admin 

from blog import urls   as  blogurls

host_patterns = patterns("",
        host(r"www",    settings.ROOT_URLCONF,  name="www"    ),
        host(r"blog",   "ldj17.urls_w",            name="blog"   ),
        host(r"m",      "ldj17.urls_m",           name="mobile"   ),
        host(r"pinx",   "pinx.urls",            name="pinx"   ),
        host(r"gjobs",  "gjobs.urls",           name="gjobs"  ),
        host(r"superbb","superbb.urls",         name="superbb"),
        # host(r"admin",  "ldj17.admin.site.urls",name="admin"  ),
        host(r'^admin', "ldj17.admin",          name = "admin"),
)
Exemplo n.º 9
0
from django_hosts import patterns, host

host_patterns = patterns(
    "",
    host(r"example\.com", "django_hosts.tests.urls.simple", name="without_www"),
    host(r"www\.example\.com", "django_hosts.tests.urls.simple", name="www"),
    host(r"static", "django_hosts.tests.urls.simple", name="static"),
    host(r"^s(?P<subdomain>\w+)", "django_hosts.tests.urls.complex", name="with_view_kwargs"),
    host(
        r"wiki\.(?P<domain>\w+)",
        "django_hosts.tests.urls.simple",
        callback="django_hosts.callbacks.host_site",
        name="with_callback",
    ),
    host(
        r"admin\.(?P<domain>\w+)",
        "django_hosts.tests.urls.simple",
        callback="django_hosts.callbacks.cached_host_site",
        name="with_cached_callback",
    ),
    host(r"(?P<username>\w+)", "django_hosts.tests.urls.simple", name="with_kwargs"),
    host(r"(\w+)", "django_hosts.tests.urls.simple", name="with_args"),
    host(r"scheme", "django_hosts.tests.urls.simple", name="scheme", scheme="https://"),
)
from django_hosts import patterns, host

from hosts_common import host_patterns

host_patterns += patterns('',
    host(r'127.0.0.1:8002', 'xenim.urls.feeds', name="feeds", scheme="http://"),
    host(r'127.0.0.1:8003', 'xenim.urls.review', name="review", scheme="http://"),
    host(r'127.0.0.1:8001', 'xenim.urls.dashboard', name="dashboard", scheme="http://"),
    host(r'127.0.0.1:8000', 'xenim.urls.www', name="www"),
    host(r'127.0.0.1:8004', 'xenim.urls.shorturl', name="shorturl"),
)
Exemplo n.º 11
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'data', 'apps.dataexport.urls', name='www2'),
    host(r'research', 'apps.research.urls', name='research'),
)
Exemplo n.º 12
0
from domanayuge.models import LocalityDomain
from django.contrib.sites.models import Site


def base_callback(request, domain=None):
    pass    


def locality_callback(request, domain):
    request.domain_pattern = domain
    try:
        domain_obj = LocalityDomain.objects.get(domain=domain)
    except LocalityDomain.DoesNotExist:
        domain_obj = None
    request.domain = domain_obj
    try:
        site = Site.objects.get(name=domain)
        request.site = site        
    except Site.DoesNotExist:
        request.site = Site.objects.get_current()
            
            
host_patterns = patterns('',
                         host(r'^$', settings.ROOT_URLCONF, name='home', callback='domanayuge.hosts.base_callback'),
                         host(r'(domanayuge|www)',
                              settings.ROOT_URLCONF, name='www', callback='domanayuge.hosts.base_callback'),
                         host(r'(?P<domain>remont|anaparemont|temrukremont|nvrskremont|gzhkremont)', 'domanayuge.remont_urls', 
                              name='remont', callback='domanayuge.hosts.locality_callback'),                    
                         host(r'(?P<domain>\w+)', 'domanayuge.wildcard_urls',
                              name='wildcard', callback='domanayuge.hosts.locality_callback'),
                        )
Exemplo n.º 13
0
########NEW FILE########
__FILENAME__ = heroku
from .base import *


SECURE_PROXY_SSL_HEADER = ('HTTP_X_FORWARDED_PROTO', 'https')

########NEW FILE########
__FILENAME__ = hosts
from django.conf import settings

from django_hosts import patterns, host

host_patterns = patterns("",
    host(r"www", settings.ROOT_URLCONF, name="default"),
    host(r"simple", "crate.web.packages.simple.urls", name="simple"),
    host(r"pypi", "crate.pypi.simple.urls", name="pypi"),
    host(r"restricted", "crate.web.packages.simple.restricted_urls", name="restricted"),
)

########NEW FILE########
__FILENAME__ = storage
from django.conf import settings
from staticfiles.storage import CachedFilesMixin
from storages.backends.s3boto import S3BotoStorage


class CachedStaticS3BotoStorage(CachedFilesMixin, S3BotoStorage):
    def __init__(self, *args, **kwargs):
        kwargs.update(getattr(settings, "STATICFILES_S3_OPTIONS", {}))
Exemplo n.º 14
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'ledger', 'ledger.urls', name='ledger'),
    host(r'wildlifelicensing', 'wildlifelicensing.urls', name='wildlifelicensing')
)
Exemplo n.º 15
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'ngsu', settings.ROOT_URLCONF, name='ngsu'),
    host(r'(?!www).*', 'UrlShortener.hostconf.urls', name='wildcard'),
)
Exemplo n.º 16
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'api', 'apiurls', name='api'),
)
Exemplo n.º 17
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'birds', 'apps.birds.urls', name='birds'),
    # host(r'api', 'apps.api.urls', name='api'),
)
Exemplo n.º 18
0
# modification, are permitted provided that the following conditions are met:
# 
# 1. Redistributions of source code must retain the above copyright notice, this
# list of conditions and the following disclaimer.
# 
# 2. Redistributions in binary form must reproduce the above copyright notice,
# this list of conditions and the following disclaimer in the documentation
# and/or other materials provided with the distribution.
# 
# 3. The name of the author may not be used to endorse or promote products
# derived from this software without specific prior written permission.
# 
# THIS SOFTWARE IS PROVIDED BY THE LICENSOR "AS IS" AND ANY EXPRESS OR IMPLIED
# WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF
# MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO
# EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT
# OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
# IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY
# OF SUCH DAMAGE.
# 
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'feeds', 'radioportal.feeds.urls', name="feeds"),
    host(r'api', 'radioportal.api.urls', name="api"),
    host(r'dashboard', 'radioportal.dashboard.urls', name="dashboard"),
    host(r'', 'radioportal.urls', name="www"),
)
Exemplo n.º 19
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
	host(r'api', 'api.urls', name='api'),
	host(r'', settings.ROOT_URLCONF, name='website'),
)
Exemplo n.º 20
0
import re

from django_hosts import patterns, host

from dataox.settings import HOST_URLCONFS, HOST_DOMAINS

host_patterns = patterns('', *[
    host('^{}$'.format(re.escape(HOST_DOMAINS[name])),
         HOST_URLCONFS[name], name)
    for name in HOST_URLCONFS]
)
Exemplo n.º 21
0
from django_hosts import patterns, host
from django.conf import settings

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'admin', 'subdomain.admin_urls', name='admin'),
)
Exemplo n.º 22
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'opencitations.net', 'opencitationsnet.urls.main', name='data'),
    host(r'$x^', 'opencitationsnet.urls.empty', name='empty'),
)
Exemplo n.º 23
0
from django.conf import settings
from django_hosts import patterns, host


host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'zhaopin', settings.ROOT_URLCONF, name='zhaopin'),
)
Exemplo n.º 24
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'', 'tests.urls.simple', name='blank'),
    host(r'|www', 'tests.urls.simple', name='blank_or_www'),
)
Exemplo n.º 25
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'rare', 'rarefm_urls', name='rarefm'),
    host(r'^recordings/', 'urls', name='raretunes'),
)
Exemplo n.º 26
0
__author__ = 'onekiloparsec'

from django_hosts import patterns, host

host_patterns = patterns('project.arcsecond',
    host(r'www', 'urls_www', name='www'),
    host(r'api', 'urls_api', name='api'),
)
Exemplo n.º 27
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'plans', 'plans.urls', name='plans'),
)
Exemplo n.º 28
0
from __future__ import unicode_literals

from django_hosts import host

from tenancy.settings import HOST_NAME

host_patterns = [
    host(r'(?P<name>[\w-]+)', 'tests.tenant_urls', name=HOST_NAME),
    host(r'', 'tests.urls', name='default'),
]
Exemplo n.º 29
0
from django.conf import settings

from django_hosts import patterns, host

host_patterns = patterns("",
    host(r"", settings.ROOT_URLCONF, name="default"),
)
Exemplo n.º 30
0
from django.conf import settings
from django.urls import include
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'watch', 'towatch.moviepanel.urls', name='watch'),
)
Exemplo n.º 31
0
    try:
        domain_obj = LocalityDomain.objects.get(domain=domain)
    except LocalityDomain.DoesNotExist:
        domain_obj = None
    request.domain = domain_obj
    try:
        site = Site.objects.get(name=domain)
        request.site = site
    except Site.DoesNotExist:
        request.site = Site.objects.get_current()


host_patterns = patterns(
    '',
    host(r'^$',
         settings.ROOT_URLCONF,
         name='home',
         callback='domanayuge.hosts.base_callback'),
    host(r'(domanayuge|www)',
         settings.ROOT_URLCONF,
         name='www',
         callback='domanayuge.hosts.base_callback'),
    host(r'(?P<domain>remont|anaparemont|temrukremont|nvrskremont|gzhkremont)',
         'domanayuge.remont_urls',
         name='remont',
         callback='domanayuge.hosts.locality_callback'),
    host(r'(?P<domain>\w+)',
         'domanayuge.wildcard_urls',
         name='wildcard',
         callback='domanayuge.hosts.locality_callback'),
)
Exemplo n.º 32
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'do', 'WAOne.custom_urls', name='do'),
    # host(r'(\w+)', 'path.to.custom_urls', name='wildcard'),
)
Exemplo n.º 33
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'design', 'short_tips.urls', name='design'),
    host(r'shortcutkey', 'short_tips.urls', name='shortcutkey'),
    host(r'dialogue', 'short_tips.urls', name='dialogue'),
    host(r'wordeffect', 'short_tips.urls', name='wordeffect'),
    host(r'stock', 'short_tips.urls', name='stock'),
    host(r'shogi', 'short_tips.urls', name='shogi'),
    #host(r'psy', 'short_tips.urls', name='psy'),
    host(r'examengcloud', "examengcloud.urls", name="examengcloud"),
    host(r'apologagent', "apologagent.urls", name="apologagent"),
    host(r'fanstatic', "fanstatic.urls", name="fanstatic"),
    host(r"techtweetrank", "engineer_rank.urls", name="engineer_rank"),
    host(r"techblog", "techblog.urls", name="techblog"),
    host(r"oversea-it", "oversea_it.urls", name="oversea-it"),
    host(r"question", "question.urls", name="question"),
    host(r"oreilly", "oreilly.urls", name="oreilly"),
    host(r'yourshogi', "yourshogi.urls", name="yourshogi"),
    host(r'd3js', "d3js.urls", name="d3js"),
    host(r'psy', "psy.urls", name="psy"),
    host(r'.*', 'short_tips.urls', name='else'))
Exemplo n.º 34
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'(?!www)\w+', 'website.urls', name='wildcard'),
)
Exemplo n.º 35
0
from functools import partial

from django.conf import settings
from django_hosts import patterns, host

from utils.utils import init

patterns = partial(patterns, '')

init('mainsite.api.views')

host_patterns = patterns(host(r'www', settings.ROOT_URLCONF, name='www'),
                         host(r'api', 'mainsite.api.urls', name='api'))
Exemplo n.º 36
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'example\.com', 'tests.urls.simple',
         name='without_www'),
    host(r'www\.example\.com', 'tests.urls.simple', name='www'),
    host(r'static', 'tests.urls.simple', name='static'),
    host(r'^s(?P<subdomain>\w+)', 'tests.urls.complex',
         name='with_view_kwargs'),
    host(r'wiki\.(?P<domain>\w+)', 'tests.urls.simple',
         callback='django_hosts.callbacks.host_site', name='with_callback'),
    host(r'admin\.(?P<domain>\w+)', 'tests.urls.simple',
         callback='django_hosts.callbacks.cached_host_site',
         name='with_cached_callback'),
    host(r'(?P<username>\w+)', 'tests.urls.simple',
         name='with_kwargs'),
    host(r'(\w+)', 'tests.urls.simple', name='with_args'),
    host(r'scheme', 'tests.urls.simple', name='scheme',
         scheme='https://'),
    host(r'port', 'tests.urls.simple', name='port',
         port='12345'),
    host(r'port-tag', 'tests.urls.simple', name='port-tag',
         port='12345'),
)
Exemplo n.º 37
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'(?!www)', 'kirr.hostsconf.urls', name='wildcard'),
)
Exemplo n.º 38
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    # host(r'(\w+)', 'lnkto.hostconf.urls', name='wildcard2'),
    #host(r'live', 'lnkto.hostconf.urls', name='live-redirect'),
    host(r'(?!www).*', 'lnkto.hostconf.urls', name='wildcard'),
)
Exemplo n.º 39
0
from django.conf import settings
from django_hosts import host

print(settings.ROOT_URLCONF)
host_patterns = [
    host(r'127.0.0.1:8000', settings.ROOT_URLCONF, name='www'),
    # host(r'docs', 'djangoproject.urls.docs', name='docs'),
    # host(r'dashboard', 'dashboard.urls', name='dashboard'),
]
Exemplo n.º 40
0
# GNU Affero General Public License for more details.
# 
# You should have received a copy of the GNU Affero General Public License
# along with this program.  If not, see <http://www.gnu.org/licenses/>.

from django_hosts import patterns, host
from django_hosts.callbacks import cached_host_site


#----------------------------------------------------------------------
def cached_host_site_extended(request, *args, **kwargs):
    # call the original django-hosts callback to do the work
    cached_host_site(request, *args, **kwargs)
    # now if it found a site, append its site.id to the request for Mezzanine
    if hasattr(request, 'site'):
        # TODO talk to Stephen about this
        request.site_id = request.site.id


host_patterns = patterns('',
    # nightlybuilds (nightly.geany.org and nightly.local.geany.org)
    host(r'^nightly(\.local|\.dev)?\.geany\.org(:[0-9]*)?$', 'nightlybuilds.urls', name='nightly.geany.org', callback=cached_host_site_extended),
    host(r'^geany\.nightlybuilds\.org(:[0-9]*)?$', 'nightlybuilds.urls', name='geany.nightlybuilds.org', callback=cached_host_site_extended),

    # pastebin (pastebin.geany.org and pastebin.local.geany.org)
    host(r'^pastebin(\.local|\.dev)?\.geany\.org(:[0-9]*)?$', 'pastebin.urls', name='pastebin.geany.org', callback=cached_host_site_extended),

    # default
    host(r'^www\.geany\.org(:[0-9]*)?$', 'geany.urls', name='www.geany.org', callback=cached_host_site_extended),
)
Exemplo n.º 41
0
from django_hosts import patterns, host
from tests.hosts.simple import host_patterns

host_patterns += patterns('',
    host(r'special', 'tests.urls.simple', name='special'),
)
Exemplo n.º 42
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'startupdrinks\.mx', settings.ROOT_URLCONF, name='www'),
    host(r'(?P<subdomain>\w+)', 'startupdrinks.events.urls', name='wildcard'),
)
Exemplo n.º 43
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'mxit', 'fh.mxit.urls', name='mxit'),
    host(r'm', 'fh.mobile.urls', name='m'),
)
Exemplo n.º 44
0
from django_hosts import patterns, host
from django.conf import settings

host_patterns = patterns(
    '',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'support', 'support.staticurl', name="static_support"),
    host(r'(?P<cat>\w+).*', 'support.categoryurl', name='category'),
)
Exemplo n.º 45
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    #host(r'live', settings.ROOT_URLCONF, name='live'),
    host(r'(?!www).*', 'replacer.hostsconf.urls', name='wildcard'),
)

'''
from replacer.hostsconf import urls as redirect_urls
host_patterns = [
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'(?!www).*', redirect_urls, name='wildcard'),
]
'''
Exemplo n.º 46
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www', settings.ROOT_URLCONF, name='www'),
    host(r'myip', 'myip.urls', name='myip'),
)
Exemplo n.º 47
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '', host(r'www', 'configs.subdomains.frontend', name='www'),
    host(r'admin', 'configs.subdomains.admin', name='admin'),
    host(r'api', 'configs.subdomains.api', name='api'))
Exemplo n.º 48
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'www\.example\.com', 'django_hosts.tests.urls.simple', name='www'),
    host(r'static', 'django_hosts.tests.urls.simple', name='static'),
    host(r'(\w+)', 'django_hosts.tests.urls.simple', name='with_args'),
    host(r'(?P<username>\w+)', 'django_hosts.tests.urls.simple', name='with_kwargs'),
)
Exemplo n.º 49
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('', host(
    r'www',
    settings.ROOT_URLCONF,
    name='www',
), host(
    r'm',
    'mysite.urls.mobile',
    name='mobile',
))
Exemplo n.º 50
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '', host(r'raw', 'paste.urls.raw', name='raw'),
    host(r'(www)?', settings.ROOT_URLCONF, name='default'))
Exemplo n.º 51
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'www', 'multisite.blog_urls', name='www'),
    host(r'admin', settings.ROOT_URLCONF, name='admin'),
    host(r'product', 'multisite.product_urls', name='product'),
    host(r'sports', 'multisite.sports_urls', name='sports'),
    host(r'lifestyle', 'multisite.lifestyle_urls', name='lifestyle'),
)
Exemplo n.º 52
0
Arquivo: hosts.py Projeto: WST/thetool
# -*- coding: utf-8 -*-

from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns('',
	host(r'', settings.ROOT_URLCONF, name = 'main'),
	host(r'(hosting|admin)', 'hosting.urls', name = 'hosting'),
)
Exemplo n.º 53
0
from django.conf import settings
from django_hosts import patterns, host
host_patterns = patterns(
    '',
    #host(r'www', 'subdomains_tutorial.frontend_urls', name='www'),
    host(r'default', settings.ROOT_URLCONF, name='default'),
    #host(r'api', 'subdomains_tutorial.api_urls', name='api'),
)
Exemplo n.º 54
0
from django.conf import settings
from django_hosts import patterns, host

# Routing for subdomains and root routing for main domain.
host_patterns = patterns(
    '',
    host(
        r'www', settings.ROOT_URLCONF,
        name='www'),  # <-- The `name` we used to in the `DEFAULT_HOST` setting
    host(r'api', 'textsum.urls.api',
         name='api')  # Routing for the api subdomain
)
Exemplo n.º 55
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'', settings.ROOT_URLCONF, name='www'),
    # host(r'(?!www).*', 'path.to.custom_urls', name='wildcard'),
)
Exemplo n.º 56
0
from django.conf import settings
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host('', settings.ROOT_URLCONF, name='default'),
    host('api', 'apps.api.urls', name='api'),
    host('admin', 'website.admin_urls', name='admin'),
)
Exemplo n.º 57
0
from django_hosts import patterns, host

host_patterns = patterns(
    '',
    host(r'^data.example.org$', 'humfrey.tests.urls.main', name='data'),
    host(r'$x^', 'humfrey.tests.urls.empty', name='empty'),
)
Exemplo n.º 58
0
from django_hosts import patterns, host

host_patterns = patterns('',
    host(r'data.example.org', 'humfrey.tests.urls.main', name='data'),
    host(r'$x^', 'humfrey.tests.urls.empty', name='empty'),
)