):
> raise SuspiciousFileOperation("File name '%s' includes path
elements" % name)
Is this level of strictness necessary?
--Ned.
On 5/4/21 4:54 AM, Carlton Gibson wrote:
Details are available on the Django project weblog:
https://www.djangoproject.com/webl
This plugin won't work with Jinja2 templates, but another coverage.py
plugin could be written for Jinja2, sure. Get in touch if you want to
get started on it.
--Ned.
On 9/20/15 9:45 AM, Avraham Serour wrote:
would this work with jinja2 templates also?
On Tue, Aug 25, 2015 at 3:45 AM
ement of templates:
https://pypi.python.org/pypi/django_coverage_plugin
Install it, run your tests under coverage.py, and you'll see what lines in
your templates are used by your tests, and which lines are not.
If you have any trouble with it, let me know,
--Ned.
--
You received th
ommitters gratefully accepted.
Ned Horvath
Python Production Environment lead
UT Austin
--
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+unsubsc
et it into
Django 1.3.1, but I'm encountering resistance to that idea. If you have any
sway over Django core committers, use your power for good now! :)
--Ned.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this gr
do on
the site. If later they sign up and provide you with their identity,
you simply record that on the User record, and nothing else has to be
affected.
--Ned.
http://nedbatchelder.com
--~--~-~--~~~---~--~~
You received this message because you are subscribed
just for this purpose:
$ python -m compileall .
will search the tree rooted in the current directory for .py files newer
than their .pyc files, and compile them.
--Ned.
http://nedbatchelder.com
Christophe Pettus wrote:
> This is more a deployment question, but: Is there a way of specifyi
mysite
--Ned.
http://nedbatchelder.com
grimmus wrote:
> Hi,
>
> I am trying to run the following in dos
>
> django-admin.py startproject mysite
>
> When it press enter, the django-admin.py file opens in notepad and the
> script isnt executed ??
>
> Any ideas why this is
t; On Sun, May 17, 2009 at 5:20 PM, Ned wrote:
>
> > I would greatly appreciate any explanations or suggested
> > courses of action to get to the bottom of the problem described below.
> > If more information would be helpful I'd be glad to supply it. I'm
> >
I would greatly appreciate any explanations or suggested
courses of action to get to the bottom of the problem described below.
If more information would be helpful I'd be glad to supply it. I'm
using Django 1.0.
I have a search application, in prototype stage, that makes use of
regular expressio
superuser password) and then log the user in. More details here:
http://stackoverflow.com/questions/263367/how-do-you-support-a-web-app-with-hashed-or-encrypted-passwords
--Ned.
http://nedbatchelder.com
Miguel wrote:
> Hello,
>
> is there any way to decode the passwords that django keeps t
This is a Python question. Python doesn't have "arrays", you are using
lists. Lists are indexed only by integers. What you want is a
dictionary, which can be indexed by any value. Change your first line to:
people = {}
and you should be all set.
--Ned.
http://nedbatc
h
results to continue working in the future also?
--Ned.
http://nedbatchelder.com
Andrew Ingram wrote:
> Hi All,
>
> I'm trying to to build a model which can store a link to any page on
> the site. Ordinarily I'd just use a URLField, but I want to future-
> proof it. Inst
Inside a function, the function is known by its own name. Just as you
can call a function recursively by name, you can access its properties
by name:
def myview(request):
""" My docstring """
help = myview.__doc__
--Ned.
motard wrote:
>
You could try using a tag to explicitly state what the
base for relative URLs should be.
--Ned.
http://nedbatchelder.com
JoeG wrote:
> I've tried to find this on Google but I don't know the terminology so
> I don't know what to search for. It's more of an html qu
You aren't showing enough of your code, but there's no module named
PIL. When you install PIL, you get a module named Image.
--Ned.
Edgard Matos wrote:
> Hi!
>
> I'm trying to do a form to upload a image using Google App Engine +
> Django.
> In my view,
Pygooglechart is a good interface to the Google charting API:
http://pygooglechart.slowchop.com/
--Ned.
http://nedbatchelder.com
Chris Haynes wrote:
> I need to generate some line charts and bar graphs from django. I
> recall seeing a very promissing package a couple months ago and
e explain the connection
reset, then we could all get beyond the mud-slinging.
--Ned.
http://nedbatchelder.com
Almad wrote:
> On 28 Led, 06:01, Malcolm Tredinnick wrote:
>
>> On Tue, 2009-01-27 at 06:21 -0800, Almad wrote:
>>
>>> On Jan 26, 1:19 am, Russell
m to solve here? Relational databases
really are quite good at what they do, it's unusual cases where you have
to help them with partitioning and the like.
--Ned.
Alessandro Ronchi wrote:
> One simple solution for my problem is table partitioning. Both MySQL
> and PosgreSQL can hand
st of Django has been built to do a good job with this model.
Trying to create new tables as you propose is going against the grain at
every level.
--Ned.
http://nedbatchelder.com
Alessandro Ronchi wrote:
> I need to start a project with thousand of tuples every day for N
> solar plants.
se
If you change "if delete" to "elif delete", it will work the way you
want. You code is first checking for edit, then checking for delete,
and the else only applies to the "if delete". In the edit case, "if
delete" is false, so of cou
Your URL regex is wrong, it should be:
(r'^hello/(?P\S+)/$', 'swamiji.poll.views.hello')
--Ned.
http://nedbatchelder.com
mahesh_aka_amol wrote:
> Parameter not getting passed to view function
>
> upon accessing http://localhost:8000/hello/TEST it merely p
getattr is definitely preferable to self.__class__.__dict__
--Ned.
http://nedbatchelder.com
Henry Andrews wrote:
> I've aways been under the impression that direct use of __dict__ was
> discouraged. Something along the lines of __dict__ being an
> implementation detail while getat
Are you using MySQL? It's been implicated in these sorts of issues
before: http://nedbatchelder.com/blog/200809/a_server_memory_leak.html
--Ned.
http://nedbatchelder.com
7timesTom wrote:
> Some time ago Webfaction notified me "Memory usage over your
> limit" (80MB) It
And BTW, my bad. Change the except: line to except ImportError, then
the syntax error from the dash will be apparent in your 500 page.
--Ned.
http://nedbatchelder.com
Ned Batchelder wrote:
> settings-custom isn't a valid Python file name, because a Python
> identifier can't h
settings-custom isn't a valid Python file name, because a Python
identifier can't have a dash in it. Use an underscore.
--Ned.
http://nedbatchelder.com
Dana wrote:
> Ned/Felix,
>
> Ok, I tried your guys solution but it does not seem to be working for
> me, so Im wo
In settings.py:
try:
from settings_local import *
except:
pass
--Ned.
http://nedbatchelder.com
Dana wrote:
> Hello everyone,
>
> I know a form of this question has been asked before on this group but
> I can't for the life of me find the thread.
>
h build your context...
return render_special(context)
--Ned.
http://nedbatchelder.com
Dennis Schmidt wrote:
> Hi there,
>
> I need to get every variable that will be printed out in my templates
> to be passed through a special function.
> Since I need this function globally and my
hem. Your other option is to change where sys.stdout points, but that
will change it for the entire process, which may not be what you want.
--Ned.
http://nedbatchelder.com
Bob Cowdery wrote:
> I didn't say I was using it in production. This is development and I
> would prefer not to
roduction
code, but when you're digging in the database forensically, it can be
useful.
OTOH, pickling will be more compact, and safer, depending on how you
reconstitute it...
--Ned.
http://nedbatchelder.com
Eric Abrahamsen wrote:
> On Oct 18, 2008, at 4:38 AM, timc3 wrote:
>
>
field, he could add
"[os.system('rm -rf /etc')]" to it, and a full eval would cause havoc,
for example.
--Ned.
http://nedbatchelder.com
timc3 wrote:
> Thanks for the help. Yeah, my terminology is quite often wrong, to
> much context switching with other things.
>
&g
If you have DEBUG = True, then the SQL for the queries against the
database are collected for debugging purposes. That can consume a lot
of memory (especially for 800k+ records). Could that be the problem?
--Ned.
http://nedbatchelder.com
bcrem wrote:
> Hi all,
>
> I've got
that isn't being served directly to a browser.
--Ned.
http://nedbatchelder.com
emy_66 wrote:
> Hello,
>
> I'm new to web development and I am not sure how to code for this:
>
> Displaying an html page straight away after the user hits submit
> (telling the user that th
Your view functions are simply Python functions. However you want to
use Python to compute an HTML response is fine. Most people choose to
use the template engine for that, but you can do whatever you like:
def hello_world(request):
return HttpResponse("Hello, world")
-
This isn't true: forward slashes are not meaningful in Python regular
expressions, and so do not need to be escaped. Even if you choose to
(it doesn't hurt), you'd escape them with backslashes, not forward slashes.
--Ned.
http://nedbatchelder.com
James Matthews wrote:
> It&
ery
for work at all: chances are really good that the work itself will be
far larger than the effort to find the work.
And no, I don't have any concrete examples...
--Ned.
David wrote:
> Thanks Ned, and what about the case when it may be an unreasonable
> interval?
> is there any oth
the work is in your Python code.
--Ned.
http://nedbatchelder.com
David wrote:
> Hey'a I have a newbie question.
>
> I want to execute an external (lets say python, but can be any)
> program given a interval set by a user (which would be in the user
> table). The external pr
eing
generated. If they all have the same schema, then "dynamically
generated tables" means you are going against the grain of a relational
database. You will likely be much happier adding one more column to
your table and using one statically defined table to hold all
"credits" or "license" for more information.
>>> import MySQLdb
>>> MySQLdb.version_info
(1, 2, 1, 'gamma', 3)
>>>
--Ned.
http://nedbatchelder.com
Malcolm Tredinnick wrote:
> On Fri, 2008-07-18 at 01:37 +0530, Ramdas S wrote:
>
People here are right: remove the "not". You want to keep adding blanks
until the total length is zero mod 4. Then, at line 19 in the dpaste,
change the loop to: for blank in range(amountofblanks). You shouldn't
be subtracting one from the value there.
--Ned.
http://ne
ic, so you may not need
it at all.
--Ned.
http://nedbatchelder.com
Fernando Rodríguez wrote:
> Hi,
>
> I'm using this simple template with flatpages:
>
>
>
> {{ flatpage.title|escape }}
>
>
>
> {{flatpage.title|esc
omfortable editing
Markdown, then use that. The user experience concerns are far more
important, and will dictate the data storage.
--Ned.
http://nedbatchelder.com
Matic Žgur wrote:
> Hi,
>
> I'm working on some project, a part of which is a small blog app. All
> the blog pos
omfortable editing
Markdown, then use that. The user experience concerns are far more
important, and will dictate the data storage.
--Ned.
Matic Žgur wrote:
> Hi,
>
> I'm working on some project, a part of which is a small blog app. All
> the blog posts are saved as HTML (usi
This is a bit more complicated than you need. This will work:
def sort_by_attr_inplace(seq, attr):
import operator
seq.sort(key=operator.attrgetter(attr))
--Ned.
http://nedbatchelder.com
joshuajonah wrote:
> Resolved.
>
> Answer for those interested:
>
&
gument to the include tag doesn't need to be a literal string, it
can be a value from the context. This has the added advantage that the
common "{% include " in each of your button choices is factored out and
appears only once, in blah.html.
--Ned.
http://nedbatchelder.com
Ben Kovi
a single backslash
here either:
>>> r'\\'
''
>>> r'\'
File "", line 1
r'\'
^
SyntaxError: EOL while scanning single-quoted string
>>>
--Ned.
Leeland (The Code Janitor) wrote:
> I would use a raw strin
Creating a table per user is definitely going against the grain in a
relational database world. You'll be much happier with one table to
store the data across users, with a foreign key to the users table to
keep everything straight.
--Ned.
http://nedbatchelder.com
MickaelC wrote:
> I
If you wanted to keep the alphabet issue out of the view, you could also
do this:
{% for letter in "ABCDEFGHIJKLMNOPQRSTUVWXYZ" %}
--Ned.
http://nedbatchelder.com
M.Ganesh wrote:
> Joel Bernstein wrote:
>
>> For an easy (but locale-dependent) way to get a list of the u
I think this will work:
{% filter truncatewords:10 %}
{% i18n_attr auction 'description' LANGUAGE_CODE %}
{% endfilter %}
--Ned.
http://nedbatchelder.com
pihentagy wrote:
> Hi all!
>
> I have an inclusion tag:
> {% i18n_attr auction 'description' L
f the
loop is a new transaction, limiting the damage when an update fails,
2) clean your data before entering the loop so there won't be a
uniqueness violation,
3) write a Python check against the uniqueness so that you won't attempt
an update that would fail.
--Ned.
Greg wrote:
>
ld be able to at least keep it all within your chrome.
--Ned.
http://nedbatchelder.com
Jeff Anderson wrote:
> visitorQ wrote:
>
>> i'm familiar with the google search feature that allows you to search
>> the contents of a particular site by adding "site: www.targets
You are talking about security through obscurity, which is no security
at all.
--Ned.
ydjango wrote:
> Thanks, I will use Slug, which will be unique and alphanumeric but
> will not be sequential.
>
> I agree best protection is proper authorization, and that I check on
> ea
have suggested.
--Ned.
http://nedbatchelder.com/blog
ydjango wrote:
> I am displaying a list of houses and on clicking on one of the houses
> I want to show/edit details
>
> currently I am using constructing url as /house/edit/123/
> where 123 is house data base primary key for that hou
I'm surprised to see this suggestion of storing a SQLite db in version
control. Don't you quickly run into problems where two developers each
write new data to the database, and then cannot merge their changes? Or
do you have a read-only database?
--Ned.
http://nedbatchelder.com/b
They are not meant to be the same. Windows' PATH is the list of
directories Windows will search for executables when running a command
from the command line. Python's sys.path is the list of directories
Python will search for modules to import.
--Ned.
http://nedbatchelder.com/
pet, and the last in the last.
--Ned.
http://nedbatchelder.com/blog
shabda wrote:
> Yes I was looking for snippets and recipes, not storing them in DB.
> There are some instances when storing things in DB is just too
> convinient comaring to storing them on files. For example I get so
en
text would be in different faces, but there you are.
--Ned
http://nedbatchelder.com/blog
Alvaro Mouriño wrote:
> On Tue, Mar 25, 2008 at 10:02 PM, Justin Lilly <[EMAIL PROTECTED]> wrote:
>
>> whatthefont.com couldn't find a good match.
>>
>>
> I didn
return some_html_content
It's one more line than you are looking for, but is simple, and everyone
will understand it, and you don't have to find something complicated: it
works.
--Ned.
http://nedbatchelder.com/blog
Julien wrote:
> In fact, what I want is to hijack a view:
>
o template).
Maybe if you told us a bit more about the problem, we could help you
find a solution.
--Ned.
http://nedbatchelder.com/blog
Julien wrote:
> Hi all,
>
> This is more a Python issue than a Django one, but I thought the
> Python-aware people that you are might be able to help
d.
As Malcolm points out, seek() would require buffering, which you can
provide by using an intermediary like StringIO.
--Ned.
http://nedbatchelder.com/blog
Malcolm Tredinnick wrote:
> On Thu, 2008-02-21 at 03:41 -0800, kip wrote:
>
>> I thought I would be able to use an HttpRespon
information are you trying to get from the domain?
--Ned.
http://nedbatchelder.com/blog
Dave Fowler wrote:
> This doesn't have a lot to do with django, but python and web
> programming.
>
> I'm having an issue parsing the sub domain from a lot of non-US urls.
> In the US the
://nedbatchelder.com/blog/200710/httphttps_transitions_and_relative_urls.html
--Ned.
[EMAIL PROTECTED] wrote:
> Does anyone have suggestions on how to make request.is_secure() work
> from behind a reverse proxy? I have nginx proxying to apache but since
> nginx (and not apache) is handling SSL the HTTPS en
t. That would
have shown that the image URL was in fact returning HTML.
One more thing: Use firebug if you can. It's a great developer tool,
and could show you the result of the img retrieval.
--Ned.
http://nedbatchelder.com/blog
Marty Alchin wrote:
> On 2/9/08, Brandon Taylor <[EMA
er for n.
The nth tag doesn't exist yet, but does it look like what you are asking
for?
--Ned.
http://nedbatchelder.com/blog
toomim wrote:
> On Feb 6, 11:05 pm, toomim <[EMAIL PROTECTED]> wrote:
>
>> I don't understand, how do I get {{sep}} to change from ',&
proper CSS attributes, you get the idea.)
--Ned.
http://nedbatchelder.com/blog
Michael Hipp wrote:
> David Reynolds wrote:
>
>> On 3 Feb 2008, at 3:32 pm, Michael Hipp wrote:
>>
>>
>>> Malcolm Tredinnick wrote:
>>>
>&g
like the
blog_extras.py imports do.
--Ned.
[EMAIL PROTECTED] wrote:
> Hi Ned,
>
> I figured as much, but since without the 'try' made no difference, I
> thought I'd give it a whirl here is the source.
> 'lukenslanguages' is the project directory.
>
When Kenneth suggested "try: @register.filter", he meant, try:
"@register.filter", that is, the word "try:" was not meant to go in the
file.
You may have an import problem in your models file. Can you post more
of the source so that we can take a look?
--Ned.
I'm not sure there's a way to do this purely in the template language.
You can munge the data in the view instead. This line creates a new
filtered_data list that has only the data you want to display:
filtered_data = [ dict([ (k,d[k]) for k in fields ]) for d in data ]
-
with three arguments, and looks like it is called
with only two, but there are actually three: foo, 1, and 2.
--Ned.
http://nedbatchelder.com/blog
road wrote:
> This may be more of a python question rather than django, but I
> figured it could be answered here.
>
> I'm getting a type
We just ran into this problem also. It's reported in ticket 6027:
http://code.djangoproject.com/ticket/6027
GzipMiddleware and responses with files for content (rather than
strings) don't get along...
--Ned.
[EMAIL PROTECTED] wrote:
> I've been tearing my hair out for a l
I don't know if the URL you show is literally what you hit or not. If it
is, then it doesn't match because "param1" doesn't match "\d+" which
means one or more digits. Same for param2.
--Ned.
almostvindiesel wrote:
> Hi all,
>
> I'm new to re
. Only when you have a fix that
needs to leapfrog ahead of the feature work do you need to merge anything.
--Ned.
http://nedbatchelder.com
Kenneth Gonsalves wrote:
> On 18-Jan-08, at 9:54 PM, William Siegrist wrote:
>
>
>> If the spelling changes are in 1 file, and the ne
You don't need {{ }} within the {% for .. %} tag. Try simply {% for
tmpDict in assayDict.methods %}
--Ned.
http://nedbatchelder.com/blog
[EMAIL PROTECTED] wrote:
> Hello All,
>
> I'm running into a little trouble using the template system of
> django.
> In python i
I would think we can make a reasonable semantic that using timesince or
timeuntil on a time object means that time, today. Joe, is that what
you expected it to mean? Making this change to the filter would turn
what is now an error condition into something useful.
--Ned.
http
D'oh! Sorry. I hate those kind of replies! (At least I also contributed
answering the asked questions in another post...)
--Ned.
Tim Chase wrote:
>> You could try not serving a different page at all: CSS can
>> apply a different stylesheet when printing than when on the
&g
I also like /articles/slug/print, in that print modifies the
articles/slug url that precedes it. Also, you can prevent robot
spidering other ways than robots.txt. A tag in the served
content can direct the robot as well: see http://www.robotstxt.org/meta.html
--Ned.
http
You could try not serving a different page at all: CSS can apply a
different stylesheet when printing than when on the screen. See
http://www.alistapart.com/stories/goingtoprint/ for an introduction.
--Ned.
http://nedbatchelder.com
Alex Koshelev wrote:
> The second variant with GET query
I may be the only one still interested in this, but the patch got
incorporated yesterday (http://code.djangoproject.com/changeset/6981),
so Malcolm, your original idea will now work.
--Ned.
Ned Batchelder wrote:
> I tried out this change, and it works well. I've created a ticket
I tried out this change, and it works well. I've created a ticket
(http://code.djangoproject.com/ticket/6295) with a patch.
--Ned.
http://nedbatchelder.com
Ned Batchelder wrote:
> Malcolm, thanks for continuing this (I was away for a few days). I
> was thinking about the forloop i
ly works if the
ifchanged tag is evaluated on every iteration of the loop.
--Ned.
Malcolm Tredinnick wrote:
> Hey Ned,
>
> On Sat, 2007-12-29 at 08:27 +1100, Malcolm Tredinnick wrote:
> [...]
>
>> def render(self, context):
>>if co
#x27;s the
first time in the if clause:
{% for thing in mylist %}
{% if thing.test %}
{% iffirst %}Things: {% else %}, {% endiffirst %}
{{thing}}
{% endif %}
{% endfor %}
--Ned.
Malcolm Tredinnick wrote:
> On Fri, 2007-12-28 at 15:36 -0500, Ned Batc
ve to loop over the posts in the view, and annotate
each with a filtered list of tags. I'm already looping in the template,
and don't need to loop in the view at all except to perform this filtering.
To me, this is kind of ugly. Do-able, but unfortunate.
--Ned.
Todd O'Bryan wr
Just a matter of taste. I suppose filtering in the view would be the
simplest way to achieve what I'm looking for.
For my own edification: is there a way to write an iffirst tag? I often
wish for it.
--Ned.
Todd O'Bryan wrote:
> On Dec 28, 2007 2:46 PM, Ned Batchelder <
will be messed up even if I do have this tag: the
comma will have space before it).
So, two questions: 1) How would I create a tag like this, and 2) is
there some simpler way to achieve my purpose?
--Ned.
--
Ned Batchelder, http://nedbatchelder.com
--~--~-~--~~~-
ides some guarantee about
the equivalency of pickles, but I don't think so.
--Ned.
http://nedbatchelder.com/blog
[EMAIL PROTECTED] wrote:
> I fixed this -- not Django's fault at all. For the full field code, go
> to http://www.djangosnippets.org/snippets/513/
>
> On Dec 13, 8:
for s in s2:
s.price *= .9
--Ned.
Greg wrote:
> Hello,
> I have the following list:
>
> [, )>, Small'>, )>, , )>,
> , )>, ,
> )>]
>
> In my view I want to be able to modify the Price of each element. I
> want to times the price of each
class and do whatever you want with it.
For example, you can write a view function that pulls data from wherever
you want (an RSS feed, a file on disk, a random number generator), then
formats it as HTML and returns it to the browser. There's no need for a
database to be involved.
--Ned.
n't
doing. Perhaps if you included some more context of your problem...
--Ned.
http://nedbatchelder.com/blog
Nianbig wrote:
>
> On Dec 9, 12:57 am, "Karen Tracey" <[EMAIL PROTECTED]> wrote:
>
>> On Dec 8, 2007 5:58 PM, Nianbig <[EMAIL PROTECTED]>
I have been hoping, but not managing, to find the time to create a
Django implementation of my anti-spam technique: Stopping Spambots with
hashes and honeypots (http://nedbatchelder.com/text/stopbots.html). It
works very effectively without any extra work on the part of real humans.
--Ned
help here: the client library always thinks
of the servers as a pool. If you only have one server, you'll still be
running all the same code, and if for some reason that server becomes
unreachable, you'll likely have the same error in the client library,
plus you won't have any cach
for d in data %}
{% if d.firstcol %}{% endif %}
{{d}}
{% if d.lastcol %}{% endif %}
{% endfor %}
{% for blank in data_blanks %} {% endfor %}
{% if data_blanks %}{% endif %}
--Ned.
http://nedbatchelder.com
andrej kesely wrote:
>
You're quite welcome.
One other thing I forgot to mention: nosetest.py has a --with-coverage
option, and Django support. I've used it to coverage test my Django code.
--Ned.
Marcin Kaszynski wrote:
>
> On Nov 25, 3:58 am, "Russell Keith-Magee" <[EMAIL PROTECTED]&
Please use coverage.py, I would be honored to have it included in Django
core. If it's better as an add-on of some sort, that's great too. Let
a thousand flowers bloom!
--Ned.
Todd O'Bryan wrote:
> On Nov 24, 2007 9:58 PM, Russell Keith-Magee <[EMAIL PROTECTED]>
st proposal: at the top of the generated settings file,
include this comment along these lines:
# This file contains settings which should be kept secret.
# For ideas on how to manage complex settings files,
# see: http://code.djangoproject.com/wiki/SplitSettings
--Ned.
Malcolm Tredinnick wrote:
url
raise Http404
@login_required
def foo(request, cid):
c = get_allowed_c(request, cid)
# Do whatever you want with c...
This means that each view function has a single line in common with the
others, just as it used to before your access checking.
--Ned.
Tim Chase wrote
You can probably skip the StringIO. HttpResponses support a file-like
interface, so you can write directly to them. Try passing the
HttpResponse directly to the SimpleDocTemplate constructor instead.
--Ned.
http://nedbatchelder.com/blog
abrightwell wrote:
> Nevermind, the main proble
On Aug 12, 4:35 am, "Russell Keith-Magee" <[EMAIL PROTECTED]>
wrote:
> This is one approach - another would be an abstract base class.
Great.
> The simplest approach would be to write a simple test app, use the
> normal Django test framework on that app, and then not install/include
> that test
I'm new to Django and fairly new to Python. I'm developing an add-in
for using for using models as nested set trees*
At the moment it's a mixin class which provides methods such as
parent(), descendants(), depth() etc. for examining the tree, and
move_to() for relocating a node within the tree.
hexdump utility can be
helpful here to see what is really in the files. Even "simple text
editors" interpret byte sequences for you to display text, and can hide
information that might be important in this case.
--Ned.
brutimus wrote:
> I've been having this problem w
For a quick answer:
(?Pxxx)
means: "match xxx, and store it as a value named blah in the result".
This lets the regex machinery build a set of name/value pairs suitable
for use as arguments to a view function.
--Ned.
james_027 wrote:
> hi kenneth,
>
> thanks a lot, i thin
1 - 100 of 162 matches
Mail list logo