Re: wicket like templating

2007-06-02 Thread Nicola Larosa
Ittay Dror wrote: > I was wondering if anyone has thought about making django's templating > system more in the concepts of wicket (there are other such templating > engines, this is the one i've used). That's not going to happen, as you know by now. However, using any other templating system i

DATANDO E CHATTING, GALERIA QUENTE DAS FOTOS, BUSCA DAS MENINAS

2007-06-02 Thread desiga
DATANDO E CHATTING, GALERIA QUENTE DAS FOTOS, BUSCA DAS MENINAS http://www.datardebrasil.blogspot.com DATANDO E CHATTING : http://brazildating.googlepages.com DATING AND CHATING : http://www.chatfordating.blogspot.com BRAZIL GIRLS SEARCH : http://www.chattingsingles.blogspot.com AGLOC

Re: Unicode-branch: testers wanted

2007-06-02 Thread Malcolm Tredinnick
On Sun, 2007-06-03 at 13:39 +1000, Malcolm Tredinnick wrote: > Hi Eugene, > > On Sat, 2007-06-02 at 21:46 +, Eugene Morozov wrote: [...] > > I've checked out unicode branch today and immediately found two bugs. > > This code doesn't work: > > def __unicode__(self): > > langs = dic

Re: Extending Flatpages

2007-06-02 Thread Nathaniel Whiteinge
Malcom is right, they're not as bad as they sound. :-) In the case of the two things you mentioned wanting, latest news and a calendar, the following existing template tags may just hook you up: James Bennett's get_latest__ is copy-and-paste-able and works very well. I use a slightly modified ve

Re: Extending Flatpages

2007-06-02 Thread Michael
Or you might also want to check out Generic Content Tags: http://code.google.com/p/django-template-utils/wiki/GenericContentTags Part of the Django template utils that James put together: http://code.google.com/p/django-template-utils/ -Michael On Jun 3, 1:14 pm, Malcolm Tredinnick <[EMAIL PROT

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread chrominance
That's a bit creepy. If not the DEBUG issue, then what? The parent Apache process hasn't budged from 3MB since the restart and I can't imagine what else would have changed between the 90MB period and the 30MB period. I loaded my project from svn so there were no .pyc files initially, I've never us

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread Graham Dumpleton
BTW, one further thing you can experiment with as far as trying to bring down memory use, is if you have access to main Apache configuration file, try setting: PythonOptimize On at global scope outside of any virtual host containers. This will have the same affect as having supplied '-O -O' o

Re: Unicode-branch: testers wanted

2007-06-02 Thread Malcolm Tredinnick
Hi Eugene, On Sat, 2007-06-02 at 21:46 +, Eugene Morozov wrote: > > > On 24, 17:06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > Hi folks, > > > > The unicode branch, [1], is now at a point where it is essentially > > feature-complete and could do with a bit of heavy testing from t

Re: Extending Flatpages

2007-06-02 Thread Malcolm Tredinnick
On Sat, 2007-06-02 at 14:54 -0700, [EMAIL PROTECTED] wrote: > Oh no, that can not be! I just read this "Writing your own template > tags", it is quite complicated. Isn't there another way? Something > like "While you fetch the text for the flatpage, check the view > 'random_testemonial' and then g

Re: wicket like templating

2007-06-02 Thread Russell Keith-Magee
On 6/2/07, Ittay Dror <[EMAIL PROTECTED]> wrote: > > So, as you may have realized by now is that I like wicket. But, I > don't like Java so much any more, and would like to see the good > concepts of wicket applied in Django. Major changes to the Django template system really aren't open for disc

Re: wicket like templating

2007-06-02 Thread Russell Keith-Magee
On 6/3/07, itsnotvalid <[EMAIL PROTECTED]> wrote: > > As far as I know there isn't much a way to replace the default > template system with another third-party one (except by extensive > hacking). 100% incorrect. There is nothing forcing you to use Django's template system. HttpResponse (the cla

Re: Case insensitive urls

2007-06-02 Thread Bryan Chow
URLs should be unambiguous, i.e any logical piece of content should have one and only one definitive URL, with any alternatives acting as a permanent redirect. http://simonwillison.net/2007/Feb/4/urls/ Therefore, rather than configuring urls.py to ignore case, a better solution would be to use mo

Re: Querysets of ManyToMany Fields

2007-06-02 Thread sansmojo
Hi, Tom. I'm not sure I always give the very best advise as to how to do something, but I give you the easiest way I know of. So, that being the case, I'd use the object_detail generic view instead of object_list. Object_list doesn't accept a slug or object_id, whereas object_detail does. Just

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread Graham Dumpleton
On Jun 3, 5:40 am, chrominance <[EMAIL PROTECTED]> wrote: > Epilogue: it looks like the major culprit behind my skyrocketing > memory usage was indeed my failure to properly restart all the apache > processes; it looks like the parent process was still storing debug > info from when I had DEBUG=Tr

Re: best practice for portal-like pages?

2007-06-02 Thread oggie rob
The advantage is you get to organize your additions in the base template (which is where you should strive to manage layout & L&F as much as possible). Your solution works fine for a row-by-row example, but is less flexible for a more complex layout. For example, if you want to have a two- or thre

Re: Extending Flatpages

2007-06-02 Thread James Bennett
On 6/2/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > As said in the docs http://www.lawrence.com/about/staph/ is a flatpage > but it contains extra date like that calendar and the latest news. So > I actually just want to know how to get this additional dynamic > content on my flatpage. Thos

Re: Extending Flatpages

2007-06-02 Thread [EMAIL PROTECTED]
Oh no, that can not be! I just read this "Writing your own template tags", it is quite complicated. Isn't there another way? Something like "While you fetch the text for the flatpage, check the view 'random_testemonial' and then go render the template." If that's really the only way I will reread

Re: Unicode-branch: testers wanted

2007-06-02 Thread Eugene Morozov
On 24, 17:06, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > Hi folks, > > The unicode branch, [1], is now at a point where it is essentially > feature-complete and could do with a bit of heavy testing from the wider > community. > > So if you have some applications that work against Django

Querysets of ManyToMany Fields

2007-06-02 Thread Tom Baylis
Hi I'm fairly new to django and I'm having problems with the generic views. As many others I'm making a blog application, and I want to use the object_list view to construct a list of all Posts with a certain Tag (My code is further down). I've been looking through the examples and the django

Re: [Announce] Django on Gentoo (DoG) Linux EC2 Image

2007-06-02 Thread Frédéric Sidler
very nice job and thanks too for sharing I have a instance running django stuff on EC2 too with dyndns.org set up. Everything is on one instance and I plan to multi-tier this application. As we are experimenting teh same solutions, do you have anything to share regarding this special stuff on EC2

Re: Should file uploads work in 0.96 admin?

2007-06-02 Thread Andrew
After stepping through the server code, I found my problem as well... a slash but in the wrong place. I had been confused by the way admin interface displays the path to uploaded images. with: settings.py: MEDIA_ROOT="/home/user/foo/media" MEDIA_URL="/static/" models.py: ImageField(upload_to="/s

Re: Django, shared hosting memory limits and memory optimization

2007-06-02 Thread chrominance
Epilogue: it looks like the major culprit behind my skyrocketing memory usage was indeed my failure to properly restart all the apache processes; it looks like the parent process was still storing debug info from when I had DEBUG=True in my settings.py, so that setting it to False and soft restart

Re: best practice for portal-like pages?

2007-06-02 Thread patrick k.
what´s the advantage of including the sub-templates in the template instead of rendering them in the view? rendering the templates in the view seems to be a bit more flexible when it comes to caching, I guess. besides, a custom entry could have its own specific template - so, I ´m not sure h

Re: best practice for portal-like pages?

2007-06-02 Thread oggie rob
Using the "include" tag, you can provide the template through a variable e.g. {% include template1 %} instead of {% include 'mysite/ movies.html' %} so you can pass this stuff from the view. What's more, the include template uses the context from the "parent" template. So you can also pass all thi

Re: Generic views: how to use them properly?

2007-06-02 Thread Nathaniel Whiteinge
My apologies! I didn't read your original post closely enough. You can extend generic views to accept additional URL parameters and to do extra stuff by pointing the URLconf at your own views.py function that then calls the generic view. It's slightly more work, but is still very convenient. ..

Re: Extending Flatpages

2007-06-02 Thread Nathaniel Whiteinge
Stuff like that calendar and the latest news are what templatetags excel at doing. They are deceptively powerful. .. __: http://www.djangoproject.com/documentation/templates_python/#writing-custom-template-tags .. __: http://www.b-list.org/weblog/2006/06/07/django-tips-write-better-template-tag

Re: Number of apps on one server

2007-06-02 Thread oggie rob
You might be limited to a relatively small number of Django apps (i.e. separate entries in the httpd.conf file) on a single dedicated server, since each would require its own PythonInterpreter, but depending on traffic I would guess you could have more than that on there. Having said that, if you

Re: Generic views: how to use them properly?

2007-06-02 Thread Nathaniel Whiteinge
The only argument that is `required for the create_object generic view`__ is a model. .. __:http://www.djangoproject.com/documentation/generic_views/#django- views-generic-create-update-create-object I've run into this problem a few times when I was getting started. It took me a while to get acc

Add a css file into the admin zone

2007-06-02 Thread Grupo Django
Hello, I read that it's possible to add custom javascript to the admin zone using: class Admin: js = ( '/templates/jscripts/admin.js', ) How can I add a customs stylesheet? I had to do it appending it to the document, using javascript and the DOM. Thank you.

Re: wicket like templating

2007-06-02 Thread Ben Jones
> > > With wicket, the template is just > > > a regular HTML with attribute that identify snippets of HTML that need > > > to be dynamically created. Then, the backend code can substitute these > > > snippets, usually by reusing them, and injecting dynamic content. > > > > You can do this with Dja

Extending Flatpages

2007-06-02 Thread [EMAIL PROTECTED]
Hi All. I have got a question about flatpages. Supposed I have a "static" page that says how great my product is, I could use a flatpage for this. No Problem. But if I want to have something like a random quote or testimonial on that page too, is that possible? As said in the docs http://www.law

Re: wicket like templating

2007-06-02 Thread itsnotvalid
As far as I know there isn't much a way to replace the default template system with another third-party one (except by extensive hacking). And by the way the uri of "wicket is http://wicket.sf.net/. Unfortunately this thing is written in Java, so there no way to "hack" it into python for now. By

Re: Generic views: how to use them properly?

2007-06-02 Thread Amit Ramon
Hi, I'm quiet new to django myself, so this may not be the definitive answer, but perhaps it would help. I've done something similar, but I created my own view rather than using the generic view, and used a form to create the dependent object (the book in your case). I used the method forms.f

Re: wicket like templating

2007-06-02 Thread Ittay Dror
On Jun 2, 4:16 pm, "Ben Jones" <[EMAIL PROTECTED]> wrote: > Hi Ittay - > > > With wicket, the template is just > > a regular HTML with attribute that identify snippets of HTML that need > > to be dynamically created. Then, the backend code can substitute these > > snippets, usually by reusing th

Re: Template question

2007-06-02 Thread Eugene Morozov
On 2 июн, 17:37, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Sat, 2007-06-02 at 06:07 -0700, Eugene Morozov wrote: > > Hello, > > I have a question which might be trivial to answer, but I didn't found > > answer by scanning the docs. > > In my base template I have defined inset block: > >

Number of apps on one server

2007-06-02 Thread moesian
Hi, If I were make small apps in rails such as personal blogs etc I read a post saying that I would only be able to host around 30-40 on a dedicated server as opposed to around 300 if they were wirtten in PHP. I was wondering if you would have a similar problem if you used django. Cheers --~-

Re: Very large scale sites in Django

2007-06-02 Thread Simon Willison
On May 31, 5:30 pm, Daniel Ellison <[EMAIL PROTECTED]> wrote: > A quick glance at the memcached site says that it's used on LiveJournal, which > gets over 20,000,000 page requests per day. Excellent. Not quite at our > traffic level, but not too shabby. :) Memcached is pretty much the industry st

Re: Template question

2007-06-02 Thread Malcolm Tredinnick
On Sat, 2007-06-02 at 06:07 -0700, Eugene Morozov wrote: > Hello, > I have a question which might be trivial to answer, but I didn't found > answer by scanning the docs. > In my base template I have defined inset block: > > {% block inset %}{% endblock %} > > I want to remove

Re: wicket like templating

2007-06-02 Thread Ben Jones
Hi Ittay - > With wicket, the template is just > a regular HTML with attribute that identify snippets of HTML that need > to be dynamically created. Then, the backend code can substitute these > snippets, usually by reusing them, and injecting dynamic content. You can do this with Django templat

Template question

2007-06-02 Thread Eugene Morozov
Hello, I have a question which might be trivial to answer, but I didn't found answer by scanning the docs. In my base template I have defined inset block: {% block inset %}{% endblock %} I want to remove tags if derived template doesn't fill in the inset block. Of course I c

wicket like templating

2007-06-02 Thread Ittay Dror
Hi, I was wondering if anyone has thought about making django's templating system more in the concepts of wicket (there are other such templating engines, this is the one i've used). With wicket, the template is just a regular HTML with attribute that identify snippets of HTML that need to be dyn

best practice for portal-like pages?

2007-06-02 Thread patrickk
This is a problem we´re having with every webpage we did with django so far. Now, I´d like to make this more generic and write a tutorial for how a portal-like page could be done using django. As an example, let´s say we have a database with movies, stars (actors, writers, directors ...), c

Get paid to surf Ads....its real...

2007-06-02 Thread coolguy17111987
Hi all Now you can get paid to surf ads..All you need to do is register on their site, surf ads for 30 seconds. And you will be credited with the earning immediately. Ist'nt dat amazing. Many of you must have already joined, for rest dont wait...hurry up... Sooner you join more you earn Gi

Re: Serving static media, again...

2007-06-02 Thread Nebojša Đorđević
On 01.06.2007., at 10:27, Michal wrote: > So, I have one server with apache2+mod_python and Lighttpd installed. > What is the best solution for serving static content? [snip] > 4) (something else?) Something I'm using: Serve all by apache without mod_python and handle Django app with FastCGI.

unique and core with edit_inline breaks admin

2007-06-02 Thread sime
Hi all, just noticed that when core=True and unique=True are both set on a field where the model is being edited using edit_inline, admin breaks on attempt to save. The error is Cannot resolve 'xxx' into field.. Choices: xxx. I'm running on trunk. --~--~-~--~~~---~--