Re: Python and/or django book
>>>>> "prem1er" == prem1er <[EMAIL PROTECTED]> writes: prem1er> Just trying to figure out what the best book to purchase for a prem1er> newcomer to Django and python. Thanks for your suggestions. Check this one - http://withdjango.com/ - I got it few days ago. Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpPso1XMsZWG.pgp Description: PGP signature
Simple Invoices & Django
Hi! I'm quite new with Python & Django but enthusiastic to work on 'porting' Simple Invoices - PHP invoicing system - to Django (see http://simpleinvoices.org/). I've asked main developer about it and although SI is now working towards Zend, he likes the idea. (see http://simpleinvoices.org/forum/discussion/622/si-in-pythondjango thread) So, I'm interested if there is someone here interested to work on such a project? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpMzGNJANBfP.pgp Description: PGP signature
Re: Django Hosting Survey
>>>>> "Benjamin" == Benjamin Buch <[EMAIL PROTECTED]> writes: Benjamin> I can recommend djangohosting (http://djangohosting.ch), at Benjamin> least if you're looking for a host in europe... It doesn't Benjamin> seem like you do, but I thought I should mention it anyway... Benjamin> It's great for personal stuff, didn't do something big there Benjamin> (60MB RAM, 1GB storage, 4€ per month, easy setup...) Heh, nice to hear...I'm also considering to take it... Is it OK for production site as well? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpwAMa6lDwgq.pgp Description: PGP signature
date-based ordering confusion
Hi! I'm doing my 1st steps in Python/Django using Python Web Development with Django book (http://withdjango.com/) Chapter 2 is 'developing' simple blog app and here is the model: From django.db import models From django.contrib import admin # Create your models here. class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() timestamp = models.DateTimeField() class Meta: ordering = ('-timestamp',) class BlogPostAdmin(admin.ModelAdmin): list_display = ('title', 'timestamp') admin.site.register(BlogPost, BlogPostAdmin) Now, at one point I was not clear where to add: class Meta: ordering = ('-timestamp',) in order to have descending order of 'blog posts' and was asking on #django where I got the answer to put it as follows: [..] class BlogPostAdmin(admin.ModelAdmin): list_display = ('title', 'timestamp') ordering = ('-timestamp',) which did not work. Finally, I managed to add 'class Meta' as subclass of BlogPost class (as above), but I wonder if adding 'ordering = ('-timestamp',)' to BlogPostAdmin class is supposed to work or what is explanation if it should not work (as we experienced)? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpviZmXpg7CY.pgp Description: PGP signature
date-based ordering confusion
Hi! I'm doing my 1st steps in Python/Django using Python Web Development with Django book (http://withdjango.com/) Chapter 2 is 'developing' simple blog app and here is the model: From django.db import models From django.contrib import admin # Create your models here. class BlogPost(models.Model): title = models.CharField(max_length=150) body = models.TextField() timestamp = models.DateTimeField() class Meta: ordering = ('-timestamp',) class BlogPostAdmin(admin.ModelAdmin): list_display = ('title', 'timestamp') admin.site.register(BlogPost, BlogPostAdmin) Now, at one point I was not clear where to add: class Meta: ordering = ('-timestamp',) in order to have descending order of 'blog posts' and was asking on #django where I got the answer to put it as follows: [..] class BlogPostAdmin(admin.ModelAdmin): list_display = ('title', 'timestamp') ordering = ('-timestamp',) which did not work. Finally, I managed to add 'class Meta' as subclass of BlogPost class (as above), but I wonder if adding 'ordering = ('-timestamp',)' to BlogPostAdmin class is supposed to work or what is explanation if it should not work (as we experienced)? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpPL8oPlGGwp.pgp Description: PGP signature
Re: date-based ordering confusion
>>>>> "Alex" == Alex Gaynor writes: Alex> Justin, I'd take a look at that link again: Alex> http://docs.djangoproject.com/en/dev/ref/contrib/admin/#ordering Hmm, it means that adding 'ordering = ('-timestamp',)' line to BlogPostAdmin class is supposed to work, but, somehow, it doesn't? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpOPJ72BAGvd.pgp Description: PGP signature
MetaWeblog API vs. Atom Publishing Protocol support
Hi! I'm new to Django exploring what can be done with it and I'd like that blog users could use some of desktop blog clients to publish their posts to Django-powered blog site, so I did some research about support for MetaWeblog and Atom PP in DJango which has brought me to the two tickets: http://code.djangoproject.com/ticket/226) and http://code.djangoproject.com/ticket/3570. Now, I'm curious if someone can explain me why is the ticket for MetaWeblog API (#226) closed and marked as 'invalid ' with the comment "Django's not a weblog engine; it's a framework for building content management systems. It's going to be up to individual authors of blog packages to support any APIs." while the ticket for adding Atom PP (#3570)is accepted and being worked on? I asked on #django and got the answer that "It's not possible to please everyone." which is true 'cause I'm not please by that answer :-) and wonder if there is some deeper (aka: technological) reason behind it 'cause both protocols seems to be very popular in blog-engines? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpJ0n72O6uwK.pgp Description: PGP signature
Re: MetaWeblog API vs. Atom Publishing Protocol support
>>>>> "Russell" == Russell Keith-Magee writes: Hi Russ, Russell> In this case, it looks like a combination of factors: Russell> 1) The age difference between the two tickets, Russell> 2) A Ticket that just hasn't been completely updated to the Russell> current triage process, Russell> 3) Some background confusion over the difference between Atom Russell> PP and the Atom Syndication format. Thank you very much for elaborate & detailed answer - it completely satisfied my curiosity. Russell> Pushing domain-specific protocols outside the project core is a Russell> great way to maintain that focus while simultaneously promoting Russell> the greater ecosystem around the project. I agree wholeheartedly... Russell> the ticket is really pending a decision about whether it is Russell> suitable for inclusion in django.contrib. In the absence of a Russell> solid implementation that someone is pushing for inclusion into Russell> django.contrib, the ticket has gone stale - it hasn't been Russell> rejected outright as a bad idea, but it hasn't been formally Russell> accepted either. It should probably be marked 'someday/maybe', some GTD ;) Russell> but again, for historical reasons - that ticket state didn't Russell> exist at the time triage was actually happening on the ticket. It looks like MetaWeblog ticket was 'too early' :-D Russell> If you particularly want MetaWeblog support, it doesn't need to Russell> live in Django's core. Sure. Russell> Hunt around to see if anyone else has implemented it, and if Russell> they haven't, start a project. In time, if you create a robust Russell> implementation and can demonstrate demand for it, it may be Russell> considered for inclusion in django.contrib. I stumbled upon http://www.allyourpixel.com/post/xmlrpc-djgo/ and http://www.allyourpixel.com/post/metaweblog-38-django/ posts dating from '06 and wondered if something has changed in between... Apparently, there is some demand for it, but let's learn some more Python/Django first ;) Russell> Until then, it can live happily in the ecosystem without Russell> requiring any official blessing from us. Fair enough. Thanks again for the input. Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpwBvOR68deT.pgp Description: PGP signature
Re: Announcing Django Noob Group
>>>>> "Bobby" == Bobby Roberts writes: Bobby> ... simpleton questions welcome, mentors encouraged to help... Cool. I'm joining it... Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpMPUzF9xjTt.pgp Description: PGP signature
Re: MetaWeblog API vs. Atom Publishing Protocol support
>>>>> "Malcolm" == Malcolm Tredinnick writes: Malcolm> Atom sydnication and Atom publishing are standardised protocols Malcolm> that have gone through the IETF process and are used in lots of Malcolm> situations, weblogging being only one example. Right. Malcolm> The Metaweblog API has not had the same level of Malcolm> standardisation and is targeted at blogging-style applications Malcolm> exclusively. It's also RPC-oriented, rather than REST-oriented, Malcolm> which isn't particularly good practice in a web-oriented domain Malcolm> space. Yep, I'm aware of it, but according to "..a blind uncle is better than no uncle" and Django does not have 'official' support (some blog app like http://byteflow.su/ticket/43 apparently have added some support, although we would expect more in Django) for either of them, MetaWeblog could serve the purpose of remote-publishing, at least for some time... Malcolm> Atom publishing is always going to have an edge in situations Malcolm> like that, simply because it's a more appropriate general Malcolm> protocol. I fully agree with it Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpjMy6O4PUn1.pgp Description: PGP signature
lighty vs. nginx for deploying Django
Hi! I'm working through 'withdjango' book and ch.7. deploys Gallery app with the need to serve static files. Although I'm still fiddling on my 'localhost', I'd like to know which web server you recommend to settle on between lighty and nginx (Apache excluded) so I can be clear in the future when choosing hosting/VPS for Django sites and can learn about it on my localhost? The 'django' book and official docs gives example of lighty, but I'm not sure it is due whether it is due to it advantage over nginx or something else... Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpB2gjTQoLvd.pgp Description: PGP signature
Re: lighty vs. nginx for deploying Django
>>>>> "Jacob" == Jacob Kaplan-Moss writes: Hi Jacob, let me express my gratitude for providing Django 1st! Jacob> The best thing you can do is try both and pick the one that works Jacob> better for you. Me, I generally try to pick the software that's Jacob> got better documentation so that I spend less time fussing with Jacob> it, but other folks might want to choose the faster tool, or the Jacob> one with more features, or ... Good advice. Jacob> Set them both up, run some tests/benchmarks, and pick what you Jacob> think works best. I did some benchmarking here... Jacob> That's really just because when I wrote the docs and that part of Jacob> the book I didn't know nginx existed -- no other reason. Considering that nginx is, according to some stats, even more popular than lighty, it would be nice to update the docs to reflect it. I'd submit a patch, but still struggling to see admin's media appear in my login dialog :-/ Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpvwRnWjs6fY.pgp Description: PGP signature
Django development workflow
Hi! Being new to Django and web development in general I'm curious to learn about some of its 'best practices'. When working on the code for e.g. desktop application, I'd put stuff in e.g. $HOME/projects/project_1 directory under DVCS and regularly push to some 'centralized' server, provide tarballs for releases etc... Now, I wonder what to in case of web development with Django... Let's assume that I work on two sites: www.site1.com and www.site2.com and I try to develop new features for them and test them on my 'localhost' first before pushing changes to the production server. The question is how to mimic everything on localhost (how to organize code in projects) so that after enough testing one can just push changes to the production servers and update both sites without the need to change anything in django's settings? Another issue: what is the recommended way of keeping production & development databases (Sqlite3/Postgres) 'in sync' if one wants to add some content while doing localhost-development? Any URL where one can look or learn from? Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgp6yTc9Jejha.pgp Description: PGP signature
Re: Django development workflow
>>>>> "Clifford" == CLIFFORD ILKAY writes: Clifford> You don't have to organize your Django project directories any Clifford> differently, unless you want to. Nice to hear ;) Clifford> You will most likely have changes that are necessary when you Clifford> migrate from one server to another, different paths, different Clifford> database settings, different secret keys, perhaps a different Clifford> time zone, whatever. We use a pre_local_settings.py and Clifford> post_local_settings.py file for isolating those changes and Clifford> don't keep those two files under version control. That way, we Clifford> can keep setting.py under version control without exposing Clifford> sensitive information, like passwords, and have the same Clifford> settings.py in all scenarios. In setting.py, you could have Clifford> something like the following. [...] Clifford> # Now we have all the things that are the same across all Clifford> instances INSTALLED_APPS = ( # List all the installed apps Clifford> here ) # etc. Ohh, this is nice. Clifford> To keep it simple, we use PostgreSQL in development, QA, and Clifford> production and on those projects where we're forced to use Clifford> MySQL due to client requirements, then MySQL everywhere. What about 'syncing' content (if that is the issue)? Dump on production, import on development, add new content, dump on development, import on production? Clifford> The tutorial is a good place to start. There is no need to set Clifford> up a web server for development. The built-in development Clifford> server is quite sufficient and actually more useful in Clifford> development than a web server when you're prototyping and Clifford> debugging. That's clear. However, while working on 'gallery' app from the book, it's already mentioned that devserver is not for handling static images and I wanted to try out everything as on 'production' server. btw, Google gave me one nice URL which might be interested for someone else as well: http://martinjansen.com/2008/10/20/django-settings-files-for-development-and-production/ Thank you for your input. Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgp3E9Mmqfmb6.pgp Description: PGP signature
Re: Django development workflow
>>>>> "Clifford" == CLIFFORD ILKAY writes: Clifford> It's entirely up to you. You could use your database's Clifford> dump/load facilities, which would be the highest Clifford> performance. You could dump/load using a Python script and the Clifford> Django ORM. You could dump using "django-admin.py dumpdata" Clifford> <http://docs.djangoproject.com/en/dev/ref/django-admin/#dumpdata> Clifford> and use fixtures to load that data Clifford> <http://docs.djangoproject.com/en/dev/howto/initial-data/#providing-initial-data-with-fixtures>. Clifford> Django doesn't impose a particular approach but it gives you Clifford> some nice tools you can use, if you wish to use them. Thanks a lot! I was totally unaware of the above possibilities available in Django :-) Well, it's a bit natural considering I'm still reading tutorial-docs. Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpkKwDHIOITb.pgp Description: PGP signature
Re: Django book mostly done?
>>>>> "Alex" == Alex Gaynor writes: Alex> Adrian just put the last batch of chapters online, so I believe Alex> all the content is now up. Having skimmed most of it I can say it Alex> looks really good and I'm sure it basically all works, that said Alex> it isn't a final addition so there may be tiny errors, typos, or Alex> other mistakes. It's nice to see all the chapters online...although I'm bit disappointed to see that ch.12 still does not mention nginx server at all :-( Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpvoMh4CH2gg.pgp Description: PGP signature
Re: Sort of OT on the django book
>>>>> "Lakshman" == Lakshman Prasad writes: Lakshman> BTW, when is James Bennet's book 2.0 release? Don't ask this question. I asked him on #django (several times), and found out that such sort of inquiry is not very welcome ;) btw, instead of waiting for 2nd ed. I bought Pro Django (already having http://withdjango.com/ book). Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpYtqrAj1vz6.pgp Description: PGP signature
Re: Sort of OT on the django book
>>>>> "James" == James Bennett writes: James> Well, what's not welcome is being asked the same question over James> and over again when the publication date's listed on the Amazon James> page for anyone and everyone to look at ;) Well, the context of the question was announcement about django's delay of 1.1 release... Otoh, when I e.g. pre-ordered Python Essential Reference 4th ed. the date listed was 15th of January, and it's May 15th as of today which makes a difference :-D Still, I wish you to make it before the autumn... Sincerely, Gour -- Gour | Zagreb, Croatia | GPG key: C6E7162D pgpxR1KAVtGv2.pgp Description: PGP signature
Re: Django Project Management App
On Fri, 11 Sep 2009 08:26:02 +0200 >>>>>> "Petar" == Petar Radosevic wrote: Hello Petar, Petar> The coincidence is that we just created a invoice/quote admin Petar> application for Django. I'm still writing a blog post about it. Petar> But you can see it here: Petar> Petar> http://bitbucket.org/breadandpepper/django-brookie/ Petar> I'm looking for some adequate invoicing django-app - something like SimpleInvoices (http://simpleinvoices.org/) - only with support for Postgresql and (possibly) Django. (One option I consider is Tryton (http://www.tryton.org/) - fork of OpenERP. I've also tried Minibooks from Caktus, but it looks that both (brookie & minibooks) are tied to your specific consulting needs as web developers while our need would be (to track patients in small homeopathic/counselling clinic and) creating invoices for the clients. Do you plan to work further on brookie and is there any plan to abstract the code a bit in order to make it more useful as reusable app? Sincerely, Gour -- Gour | Hlapicina, Croatia | GPG key: F96FF5F6 signature.asc Description: PGP signature
Re: Choosing a Django-based CMS
On Sun, 5 Aug 2012 00:30:57 -0700 (PDT) Sean O'Brian wrote: > Can you advice a mature and extensible CMS? The main > requirement is extending pages, for avatars for example. I was hoping to replace PHP sites with some web2py CMS, but at the end have decided to go with Django and deploy Mezzanine which is really in a good shape. SIncerely, Gour -- One who sees inaction in action, and action in inaction, is intelligent among men, and he is in the transcendental position, although engaged in all sorts of activities. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
fastcgi vs wsgi
Hello, At the moment I (have to) run 3 php sites in a tight memory environment using lighttpd server & php-fpm and I'd like to move one php site (for the beginning) to django cms (mezzanine) and wonder what is the impact of running django app with fastcgi vs wsgi? how they compare memory-wise? Considering that the server has to serve 2 PHP sites via fastcgi, would using fastcgi for deploying Django be better option memory-wise instead of serving Django app via wsgi? If wsgi option is better option, what would be optimal wsgi server memory-wise: uwsgi, gunicorn, fapws..? Sincerely, Gour -- The embodied soul may be restricted from sense enjoyment, though the taste for sense objects remains. But, ceasing such engagements by experiencing a higher taste, he is fixed in consciousness. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
Re: fastcgi vs wsgi
On Tue, 07 Aug 2012 00:39:36 +0200 Melvyn Sopacua wrote: > The system used is not of much influence. The bulk of the memory usage > of a WSGI and fastcgi app is the modules that are loaded by the python > interpreter, similar to how php-fpm memory increases with each > extension that is loaded. Caching settings are also of influence. Thank you very much...it's very helpful. > The best way to find out is to load your apps and turn debugging off > on your staging server (settings.DEBUG is a major memory hog). I do > however find that uwsgi gives you a lot of control combined with sane > defaults. Limits to configure include memory usage and forking models. I've found out about uwsgi's idle & cheap option...very useful. > So you main goal is to turn off in django what you don't need. > Candidates: > - i18n/l10n > - cachemiddleware > - context processors > - settings.DEBUG > - uninstall PIL if you don't use it Thanks a lot. Sincerely, Gour -- Thus the wise living entity's pure consciousness becomes covered by his eternal enemy in the form of lust, which is never satisfied and which burns like fire. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
different language for admin/front-end
Hello, what is the recommended way to set different language in Django admin (e.g. English) than the one in front-end (e.g. native one)? I see there are some snippets and/or middleware for it, but the posts are several years old and, considering I'm new to django-1,4; I wonder if there is some other way/settings/app to achieve it? Sincerely, Gour -- As fire is covered by smoke, as a mirror is covered by dust, or as the embryo is covered by the womb, the living entity is similarly covered by different degrees of this lust. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
Re: different language for admin/front-end
On Sun, 12 Aug 2012 17:33:27 +0200 Melvyn Sopacua wrote: > As you can see in the documentation [1], there's five methods by which > one can select the language once you've added LocaleMiddleware: Thank you very much. I was looking at docs, but, somehow, missed this info. However, I'm pleased to see there are several options to choose from without any extra add-on required as with PHP CMS-es (WP, Concrete5). Sincerely, Gour -- As fire is covered by smoke, as a mirror is covered by dust, or as the embryo is covered by the womb, the living entity is similarly covered by different degrees of this lust. http://atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
Re: E-commerce package
On Tue, 4 Sep 2012 00:01:39 -0700 Randa Hisham wrote: > Iam developing an e-commerce website,lookig for a good django package > any recommends? Mezzanine & Cartridge - http://mezzanine.jupo.org/ Sincerely, Gour -- It is far better to discharge one's prescribed duties, even though faultily, than another's duties perfectly. Destruction in the course of performing one's own duty is better than engaging in another's duties, for to follow another's path is dangerous. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
is Django by Example still relevant resource
Hello, I'm starting to learn Django and considering that the present django is 1.4.1 and by the end of the year there will be 1.5 available, i wonder if Django by Example (http://lightbird.net/dbe/index.html) written for 1.2 is still good resource for learning? What about The Django Book V2.0? Django tutorial is nice, but wonder how to proceed afterwards? Going through 'topics' or consulting some older material like the one mentioned above? Sincerely, Gour -- As the embodied soul continuously passes, in this body, from boyhood to youth to old age, the soul similarly passes into another body at death. A sober person is not bewildered by such a change. http://www.atmarama.net | Hlapicina (Croatia) | GPG: 52B5C810 signature.asc Description: PGP signature
Regarding OTP based login- Django
Hello, TIA. I am new in django, can anyone help me for OTP based login in my app. I am working on a ecommerce app and want to login otp based login and dont know or getting much on google that how to integrate phone number with django user model or want to use custom user model. Regards, Rahul Gour -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAFi6BNX1qfhDF1zqY7xt4aD%2B7F7mgNXmApxZ%2BquigQYxSgsinw%40mail.gmail.com.
download-list app
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: download-list app
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
Re: Confusion about the new staticfiles contrib app
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: my frist django project Error
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: Django hosting
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