Re: Django hosting

2011-07-25 Thread Gour-Gadadhara Dasa
On Mon, 25 Jul 2011 21:40:23 -0400
william ratcliff  wrote:

> +1 webfaction

I used webfaction, but then moved to http://djangohosting.ch/
(http://djangoeurope.com) - nice ping from Europe, great support &
prices and the setup is even more flexible than at Webfacton.


Sincerely,
Gour


-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810





signature.asc
Description: PGP signature


Re: my frist django project Error

2011-07-10 Thread Gour-Gadadhara Dasa
On Sun, 10 Jul 2011 19:42:17 +0100
Malcolm Box  wrote:

> Cal,
> 
> You are contributing a lot to the django users group, but this
> response isnt in the best spirit of the group. 
> 
> Yes, the op could work out from the traceback what the error was, but
> we were all beginners once. If you compare this post to the how to
> post FAQ its not too bad - at least there's a traceback. 
> 
> Telling someone they need to learn more python isn't helpful - tell
> them that theres a setting missing and how the traceback makes that
> clear. 
> 
> Sorry to pull you up on this but the helpfulness of this list is
> important both to me and the health of the django community. 

+1 


Sincerely,
Gour

-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810




signature.asc
Description: PGP signature


Re: Confusion about the new staticfiles contrib app

2011-07-08 Thread Gour-Gadadhara Dasa
On Tue, 25 Jan 2011 21:46:39 -0800 (PST)
Brian Neal  wrote:

Hiya,

> I'm trying to cut over my project to use the new staticfiles
> application. I'm using the dev server with DEBUG = True on a recent
> SVN trunk checkout. My STATIC_URL is '/static/' and my MEDIA_URL is
> 'http://localhost:8000/media/' in this environment.

I'm in a similar boat...trying (again) with Django-1.3

> Eventually I came to the conclusion that I had do this:
> 
> urls.py:
> if settings.DEBUG:
>urlpatterns += patterns('django.contrib.staticfiles.views',
>   (r'^media/(?P.*)$', 'serve', {'document_root':
> settings.MEDIA_ROOT}),
>)

My project is at ~/home/gour/www/zinnia in virtual env.

Zinnia (blog engine) media files are symlinked to:

/usr/home/gour/www/zinnia/lib/python2.7/site-packages/zinnia/media/zinnia --> 
/usr/home/gour/www/zinnia/blog/static

and in order to see media files I've the following in my settings.py:

[...]

PROJECT_PATH = os.path.abspath(os.path.dirname(__file__))

MEDIA_ROOT = os.path.join(PROJECT_PATH, "static")

MEDIA_URL = '/media/'

ADMIN_MEDIA_PREFIX = '/media/admin/'

[...]

and here is the snippet from urls.py:

from django.conf import settings

if settings.DEBUG:
urlpatterns += patterns('',
url(r'^media/(?P.*)$', 'django.views.static.serve', {
'document_root': settings.MEDIA_ROOT,
}),
   )

The above snippet is from dev-docs, while the 1.3 doc says:

from django.conf import settings

if settings.DEBUG:
urlpatterns += patterns('django.contrib.staticfiles.views',
url(r'^static/(?P.*)$', 'serve'),
)


Now I'm told on #django that this is obsolete and from 1.3 one is supposed to
use:

django.contrib.staticfiles 

and I tried to add it to INSTALLED_APPS, defined STATIC_ROOT, STATIC_URL,
STATICFILES_DIRS..and adding:

urlpatterns += staticfiles_urlpatterns() to urls.py, but all what I get is 404 
errors.

> The docs don't seem to mention using this view for this purpose.
> Should they?

This is my confusion as well. The doc says:


This view is automatically enabled by runserver (with a DEBUG setting set to
True). To use the view with a different local development server, add the
following snippet to the end of your primary URL configuration:

from django.conf import settings

if settings.DEBUG:
urlpatterns += patterns('django.contrib.staticfiles.views',
url(r'^static/(?P.*)$', 'serve'),
)



and based on the avove it seems that if one just wants to use runserver there
should not be need for the django.contrib.staticfiles.views view, but, based on
my experience I was not able to render media files without using the above
snippet in urls.py, so my humgble request is whether someone can provide
correct info how to serve app's media (static) files in django-1.3 when using
runserver in development?


Sincerely,
Gour


-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810




signature.asc
Description: PGP signature


Re: download-list app

2011-07-06 Thread Gour-Gadadhara Dasa
On Wed, 6 Jul 2011 10:19:55 -0700 (PDT)
francescortiz  wrote:

> I don't want to be rude, but your question is so bague that I think
> that you should start by reading some python and django books/
> documentation.

Ahh...my mistake for not explaining better.

Here is the demo:

http://demo.smartwebprojects.net/downloads-list/

which shows Downloads list which is probably straightforward, but I wonder how
to register number of downloads for each file?

I understand that in Python's jargon, number of downloads is class variable,
but no idea how to handle it in Django?


Is it more clear now?


Sincerely,
Gour


-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810




signature.asc
Description: PGP signature


download-list app

2011-07-06 Thread Gour-Gadadhara Dasa
Hello!

I'm starting with Django trying to migrate all my sites from PHP apps to Django
apps...

I'd like to have Download page to display list of available (mp3) files for 
download:

Filename | Size | Number of downloads | Last updated


Is there some django apps providing similar functionality and/or what would be
the starting points to implement it?


Sincerely,
Gour


-- 
“In the material world, conceptions of good and bad are
all mental speculations…” (Sri Caitanya Mahaprabhu)

http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810




signature.asc
Description: PGP signature