Thanks for trying the tutorial. I am a little busy ATM so I cannot
answer in more detail but a working code should be available at
http://github.com/ella/ellablog
Please let me know if this works for you or if you require further assistance.
Thanks!
Honza Král
E-Mail: Honza...@gmail.com
Phone: +1-415-797-8453
On Wed, Jul 7, 2010 at 1:37 PM, james <trea...@gmail.com> wrote:
> I am following the tutorial from github (http://ella.github.com/). And
> everything went pretty smooth until I tried to load the newman page.
>
> When I load the newman page I just get a directoy listing with
>
> css/
> ico/
> img/
> jquery/
> js/
> swf/
>
> I can log into the normal django admin panel fine. But newman just
> doesnt seem to work.
>
> I have a feeling something isnt right in my urls.py, but I followed
> the tutorial exactly. Can someone take a look and see what might be
> going wrong?
>
> Thanks!
>
> urls.py
> from django.conf.urls.defaults import *
> from django.contrib import admin
> from ella import newman
> from ella.core.urls import handler404, handler500
> from django.conf import settings
>
> # Uncomment the next two lines to enable the admin:
> # from django.contrib import admin
> #admin.autodiscover()
> newman.autodiscover()
> urlpatterns = patterns('',
> # Example:
> # (r'^cmsApp/', include('cmsApp.foo.urls')),
>
> # Uncomment the admin/doc line below and add
> 'django.contrib.admindocs'
> # to INSTALLED_APPS to enable admin documentation:
> (r'^admin/doc/', include('django.contrib.admindocs.urls')),
>
> # Uncomment the next line to enable the admin:
> (r'^admin/', include(admin.site.urls)),
> )
>
> if settings.DEBUG:
> # only use these urls in DEBUG mode, otherwise they should be
> handled by your web server
> from os.path import dirname, join, normpath
> import django, ella
>
>
> # static files from both admin apps
> ADMIN_ROOTS = (
> normpath(join(dirname(ella.__file__), 'newman', 'media')),
> normpath(join(dirname(django.__file__), 'contrib', 'admin',
> 'media')),
> )
>
> # serve static files
> urlpatterns += patterns('',
> # newman specific files first
> (r'^%s/(?P<path>.*)$' %
> settings.NEWMAN_MEDIA_PREFIX.strip('/'),
> 'ella.utils.views.fallback_serve', {'document_roots': ADMIN_ROOTS}),
> # rest of the static files
> (r'^%s/(?P<path>.*)$' % settings.MEDIA_URL.strip('/'),
> 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT,
> 'show_indexes': True}),
> )
>
>
> # actual URL mappings
> urlpatterns += patterns('',
> (r'^newman/', include(newman.site.urls)),
> (r'^', include('ella.core.urls')),
> )
>
>
> settings.py
>
> DEBUG = True
> TEMPLATE_DEBUG = DEBUG
>
> ADMINS = (
> # ('Your Name', 'your_...@domain.com'),
> )
>
> MANAGERS = ADMINS
>
> DATABASES = {
> 'default': {
> 'ENGINE': 'django.db.backends.mysql', # Add
> 'postgresql_psycopg2', 'postgresql', 'mysql', 'sqlite3' or 'oracle'.
> 'NAME': 'django', # Or path to database
> file if using sqlite3.
> 'USER': 'root', # Not used with sqlite3.
> 'PASSWORD': 'stopper', # Not used with
> sqlite3.
> 'HOST': '', # Set to empty string for
> localhost. Not used with sqlite3.
> 'PORT': '', # Set to empty string for
> default. Not used with sqlite3.
> }
> }
>
> # Local time zone for this installation. Choices can be found here:
> # http://en.wikipedia.org/wiki/List_of_tz_zones_by_name
> # although not all choices may be available on all operating systems.
> # On Unix systems, a value of None will cause Django to use the same
> # timezone as the operating system.
> # If running in a Windows environment this must be set to the same as
> your
> # system time zone.
> TIME_ZONE = 'America/Chicago'
>
> # Language code for this installation. All choices can be found here:
> # http://www.i18nguy.com/unicode/language-identifiers.html
> LANGUAGE_CODE = 'en-us'
>
> SITE_ID = 1
>
> # If you set this to False, Django will make some optimizations so as
> not
> # to load the internationalization machinery.
> USE_I18N = True
>
> # If you set this to False, Django will not format dates, numbers and
> # calendars according to the current locale
> USE_L10N = True
>
> # Absolute path to the directory that holds media.
> # Example: "/home/media/media.lawrence.com/"
> MEDIA_ROOT = ''
>
> # URL that handles the media served from MEDIA_ROOT. Make sure to use
> a
> # trailing slash if there is a path component (optional in other
> cases).
> # Examples: "http://media.lawrence.com", "http://example.com/media/"
> MEDIA_URL = ''
>
> # URL prefix for admin media -- CSS, JavaScript and images. Make sure
> to use a
> # trailing slash.
> # Examples: "http://foo.com/media/", "/media/".
> ADMIN_MEDIA_PREFIX = '/media/'
>
> # Make this unique, and don't share it with anybody.
> SECRET_KEY = '#######################################'
>
> # List of callables that know how to import templates from various
> sources.
> TEMPLATE_LOADERS = (
> 'django.template.loaders.filesystem.Loader',
> 'django.template.loaders.app_directories.Loader',
> # 'django.template.loaders.eggs.Loader',
> )
>
> MIDDLEWARE_CLASSES = (
> 'django.middleware.common.CommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.middleware.csrf.CsrfViewMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.contrib.messages.middleware.MessageMiddleware',
> )
>
> ROOT_URLCONF = 'cmsApp.urls'
>
> TEMPLATE_DIRS = (
> # Put strings here, like "/home/html/django_templates" or "C:/www/
> django/templates".
> # Always use forward slashes, even on Windows.
> # Don't forget to use absolute paths, not relative paths.
> )
>
> INSTALLED_APPS = (
> 'django.contrib.auth',
> 'django.contrib.contenttypes',
> 'django.contrib.sessions',
> 'django.contrib.sites',
> 'django.contrib.messages',
> # Uncomment the next line to enable the admin:
> 'django.contrib.admin',
> 'ella.core',
> 'ella.photos',
> 'ella.newman',
> 'ella.articles',
>
> 'djangomarkup',
> )
>
> TEMPLATE_CONTEXT_PROCESSORS = (
> 'django.core.context_processors.media',
> 'django.core.context_processors.auth',
> 'django.core.context_processors.request',
> 'ella.newman.context_processors.newman_media',
> )
>
> NEWMAN_MEDIA_PREFIX = MEDIA_URL + 'newman/'
> DEFAULT_MARKUP = 'markdown'
>
> from os.path import join, dirname
>
> PROJECT_ROOT = dirname(__file__)
>
> MEDIA_ROOT = join(PROJECT_ROOT, 'static')
> MEDIA_URL = '/static/'
>
> TEMPLATE_DIRS = (
> join(PROJECT_ROOT, 'templates'),
> )
>
>
> --
> You received this message because you are subscribed to the Google Groups "Ella Project" group.
> To post to this group, send email to ella-p...@googlegroups.com.
> To unsubscribe from this group, send email to ella-project...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/ella-project?hl=en.
>
>
on first sight, I see nothing wrong except You seem to be using Ella with 1.2,
which is untestsed yet (I develop with 1.2 without problem, but I have yet to
discover all incompatibilities and do not use newman on that project).
What should certainly work is Django 1.1.1 with my blog
(http://github.com/Almad/almadnet) and this ella version
(http://github.com/Almad/ella/tree/almadnet).
It's deployed that way, I wrote somem comments on that @
http://almad.nejsem.in/blog/2010/3/1/articles/ella-blog-system-aka-back-
blogging/
Almad