; do what I need. Once my context_processor is made how would I add it
> to this list? Something like
> settings.TEMPLATE_CONTEXT_PROCESSORS.append(my_processor)
>
>
> On Mar 29, 7:19 pm, David Zhou wrote:
>> On Sun, Mar 29, 2009 at 7:14 PM, IanR wrote:
>> > I'm trying to stay a c
On Mon, May 11, 2009 at 12:04 PM, CrabbyPete wrote:
>
> I just started using forms and I have the following html
> Zip Code: size="15" maxlength="15">
>
> How do you specify the class type for the input field.
See:
http://docs.djangoproject.com/en/dev/ref/forms/widgets/#django.forms.Widget.att
On Thu, May 14, 2009 at 9:53 PM, online wrote:
>
> Whatever i changed 'home.html' to other page i always get the same
> result.
Are you restarting your serving? If by "changed home.html to other
page" you mean you modified your view function to return a different
template, then make sure you re
On Sun, May 24, 2009 at 9:40 PM, jago wrote:
>
> I want to make the HTML of the website as little human readable as
> possible. For that I would like to add some layer to Django 0.96 which
> when writing out the page takes the HTML and adds some processing.
>
> 1. How would I obfuscate the HTML a
Does the following worth in the interactive prompt?
>>> import socket
>>> socket.getaddrinfo("www.google.com", 80)
-- dz
On Sun, May 24, 2009 at 10:59 PM, Chris DPS wrote:
>
> When I execute runserver, I get the following message:
>
> Validating models...
> 0 errors found
>
> Django version
On Sun, Sep 13, 2009 at 9:07 PM, W.P. McNeill wrote:
> the web, but this seems error prone. The right way to do it would
> seem to be to use the slugify code that is already in Django.
> What is the best way to slugify an arbitrary string using a Python
> call?
from django.template.defaultfil
On Mon, Oct 26, 2009 at 4:16 AM, aju mathew wrote
>
> In Django CMS any blog plugin is available.
You should be using the Django-CMS mailing list for this in the future.
That said, use CMS_PLACEHOLDER_CONF to specify which plugins are
available for which placeholders:
http://www.django-cms.org
What's your 'view_xyz'?
Are you sure that view_xyz is accessible through an URL without any
arguments?
-- dz
On Wed, Oct 28, 2009 at 2:55 PM, Umapathy S wrote:
> Hello there,
>
> I am developing a page which has a left side menu. This menu is a seperate
> html and gets includes in the base.h
On Sun, Nov 29, 2009 at 9:18 PM, digicase wrote:
> I received a good email From Remi at WF which told me all I needed to
> know. The outage was unacceptable but hopefully lessons have been
> learned.
Do you mind sharing what he said? I'd be curious to know if any new
controls have been put into
Is the bay area right out for cost reasons?
dz
Sent from my iPhone
On Sep 27, 2010, at 8:48 PM, Samuel Baldwin wrote:
> 2010/9/27 Franklin Einspruch :
>> May I humbly suggest Boston?
>
> Another for Boston.
> --
> Samuel Baldwin - logik.li
>
> --
> You received this message because you are sub
FWIW, on Postgres DBs, I've done the following:
qs = FooModel.objects.filter(date__gte=start_date,
date__lt=end_date).extra(select={'datetrunc': "date_trunc('month',
date)"}).values('datetrunc').annotate(total=Sum("value"))
date_trunc in postgres also accepts "day" and "week" truncations.
-- dz
Check out this snippet:
http://www.djangosnippets.org/snippets/936/
Some what old though (2008), so it might need updating to work properly.
-- dz
On Thu, Feb 11, 2010 at 4:18 PM, HARRY POTTRER wrote:
> Is there any way to manually expire per-view caches?
>
> I have a view that executes betw
There are a couple of ways, but here's one off the top of my head:
Base template:
$(function(){
function1() { ... }
function2() { ... }
{% block additional_domready %}{% endblock %}
});
{% block additional_js }%}{% endblock %}
child template that extends base template:
{% block add
On Sun, Apr 11, 2010 at 4:26 PM, Dexter wrote:
> I have a server running with primarily nginx and secundary apache2,
> And I am getting an template error trying to browse an app. It seems it
> cannot find a template, but it is certainly there, the runserver just works
> fine.
Everything in progr
It works for me. Here's the body of that post:
* Support for mod_wsgi: Setting up a default Django app with mod_wsgi
is now an option in our one-click installer. So if you prefer mod_wsgi
over mod_python you will no longer have to install it manually. I just
ran a simple benchmark using "a
Just grab macports or fink and install python from that.
On May 14, 2008, at 12:32 PM, Jason Ourscene wrote:
>
> Ok now that the shock has passed a bit, anyone know how to do this
> without reinstalling the OS.
>
> Thanks!!!
>
> On May 14, 11:47 am, Jason Ourscene <[EMAIL PROTECTED]> wrote:
>>
rom a "request handler" function (myproject.myapp.views.index)
Are you restarting the server between module changes?
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Djang
reaches a non-alpha state.
If you want to use Django for something, I'd start now -- or with
1.0. Waiting for Python 3000 is a bit silly.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the G
x27;):
#is man
elif hassattr(person_obj, 'woman'):
#is woman
else:
#is freakish mutated thing
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users&
On May 30, 2008, at 11:20 AM, jonknee wrote:
> On May 30, 10:38 am, David Zhou <[EMAIL PROTECTED]> wrote:
>> You can use also use hasattr().
>>
>> Something like
>>
>> if hasattr(person_obj, 'man'):
>> #is man
>> elif hassattr(
0.37 DB: 0.11 Queries: 3
> Stats: Total: 0.21 Python: 0.17 DB: 0.05 Queries: 32
> Stats: Total: 0.27 Python: 0.22 DB: 0.05 Queries: 32
What's up with that second line? Are you doing anything fancy?
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~---
erribly elegant.
Is there a better way to do this?
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-
> assigned to 'post' in render_to_response)
> >
> > {% for x in post%}
> > {{ post.0.title }}^M
> >
> >
> >{{ post.0.post }}^M
> >
> > It will only show the first part of the dictionary and 'x' as a
> number
>
variable_title }}.
Then it will use the variable name with underscores replaced with
spaces as the title.
Should I wait for the new admin code before trying to edit the admin
interface?
Does this sound like a good way of doing things?
nd is the one
> originally used by the developers.
I've been using FCGI, and it's beautifully so far. I'm using nginx
passing to flup.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed t
code (this was a big deal for my hosting provider).<<
>
> http://snook.ca/archives/php/cakephp_initial/
>
> Is that post correct? You have to restart the server whenever you make
> a change to the django code?
I haven't needed to do so for template chan
may consider SliceHost
> (Xen-based) and Linode (UML-based). The first one is used, and
> raved about,
> by a person I trust (hi, dialtone!).
I like RimuHosting, and would happily recommend it to anyone.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~
Does anyone have any experience with Django on Server Axis?
I've been looking at Rimu Hosting, but came across a couple positive
reviews of Server Axis. Their available memory and HD/transfer is
much more than Rimu at the $30 price point.
Thanks,
David
--~--~-~--~~-
Hey,
I've been creating a blog app to get a handle on some of the more
basic Django stuff. Currently, I'm using FreeComments for
commenting, but don't really like the way it does some things (the
URL, for example). I figure it shouldn't be too hard to add in my
own commenting models an
On Dec 27, 2006, at 6:06 PM, Adrian Holovaty wrote:
On 12/27/06, David Zhou <[EMAIL PROTECTED]> wrote:
What are people using for OneToOne relations (Comment->Entry)? The
Django documentation says that it may change, and is not recommended
for use. What do you use instead, or do mo
martypants. I don't think Markup
support's it as a filter though. You may have to process the chunk
through smartypants before passing to the template.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you a
ost1.save()
And then to access the related user of post1:
post1.user.alias
which should spit out 'bob'
(I haven't tested any of this, but it's basically a variation of the
sample page at: http://www.djangoproject.com/documentation/mod
entities. Even if you have the encoding set correctly on the server
and source side, the user can still explicitly set the (possibly
wrong) encoding in the browser.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you
e django+flup fcgi things described on the official
site, but in theory, you could use apache as well, I suppose.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users
.
If so does nginx provide some mechanism to start them up or is it
all handomatic?
I have a script that starts them up, but yeah, AFAIK, there isn't
anything in nginx or Django that starts them automatically.
---
David Zhou
[EMAIL PROT
, but I'd rather not have to do multiple
writes to the db.
self. returns the value about to be written for me?
Are you sure it's retrieving the value from the db?
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message becau
?
i have:
StartServers 5
Minspareservers 5
maxspareservers 10
maxclients 20
maxrequests per child 5
Why is your maxrequests at 5? Aren't you basically restarting a
process every 5 requests?
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You receiv
On Jan 12, 2007, at 6:25 PM, Nicolas Steinmetz wrote:
> Do I have to do as James [1] suggests, ie to filter it in views.py
> with some generic views methodes ?
That's the way I do it. It's a very simple wrapper, and also allows
me to add a host of other things into the con
d appreciate it if someone could point me that way. I
foudn a little bit about when it gets evaluated in the docs for the
DB API, but it was fairly light on the details.
Thanks!
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this mess
images wherever
I want them to be.
But if, say, I always had a header or title graphic in the same place
for each entry, I'd probably put that in the model. But if it's just
random images inside of the body content, I don't think it's worth it
of the same set
displayed in different template blocks. I could use a bunch of for
loops and if statements in the template logic, but that seems really
inefficient and cpu heavy for just splitting up a set.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
Yo
nd offset to the eventual
query.
So Django would combine [1:3] and [3:10] into one database hit?
AFAIK, you can do those two in just sql -- Django would need to know
to slice the resulting [1:10] set automatically.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~
On Jan 18, 2007, at 4:21 PM, James Bennett wrote:
On 1/18/07, David Zhou <[EMAIL PROTECTED]> wrote:
So Django would combine [1:3] and [3:10] into one database hit?
Accessing an object in 'b' after doing this will result in a database
query. Accessing an object in 'c
ype 'svn up' to sync to the latest trunk.
---
David Zhou
[EMAIL PROTECTED]
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups "Django
users" group.
To post to this group, send email to django-us
I use Braintree, and it's been great.
-- dz
On Tue, Mar 8, 2011 at 4:40 PM, CLIFFORD ILKAY
wrote:
> On 03/08/2011 09:59 AM, Bill Freeman wrote:
>>
>> And I can't resist recommending solutions that don't require your to touch
>> the credit card number. If you never had it, you can't be respons
101 - 145 of 145 matches
Mail list logo