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


Re: Different ways of working against a SQLite3 dB

2009-02-16 Thread DaSa


Thx for your tips!

I tried to update my Python version but it did not work.

Today I have my data in an Excel document, and I have a script that
parse the excel document and creates sql-commands that I paste in the
SQL shell. But as you know I have the problem with swedish signs.

I shall try to use the admin interface instead, but today I can only
add one item at the time. Do you know any example how to add several
items at the same time?


Best regards
Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: Different ways of working against a SQLite3 dB

2009-02-15 Thread DaSa

Thx! But I have the correct chcp coding. I can write swedish signs in
the promt, it is when I try to add them in the SQLite3 dB it goes
wrong.

I believe it is the "python manage.py shell" that can't handle swedish
signs. If I insert an object containing swedish signs from the admin
site and read it out in the "manage.py shell" I get weir signs.

Are there any other APIs I can use against the database?


Best regards
Daniel

On Feb 15, 2:00 pm, Daniel Roseman <roseman.dan...@googlemail.com>
wrote:
> On Feb 15, 12:53 pm, DaSa <daniel.sandb...@gmail.com> wrote:
>
>
>
> > Hi,
>
> > Maybe this is a SQLite question, but a guess many Django users uses
> > SQLite3.
>
> > I have a lot of data that I want to export to my SQLite3 database. My
> > problem is that the data contains special signs (swedish åäö) and
> > therefore is it not possible to insert the data through "windows
> > command prompt" (and SQLite3 shell) because the windows command prompt
> > does not support swedish signs.
>
> > It works when I,am adding the data through my admin site (Django
> > default admin site), but because of the amount of data it is not
> > possible to add the item one and one.
>
> > My question are if there are any more ways of inserting the data into
> > the SQLite3 dB? Is it possible to open the SQLite3 shell without CMD?
>
> > Thx!
>
> > Best regards
> > Daniel Sandberg
>
> I don't know the answer - or anything about sqlite3 on Windows - but
> it is possible to change the character encoding on the Windows command
> shell. See the 'chcp' command, you should be able to find the correct
> one to allow you to use Swedish characters.
> --
> DR.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Different ways of working against a SQLite3 dB

2009-02-15 Thread DaSa

Hi,

Maybe this is a SQLite question, but a guess many Django users uses
SQLite3.

I have a lot of data that I want to export to my SQLite3 database. My
problem is that the data contains special signs (swedish åäö) and
therefore is it not possible to insert the data through "windows
command prompt" (and SQLite3 shell) because the windows command prompt
does not support swedish signs.

It works when I,am adding the data through my admin site (Django
default admin site), but because of the amount of data it is not
possible to add the item one and one.

My question are if there are any more ways of inserting the data into
the SQLite3 dB? Is it possible to open the SQLite3 shell without CMD?

Thx!


Best regards
Daniel Sandberg
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---



Re: SQLite, swedish signs

2009-02-10 Thread DaSa

The traceback:

Environment:

Request Method: POST
Request URL: http://127.0.0.1:8000/admin/polls/poll/add/
Django Version: 1.0.2 final
Python Version: 2.5.3
Installed Applications:
['django.contrib.admin',
 'django.contrib.admindocs',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.sites',
 'django.contrib.markup',
 'mysite.polls',
 'mysite.searchApp',
 'mysite.forum']
Installed Middleware:
('django.middleware.common.CommonMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware')


Traceback:
File "C:\Python25\Lib\site-packages\django\core\handlers\base.py" in
get_response
  86. response = callback(request, *callback_args,
**callback_kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in
root
  157. return self.model_page(request, *url.split('/',
2))
File "C:\Python25\Lib\site-packages\django\views\decorators\cache.py"
in _wrapped_view_func
  44. response = view_func(request, *args, **kwargs)
File "C:\Python25\Lib\site-packages\django\contrib\admin\sites.py" in
model_page
  176. return admin_obj(request, rest_of_url)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py"
in __call__
  191. return self.add_view(request)
File "C:\Python25\Lib\site-packages\django\db\transaction.py" in
_commit_on_success
  238. res = func(*args, **kw)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py"
in add_view
  499. self.log_addition(request, new_object)
File "C:\Python25\Lib\site-packages\django\contrib\admin\options.py"
in log_addition
  294. object_repr = force_unicode(object),
File "C:\Python25\Lib\site-packages\django\utils\encoding.py" in
force_unicode
  52. s = unicode(str(s), encoding, errors)

Exception Type: UnicodeEncodeError at /admin/polls/poll/add/
Exception Value: 'ascii' codec can't encode character u'\xe5' in
position 6: ordinal not in range(128)


Thanks!

BR
Daniel
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en
-~--~~~~--~~--~--~---