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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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.
..
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
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
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
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.
> > > 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
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
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
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
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
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:
> >
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
--~-
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
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
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
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
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
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
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
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.
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.
--~--~-~--~~~---~--
45 matches
Mail list logo