I've written more about the release here:
http://simonwillison.net/2008/Sep/3/dmigrations/
The project (including documentation and a tutorial) is here:
http://code.google.com/p/dmigrations/
I'll be discussing the project on the schema migration panel at
DjangoCon this weekend.
On Sep 11, 5:23 pm, Glimps <[EMAIL PROTECTED]> wrote:
> I would like to restrict users to the data they can see/modify/
> delete on a table. I have a Reservation table that holds reservations
> for multiple banners of Restaurant chain. I don't want the user from
> franchiseX to be able to see/
On Sep 19, 10:24 am, "Nick Sandford" <[EMAIL PROTECTED]> wrote:
> Is there some kind of limit the admin imposes on the number of items
> it will show in a or the horizontal filter list? If so, can I
> change it? Also, is there any better way to do this?
raw_id_fields is the admin option you need
On Aug 20, 1:12 pm, Ceph <[EMAIL PROTECTED]> wrote:
> The only other option I see to serving large files securely is
> trickery using dynamically created sym links to the true static file
> and then redirecting the user to those URLs and letting Apache serve
> them. This isn't as secure, though, a
On Jan 7, 5:07 pm, Wes Winham <[EMAIL PROTECTED]> wrote:
> http://www.pointy-stick.com/blog/2008/01/06/django-tip-complex-forms/
>
> A shiny solution to the problem with code and the reasoning behind it.
> Simon Willison is awesome.
It's Malcolm that's awesome, I jus
questions about either the job or GCap feel free to
contact me directly (don't reply to the whole list).
Cheers,
Simon Willison
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
On Jan 8, 6:47 am, Michael Hipp <[EMAIL PROTECTED]> wrote:
> Learning about context processors, I have one like this:
>
> def bold_word(request):
> html = "A bold word."
> return {'bold_word': html,}
>
> I expected a *bold* word to show up in the browser, but instead here's
> what is sen
omes in, then splurge it all
through to the application running behind it at once when the whole
file is available to the load balancer. I'm pretty sure Perlbal has
this ability. Would this solve your file upload problem, or is there
something else that I'm mi
On Apr 27, 8:48 am, Thierry <[EMAIL PROTECTED]> wrote:
> What's the current opinion about integrating sql alchemy into the
> backend of django's ORM?
There's an active project to do exactly that hosted here:
http://gitorious.org/projects/django-sqlalchemy/
Some of the features in queryset-refac
On Apr 29, 9:31 am, leopay <[EMAIL PROTECTED]> wrote:
> oh,sorry ,I made a mistake,it is Entry.objects.all()[0:1]
> I means when I write like this Entry.objects.all()[0:1],I cannot find the
> this raw sql like 'select col_name from entry_table limit 1' in
> sql_queries,but if I write like this Ent
On Apr 29, 10:03 pm, berthor <[EMAIL PROTECTED]> wrote:
> I was told by my boss that I would be using both django 0.96 and
> django trunk on 2 separate projects. Now I'm not sure how to go about
> doing this, as I have been working with only django 0.96 before. I've
> downloaded the trunk versio
Hi all,
I've written up a bunch of techniques for debugging Django
applications:
http://simonwillison.net/2008/May/22/debugging/
I'm collecting more tips in the comments.
Cheers,
Simon
--~--~-~--~~~---~--~~
You received this message because you are subscribe
Hi all,
I've just released the first version of an OpenID consumer package for
Django. The idea is to make it ridiculously easy to add OpenID
consumer support to any Django application - and hence allow users of
OpenID to sign in without having to set up a new username and
password.
http://code.
ckled).hexdigest():
raise NastyError, "You tampered with my data!"
else:
my_data = pickle.loads(pickled.decode('base64'))
The same technique can be used in lots of other places - cookies for
example. The only way the user can tamper with th
On May 22, 9:38 am, omat <[EMAIL PROTECTED]> wrote:
> Is it a good idea to use a middleware class to detect the browser
> client looking at the HTTP_USER_AGENT so as to serve presentation
> logic accordingly, for mobile devices or older browsers, etc...?
I would advise against this because it won
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 Nov 30, 4:48 pm, "Tane Piper" <[EMAIL PROTECTED]>
wrote:
> As you can see in the Branch model, there is a field called num_leafs
> - I've been reading the signals documentation and had a look on the
> web, but I'm still having difficulty getting my head around it. What
> I want to do is when a
Jacob Kaplan-Moss wrote:
On 12/20/06 2:23 PM, Chad Whitacre wrote:
> I'm interested in deploying Django as a pure-Python HTTP daemon, much
> like Zope and CherryPy are deployed. Is this done at all w/ Django?
I'm pretty sure that's how Simon is serving his new site -- see
http://simonwillison.n
Chad Whitacre wrote:
Simon,
Well, after that I have to tip my hand. :^)
I've started such a project, called Aspen:
http://www.zetadev.com/software/aspen/
I've got a bit of a philosophical problem with Aspen - the fact that it
supports "five different development patterns". I'm interested
Jacob Kaplan-Moss wrote:
A number of people have made this same assertion, and I'm a bit curious about
it. Is there a reason that using Apache/mod_python as the app server and
nginx/perlbal as a distributor is somehow less effective than a pure-Python
solution?
I'm interested in this for a cou
Sort of. I've achieved this in the past with a bit of ugliness -
basically, I pointed everything at the same view and wrote my own code
within it that dispatched based on the hostname. There's an open
proposal at the moment to make the url dispatching logic a view
function itself (a view that dis
Simon Willison wrote:
I'm interested in this for a couple of reasons. Firstly, it's less bits
of software - if we could tell people "Install Django, install
Reinhardt[1]...
That [1] was meant to be accompanied with a footnote saying that
Reinhardt would be an awesome name fo
Sylvain Hellegouarch wrote:
I'd be interested to know which version of CP Simon was running. CP3 is
way more stable, efficient and comprehensive that CP2 (and its WSGI
server is like ten steps ahead).
__version__ = '3.0.0beta2'
I'm really interested as to what kind of failures can be expecte
On 5 Jun 2006, at 02:31, Scott Anderson wrote:
> You have to make sure to trap both successes and failures in the
> Javascript code -- I don't know how mochikit does that, but with
> prototype you need to specify an onFailure hook to get errors.
MochiKit models its async stuff on Twisted deferr
On 6 Jun 2006, at 03:26, John M wrote:
> how does that differ from
>
> (r'^polls/'),
> (r'^polls/(\d+)/$')
>
> Note the $ is missing from the first line of the second example.
>
> When you don't have a $ in the polls/ setup, it doesn't scan down to
> the other entries.
>
> Since I'm so
On 7 Jun 2006, at 02:42, Todd O'Bryan wrote:
> Does anybody have a best practice (or not-too-annoying practice) for
> testing?
>
> I think I'll use Selenium to test my site, but how should I change to
> a test database, populate the test database, etc.?
This is an area where Django can learn a
On 7 Jun 2006, at 05:33, Joseph Kocherhans wrote:
> I think you want tocreate something like testsettings.py, and in that
> file do something like:
>
> from myproject.settings import *
>
> then override the specific settings you want. It won't work with
> manage.py, but your tests should be
On 9 Jun 2006, at 14:03, Spock wrote:
> I've application where most of data is fetched from database.
> Those data are inserted by people without "trust", so in every
> template
>
> I'm using |escape filter ...so a question is :
>
> Is there is some method to enable global escape filter ? :)
I
On 10 Jun 2006, at 10:02, PythonistL wrote:
> ImproperlyConfigured: Could not load database backend: No module named
> _mysql. Is your DATABASE_ENGINE setting (currently, 'mysql') spelled
> correctly? Available options are: 'ado_mssql', 'mysql', 'postgresql',
> 'sqlite3'
>
>
> but from Python sh
On 14 Jun 2006, at 12:52, Roger Sun wrote:
> I don't like the django templates, can i use kid ?
> if can, how can i do then?
Yes you can. Here's an example:
from django.http import HttpResponse
import kid
def index(request):
# Set up any variables you might want to use
template = kid.Te
On 22 Jun 2006, at 21:33, Scott Finnie wrote:
> My proposed solution is to insert the session id into the filename
> (since, for a given session, there can only be one image used at any
> given time). That should work but will need a cleanup job to clear
> the
> temp dir periodically.
>
> So
On 26 Jun 2006, at 19:07, Harish Mallipeddi wrote:
> I'm wondering if someone could advise me on how to do certain periodic
> background tasks with django? For instance, if I needed to retrieve a
> list of RSS feeds daily to check for updates how would I do that?
>
> Is there a way to do this by
On 27 Jun 2006, at 08:53, Kristoffer wrote:
> I can import Q with "from django.core.meta import Q", but I can't find
> QuerySet. Did it exist in version 0.91?
No. QuerySet is part of the vastly superior magic-removal ORM, which
was introduced in Django 0.9.5. There are instructions on upgradi
On 28 Jun 2006, at 02:21, HoLin wrote:
> ?type_encode=0&domain=python&root=.cn&root=.com&root=.net
>
> using request.REQUEST.get("root") can only get the last value *.net*
> how can I get the right value of root?
request.GET.getlist('root') will get you back a list of all of the
root= values
On 28 Jun 2006, at 14:39, Craig Marshall wrote:
> I can run python interactively and type "import django" and get no
> errors, but when I go into our project directory and run "./manage.py
> syncdb", I get this error:
>
> ImportError: No module named django
>
> I'm running Python 2.4.3 in case t
On 5 Jul 2006, at 14:32, plungerman wrote:
> i would like to store django template code in a database and retrieve
> it for display.
The Django template system was originally designed with this exact
use-case in mind - we made sure that there was flexibility as to
where the templates were l
On 10 Jul 2006, at 06:42, arthur debert wrote:
> also, simon willison's javascript introduction is excellent:
>
> http://flickr.com/photos/simon/sets/72057594077197868/
There's a better version of it up on the Mozilla Developer wiki now -
other people have been fixing all the bugs :)
http://
On 14 Jul 2006, at 18:34, Scott Chapman wrote:
> It's in an xmlhttprequest call so I never get to see the blow up,
> and it's a
> form POST so I can't simply call it with some command line parms in
> the
> browser to see it - so I'm flying blind a bit.
Get yourself Firefox and the LiveHTTPH
On 19 Jul 2006, at 13:50, Maciej Bliziński wrote:
> is it possible to make the same thing without writing custom SQL code?
No it isn't - but that's fine, that's exactly why Django allows (and
encourages) you to roll your own SQL when you need to:
http://www.djangoproject.com/documentation/mo
On 19 Jul 2006, at 16:22, kwe wrote:
> Is there a way to display images in the list_display admin frontend?
>
> I tried writing a custom method for the model which returned the
> necessary html to display the image - without success. The custom
> method in the list_display just returned the raw h
On 20 Jul 2006, at 15:47, walterbyrd wrote:
> If I were "up to speed" with python and django, could I develop as
> quickly as I could with a code generator?
Yes. As a general rule, code generators are unnecessary if you are
using a sufficiently dynamic language (such as Python). Historical
On 21 Jul 2006, at 17:55, Elver Loho wrote:
>> I wonder if you could be a bit more explicit here... I can't think of
>> a single place where you "just set a variable and have it do
>> something cool", so I'd like to know more about what scares you.
>
> The admin module? http://www.djangoproject.
On 23 Jul 2006, at 06:03, Sean Schertell wrote:
> I've downloaded Dive into Python and it looks good. But I need
> something I can read on the subway or in the bathtub. Something I can
> dog-ear and highlight -- a real book!
>
> Any recommendations? I'm brand new to Python and want to learn for
On 24 Jul 2006, at 01:17, Jacob Kaplan-Moss wrote:
>> Has anybody else seen this error? It's obvious that Http404 doesn't
>> have the method, it's just a subclass of Exception. If this is just a
>> Django bug, I'll happily post a patch, just want to feel out any
>> possible stupidness on my part
On 24 Jul 2006, at 12:21, patrickk wrote:
> has anyone ever used simplejson with umlauts?
> I´m reading a title from a blog-entry which has umlauts and they are
> not displayed correctly.
I doubt this is a problem with simplejson; it seems to handle unicode
characters just fine. I imagine you
On 27 Jul 2006, at 11:39, Sebastian F wrote:
> But then it hit me, ticket was closed with
> resolution 'wontfix' (http://code.djangoproject.com/ticket/2004). I am
> curious, why?
Your guess is as good as mine - it looks like the ticket was closed
by the person who opened it. The Django core d
> 2a. The easy way to use mygthy templates is to render them and send the
> result to a "Blank" django template which will show the results
> a simple view:
> [...]
> def myview(request):
> file = AFile()
> #execute a template
> interpreter.execute('mytemplate.myt', out_buf
http://www.twit.tv/floss11
Django gets some good discussion about 50 minutes in.
--~--~-~--~~~---~--~~
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.
On 4 Aug 2005, at 13:32, Jacob Kaplan-Moss wrote:
If you've got a blog (or know of one) that covers Django, please
send me a link to the feed -- preferably a feed for the Django
category, if it exists. I'll try to have something up by this
weekend.
Here's mine:
http://simon.incutio.co
This is purely to satisfy my own curiosity, but does anyone have a
deployed, public Django site up and running yet (aside from the sites
built by the team in Lawrence)?
It would be cool to hear about intranet apps as well, but I'm really
interested in seeing some examples of Django runnin
On 11 Sep 2005, at 20:16, Mookai wrote:
Is it possible to use this syntax of do I have to write an own
template
tag?
I want to use it to check if a module has to be displayed based on
permissions:
{% if user.get_module_perms(app.name) %}
That syntax won't work - but the magic perms varia
I've started a list of public websites powered by Django on the
development wiki:
Django powered sites
Please add your Django-powered site if it's not already listed.
Cheers,
Simon Willison
http://simon.incutio.com/
On 9/14/05, Simon Willison <[EMAIL PROTECTED]> wrote:
> I've started a list of public websites powered by Django on the
> development wiki:
Here's the link: http://code.djangoproject.com/wiki/DjangoPoweredSites
ist option will
be highlighted. On the contactpage, nav-contactpage will be
highlighted - and so on.
Of course, this approach doesn't scale to hundreds of different pages
very well - but it's great for small sites or for sections of large
ones.
Cheers,
Simon Willison
On 28 Sep 2005, at 21:25, Jacob Kaplan-Moss wrote:
Why? In case you hadn't noticed, Django has a pretty large memory
footprint; between Apache, mod_python, Python, the database
drivers, etc., Apache server processes tend to weigh about 10M each
(at least on my servers). Unfortunately, A
On 29 Sep 2005, at 15:06, Tau wrote:
What you, the authors of django, can provide on the subject of
django's
performance and scalability. I find the framework architecture to be
excellent but, literally speaking, what if I migrate my php sites to
django. Will hardware upgrade be inevitable?
On 29 Sep 2005, at 15:20, Tau wrote:
Is it possible to share a project among several domains?
Each domain should have different templates and media files. I don't
care about the models, I use XML.
What is the recommended mod_python configuration?
Yes - in fact Django was designed for this kind
On 29 Sep 2005, at 16:10, Adrian Holovaty wrote:
Yes, this is entirely possible -- it's how Django is used at World
Online. You'll just need to create a separate settings file for each
domain, and just point each VirtualHost in your Apache configuration
at the appropriate settings file.
Ther
a more elegant
solution.
Cheers,
Simon Willison
On 16 Nov 2005, at 05:53, Adrian Holovaty wrote:
This is fully backwards-compatible. If you want to keep your views in
a "views" directory, that's perfectly all right. The thinking is that
the common case will only need a single file called views.py.
Nice change. The less directory hierarchy
On 16 Nov 2005, at 23:10, Jacob Kaplan-Moss wrote:
However... the concept is. Developers shouldn't be blocking GWA;
we should be programming web apps that conform to expected HTTP
behavior. GWA *only* issues GET requests, and if an app modifies
data based on a GET, then the app should b
On 18 Nov 2005, at 09:12, David Ascher wrote:
Specifically, I'd love feedback on the views ( http://
da.textdriven.com:8027/sydney/file/trunk/wiki/apps/pages/views.py)
and the template ( http://da.textdriven.com:8027/sydney/file/trunk/
wiki/templates/pages/page.html
You should do this in
On 18 Nov 2005, at 11:59, hugo wrote:
(I think this static view should be listed more prominently in the
documentation and tutorial, even though it's not meant to be used for
production use - the how-to-serve-static-files question is quite
common
with newbies, and all of them want to write
On 18 Nov 2005, at 15:26, Robert Wittams wrote:
Hm, maybe when DEBUG is on, CommonMiddleware should put up an
interstitial page to tell the developer what is happening? It does
seem
to bite a lot of people.
Alternatively, we could just have CommonMiddleware throw a deliberate
server err
On 22 Nov 2005, at 17:43, Luciano Rodrigues da Silva wrote:
I think that is time for the admin have some statistics usage of the
applications. Or maybe another app include with the package.
Stats is a very obvious application for Middleware. I bet you could
do something very, very cool alo
On 23 Nov 2005, at 14:59, Afternoon wrote:
Is there a way that the request object could be exposed to custom
tag code, but not the template itself?
The aim with the template system has always been to keep it de-
coupled from the request/response stuff, so it can be used as a
standalone c
On 25 Nov 2005, at 23:04, James Bennett wrote:
Suggestions and corrections are welcome.
Thanks a lot James - that's some really well written documentation:
clear, succinct and informative.
Just one tiny suggestion (I don't use TextDrive so I can't comment on
much). You suggest download
On 21 Dec 2005, at 01:37, Silas Snider wrote:
Do they just quote the string? Or do they use a 'bind variable'
type idea?
Example:
If an attacker typed
' or 'a'='a
into a password input field for instance, would the ORM properly
prevent the attempted attack from working
On 29 Dec 2005, at 20:29, Jacob Kaplan-Moss wrote:
I've always though that this particular -- and common -- use case
should be delegated to the DB level using one of the many excellent
replication/distribution tools for your database. For example, you
could easily do read distribution wi
On 29 Dec 2005, at 11:35, Scott johnson wrote:
Now I haven't hacked Django much myself yet (I've been working on
the back end tools, db loader and overall schema). What support
does Django have for multiple db stuff?
I've started a ticket to track discussions on this issue:
http://code.
On 31 Dec 2005, at 18:39, Michael Hipp wrote:
I'm hoping to convince my current hosting provider (zipa.com) to
support Django. (Switching providers would be a pain right now.)
What would I tell them I need?
apache
mod_python
psycopg
postgresql (or mysql) (1 database?)
One approach might
On 4 Jan 2006, at 19:42, The Boss wrote:
Nevermind. It magically started working when I tried to show someone
how it didn't work.
It probably just needed a server restart. Django's development server
code reloading stuff work's for most cases, but if you're seeing odd
behaviour it's oft
On 5 Jan 2006, at 11:40, ChaosKCW wrote:
I of course want something better and django stands out. Its mostly
for
interactive apps, as opposed to static content, so my first questions
is can I do things like javascript and xmlhttprequest (ie AJAX ) in
django easily ? I am sure I can but thoug
On 5 Jan 2006, at 15:17, stinger wrote:
You said in the download page "If at all possible, please use
BitTorrent! Our servers thank you..."
It would be useful if there were torrents for just Adrian's talk,
just the Q&A etc.
Cheers,
Simon
On 5 Jan 2006, at 17:48, mortenbagai wrote:
Is there a way to model data from multiple, separate data
sources in the same Django project?
Not at the moment, but it's under active discussion:
http://code.djangoproject.com/ticket/1142
Please add a brief description of your requirement to that
On 6 Jan 2006, at 16:23, Wilson wrote:
It would be useful if there were a gag reel with clips of Simon making
vomiting gestures at Adrian from across the room. :)
Blast - I thought the cameras missed that :)
On 12 Jan 2006, at 05:43, Eric Walstad wrote:
The following approach ('shallow' copy) has worked well for me:
import copy
b = copy.copy(a)
b.id = None
b.save()
Maybe it would be useful for all Django model objects to gain
themselves a duplicate() method which does exactly this - returns an
On 17 Jan 2006, at 12:15, Russell Keith-Magee wrote:
Ok; in the absence of any objections, I've just committed the change,
and closed off the ticket. Bulk delete is now available in
magic-removal.
What happens if you call Something.objects.delete() without any
arguments? Does it delete eve
On 15 Jan 2006, at 23:22, tonemcd wrote:
If your articles have HTML in them, you'll need to be careful that no
'dangerous' HTML is included (javascript is the most common). A good
library is stripogram -
http://www.zope.org/Members/chrisw/StripOGram/readme
Stripogram is inadequate for protect
On 15 Jan 2006, at 23:22, tonemcd wrote:
If your articles have HTML in them, you'll need to be careful that no
'dangerous' HTML is included (javascript is the most common). A good
library is stripogram -
http://www.zope.org/Members/chrisw/StripOGram/readme
While I still strongly advocate not
On 1/19/06, tonemcd <[EMAIL PROTECTED]> wrote:
> Didn't realise stripogram was so open to those sort of exploits (I've
> only ever used it to get rid of the stuff that might mangle layout).
> There's obviously more to this than meets the eye.
Here are some interesting resources on the challenges
On 5 Apr 2006, at 12:26, limodou wrote:
> Why you need do this? Because django can auto judge the language from
> your browser request http head, or context settings, or settings. If
> you like , you can provide a language selection in web page, and
> that's enough. The url doesnot need to be spe
Hi everyone,
My main project at the moment is Lanyrd, the social conference
directory. It's a site that helps you find conferences to attend or
speak at, and that enables you to build a profile of talks you've
given and events you've attended in the past.
There's just one problem: right now we on
83 matches
Mail list logo