On Dec 1, 2008, at 7:51 PM, Vicky wrote:
>
> Can we use XML files as templates instead of HTML?
Anything that comes as a plain text file can be produced by a
template: HTML, XML, plain text, email, iCAL, source code...
Yours,
Eric
>
> >
--~--~-~--~~~---~--~---
On Nov 30, 2008, at 10:36 PM, Alex Jonsson wrote:
>
> Hey guys,
>
> I have an application where I want my users to be able to upload a
> picture. The model contains a name field and a ImageField.
>
> My question is how the easiest way would be to modify this image
> before saving it? That is, cr
On Nov 6, 2008, at 6:11 AM, Delta20 wrote:
>
> I just realized that I accidentally named the template 400.html not
> 404.html... d'oh. I definitely need a better way of diagnosing 500
> errors.
>
> Thanks to the pointer to the email settings. I will set that up, but
> I'm wondering if there's a
On Nov 4, 2008, at 8:14 AM, Robocop wrote:
>
> I'm working with some rather long forms, and i've processed them in a
> pretty basic way. I read in the post data for every field, then just
> create a new table entry using the form data.
>
> Something like:
> if request.method == 'POST':
> if fo
On Oct 30, 2008, at 7:04 PM, [EMAIL PROTECTED] wrote:
>
> Hi,
> i hope any one can help me.
> I want to generate a rss-feed.
> The url ist http://localhost:8000/isf/info/.
> All works fine but the title of an Item and the Description are still
> the same!
> How can i change the title of an feed
On Oct 29, 2008, at 6:01 PM, sam wrote:
>
> hello,
>
> I try to redirect a user who comments a post on my blog to the same
> page,
> to do that, i need to use the signal : 'comment_was_posted'
>
> i have put the code below in my blog 'models.py' to be sure it has
> been loaded,
> but when i post
On Oct 24, 2008, at 12:23 PM, Brandon Taylor wrote:
>
> Hi everyone,
>
> I'm using Django 1.0, and attempting to do some comment moderation
> with Akismet. When I try to wire up a pre_save signal, I'm getting an
> error saying 'instance' is not defined. Here is my code:
You might also consider
On Oct 21, 2008, at 5:38 AM, timc3 wrote:
>
> So I have a model that looks like this:
>
> class GroupsOfUser(models.Model):
>name = models.CharField(_("Name"), max_length=50)
>description = models.TextField(_("Description"), blank=True,
> help_text=_("Optional"))
>slug = models.SlugF
a pickle, so some searching should be
possible, shouldn't it?
E
>
>
> 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 A
On Oct 18, 2008, at 3:42 AM, KillaBee wrote:
>
> I keep getting this error that says ViewDoesNotExist: Could not
> import intranet.timesheets.views. Error was: No module named User. No
> i do not have a User module, I don't want nor need one. How do I find
> out Where it is being call at? I
On Oct 18, 2008, at 4:38 AM, timc3 wrote:
>
> Thanks for the help. Yeah, my terminology is quite often wrong, to
> much context switching with other things.
>
> Unfortunately I am never sure what will go in to that field, just data
> that's sourced from various types of media, and populated from
On Oct 10, 2008, at 5:14 PM, GAEFans wrote:
>
> OS: windows XP
> SDK: Google App Engine 1.1.3 (Django / 0.96.1)
>
> template snippets:
> ...
>
>
>
>
You've got "value" misspelled for these two fields, correct that and
try again...
E
>
>
>
> E-mail:
>
> readonly=
mization yet. Once ticket 8630 [1] is resolved,
> the proper way to do this will be to create your own app with a
> get_form() function in __init__.py, and then set COMMENTS_APP to point
> to your app.
Thanks for the head's up, Carl, I'll keep an eye on the ticket.
E
>
&g
On Oct 7, 2008, at 11:38 PM, fitzage wrote:
>
> I want to add one additional piece of data to the comment form.
> Basically a checkbox that says whether or not the commenter wants to
> be notified of followup comments.
I just did exactly this, and found that what works best is not just to
add
On Sep 23, 11:07 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> Somewhat pursuant to this
> thread:http://groups.google.com/group/django-users/browse_thread/thread/a0c4...
>
> a hidden 'next' field in the comment post form doesn't get carried
> over t
Somewhat pursuant to this thread:
http://groups.google.com/group/django-users/browse_thread/thread/a0c468f0c81bb197#
a hidden 'next' field in the comment post form doesn't get carried
over to the comment preview view. It seems like if you're going to
have a manual 'next' value possible in the
On Sep 17, 2008, at 11:45 PM, Mathieu Leplatre wrote:
>
> Hi all,
>
> I am starting a new thread, the first one became off-topic (http://
> groups.google.com/group/django-users/browse_thread/thread/
> 34b501d2d1f88496/f8a5d5ef5aeab62a)
>
> I want to do a simple external script that just relies o
On Sep 13, 2008, at 12:46 PM, Thejaswi Puthraya wrote:
>
> On Sep 12, 7:09 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>> Has anyone tried using akismet with the new comments contrib app?
>> I've
>> set up a signal handler to run on 'comment_will_
On Sep 13, 2008, at 8:32 AM, Shantp wrote:
>
> Hi,
>
> I did a lot of searching on this and can't figure out what I'm doing
> wrong. Here's what's in my urls.py:
>
> share_detail = {
> 'queryset': Share.objects.all(),
> }
>
> (r'^comments/', include('django.contrib.comments.urls')),
> (r'^
Has anyone tried using akismet with the new comments contrib app? I've
set up a signal handler to run on 'comment_will_be_posted' and check
the comment with akismet, and the service is insisting my test
comments are spam no matter what. I'm using the voidspace python
akismet API, and large
On Sep 12, 2008, at 6:05 AM, Malcolm Tredinnick wrote:
>
>
> On Thu, 2008-09-11 at 17:27 -0400, Steve Holden wrote:
> [...]
>> I've got some timings lying around somewhere that clearly show the
>> decorate/sort/undecorate implementation is way faster under normal
>> circumstances.
>
> True. That
I'm fooling around with comparing instances of different models,
trying to make a unified stream of instances that can be sorted by
date according to a certain datetime attribute on each model. I
thought I'd define a __cmp__ method on each model in question, that
would provide the appropri
On Sep 7, 2008, at 6:40 PM, Bojan Mihelac wrote:
>
> I have try similiar code under both Django dev server and Apache/
> mod_python. Apache did load the result, while Django server did not.
>
> Is this maybe threading issue?
Nope, that's the way the Django development server works – it's single
you posted is really the one you
want to use, and I might be able to help with the next step...
Yours,
Eric
> I tried to figure these things out on my own, but I just couldn't wrap
> my head around it.
>
> On Aug 26, 2:32 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
&g
ll solve these
kinds of problems) so will say no more...
E
>
>
> On Aug 26, 2:10 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>> On Aug 25, 2008, at 3:11 PM,MrJogowrote:
>>
>>
>>
>>
>>
>>> How do I create a custom manager for many-to
On Aug 25, 2008, at 3:11 PM, MrJogo wrote:
>
> How do I create a custom manager for many-to-many traversal? An
> example will illustrate what I want to do better. Suppose I have the
> following models.py:
>
> class Book(models.Model):
> title = models.CharField(max_length=100)
>
> class Author(
Hey Eric,
I've done this with two different models, the main trick was in the
Feed class's items() method. What I'm doing is a little ugly: calling
list() on the two querysets, appending one list to the other, then
sorting the result using a function that determines which date
attribute t
You could try the debug middleware:
http://www.djangosnippets.org/snippets/766/
or the page stats middleware:
http://code.djangoproject.com/wiki/PageStatsMiddleware
and this article by Simon Willison is a good general resource:
http://simonwillison.net/2008/May/22/debugging/
Yours,
Eric
On J
> I've tried alternating between using admin.autodiscover() in my
> urls.py, and manually registering my models using
> admin.site.register(Person), but I still get the permission error in
> the admin site. I've also tried flushing the database, but that
> doesn't seem to solve anything. FWIW, my
Beers all around!
On Jul 19, 2008, at 8:01 AM, Brian Rosner wrote:
>
> I have just recently merged the newforms-admin branch into trunk as of
> r7967 [1]. This is an extremely backward incompatible change. The
> entire admin application in contrib has been refactored. The newforms
> module has a
> As documented in the backwards-incompatibility notes from the
> queryset-refactor merge, OneToOneFields in (existing) admin are not
> supported. They didn't work before the qsrf merge reliably, either, so
> no functionality was lost in the process.
Sweet, I'm switching to nf-ad. Thanks a lot.
> Saving how, exactly? If admin, newforms-admin or old admin? If old
> admin, have you tried it on newforms-admin -- bugs in old admin are
> unlikely to get any attention at this point. If saving in your own
> code, more details of that code would help.
>
This is saving through the old a
I've got an issue with multiple one-to-one relationships, which
probably arises from poor design decisions on my part. Given a model
like the following:
class Translator(models.Model):
user = models.OneToOneField(User, unique=True, blank=True,
null=True, help_text="If this translator i
If you wanted to do this purely within django, you could write a
custom middleware that reads a 'request body max size' setting from
settings.py, then checks the content-length header on incoming request
against that setting and returns a custom 413 if it's too large. I
believe that doing
On Jul 15, 2008, at 9:55 PM, Nazmi ZORLU wrote:
> Hi,
>
> I wonder if I can access request object in html template or absolute
> page url that currently rendering.
If you're not using generic views, you can pass
"context_instance=RequestContext(request)" as a third argument to
render_to_re
On Jul 15, 2008, at 3:15 PM, Evert wrote:
>
>> I deployed my Django Application onto the localhost using Apache.
>> Below are the changes i did in the httpd.conf
>>
>>
>>ServerName localhost
>>SetHandler python-program
>>PythonHandler django.core.handlers.modpython
>>PythonDebug
>> print p.sku, p.items_in_stock
>> #Returned only the last line
>> BWC300SS 22
>>
>> I don't get it why it didn't return the full excel feed again.
When in doubt, throw more print statement in! Try putting one after
this line:
p = Product.objects.get(sku=update_sku)
To make sure you're actua
It's intensive, but not prohibitively so. I've used a few setups where
large image files were uploaded and, depending on the options, two or
even three different versions of the image are created in the save()
method. The server has yet to explode. Try poking through some of
these snippets
> Mod rewrite will be faster and more efficient. Not to mention, it
> takes some complexity out of your project.
Granted that's true, I wonder if contrib.redirects would be more
effective if it used regexs. Particularly for old-site to new-site
conversions, one-to-one redirects aren't real
Hi Leaf,
The error message you want is the one just below the one you cited in
your email. Namely this:
Exception Value: Error while importing URLconf 'dj_styles.urls': No
module named details.urls.default
If you look in your dj_styles/urls.py, it looks like you've got this
line:
from dj
Hey Dave,
Your homepage, or index view, is nothing more than a (r'^$', 'index',)
entry in your urlconfs, and an 'index' view somewhere in your codebase
(obviously it doesn't have to be called index). While I've got several
apps tied together for any one site, there's usually one app that's
Scratch the locale-dependent idea, of course, but still...
On Jul 6, 1:05 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> Is this something that might belong in the humanize filters package?
> Either something like {{ quantity|currency }}, which takes the
> currency type fro
Is this something that might belong in the humanize filters package?
Either something like {{ quantity|currency }}, which takes the
currency type from locale, if in use, or else explicitly with
{{ quantity|currency:"USD" }}? It's not a great savings over just
doing it from scratch, but tha
You can try google code projects:
http://code.google.com/hosting/search?q=django&btn=Search+Projects
many of the most often-used public apps are hosted there.
There's also http://djangosearch.com, though I haven't used that much...
Happy hunting,
E
On Jun 28, 2008, at 5:58 PM, keegan3d wrote:
You'd almost think they were handing out prizes for being quickest on
the draw :)
On Jun 27, 2008, at 12:18 PM, joshuajonah wrote:
>
> And this is why the Django community rocks, two examples and a full
> explaination with a link in less than 10 minutes, GW guys
>
> On Jun 26, 11:55 pm, bhunt
Hey there,
A M2M field creates an intermediary join table which doesn't show up
in the admin, or other places. It's basically just a pairing of
Journalist ids with Article ids, and the M2M field is a convenience
that allows you to ignore this table. If you want to add additional
informati
Probably what you want is to make a custom template tag that does the
proper query-to-html business, and then stick that tag in your base
template. Might want to look into caching the result, if it doesn't
change often...
http://www.djangoproject.com/documentation/templates_python/#writing-
If you do go the RequestContext route, you can wrap the standard
render_to_response function in a custom render function that adds the
RequestContext automatically, as per here:
http://www.djangosnippets.org/snippets/3/
and then use the custom function in your views, instead of
render_to_r
Aha! So it's you behind the City Weekend website! I always wondered
who did that.
On Jun 24, 2008, at 3:31 PM, Collin wrote:
>
> I've been working w/ Django on a project in China for the last four
> years at www.exoweb.net and www.ringier.ch. I love it. Now, I'm
> responsible for helping launc
It may very well make a difference if you're using python2.4 and you
install packages in a python2.5 site-packages directory! I remember
reading somewhere that that was one of the issues of doing a Leopard
upgrade, versus wiping the drive and doing a full install. I did the
latter, and I d
On Jun 22, 2008, at 11:00 AM, Kenneth McDonald wrote:
>
> Notice the call on "greeting.key()". However, unless I'm missing
> something, there is no way to actually invoke a method from within a
> Django template.
Hi Kenneth,
Leaving the parentheses off after greeting.key will actually result in
Crap, I knew there was something a little off there.
On Jun 16, 2008, at 12:50 AM, James Bennett wrote:
>
> On Sun, Jun 15, 2008 at 11:29 AM, Eric Abrahamsen <[EMAIL PROTECTED]>
> wrote:
>> One of the things django does for you is make 'settings' available
&
One of the things django does for you is make 'settings' available
everywhere. So if you want to use these constants in a template, you
should be able to do this in a view:
site_name = settings.SITE_NAME
and then pass 'site_name' into a template.
Sure hope that's correct...
E
On Jun 16,
The __unicode__ method of Comments/FreeComments includes a truncated
chunk of the comment text, is this what you mean? If you just output
{{ comment }} into the template, you'll get something like "John Doe:
What I think about this blog post is...". If you want the whole
comment, you'll ha
Hi there,
I recently discovered that, when fooling with values in my model's
custom save() method, I need to treat PositiveSmallIntegerField values
as string values, rather than integer values. Googling led me to this
thread on django-developers:
http://groups.google.com/group/django-develo
One thing to note is that if your form is 'foo', calling
foo.__str__(), foo.as_table() and print foo all do the same thing, ie
the table output is the default __str__ output, and in your template,
{{foo}} and {{foo.as_table}} will produce exactly the same HTML.
Also, in Emily's view here, th
add custom CSS to the fields of this model?
>
> class Model_1Form(ModelForm):
>class Meta:
>model = Model_1
>exclude = ('hash')
>def save(self, request):
> something something
>
> Let me know if I missed something.
> Thanks
>
>
Hey there,
You probably want this:
http://www.djangoproject.com/documentation/newforms/#customizing-widget-instances
You'll have to specify the field types for your model, then widget
types for each field, and the extra attributes go in the widget.
Yrs,
E
On Jun 3, 2008, at 2:23 AM, Mayank D
Hi Bobby, you're best off going through the tutorial in the online
docs, that has a basic explanation of how views made, and how you can
render a template with a given context. Try this bit in particular:
http://www.djangoproject.com/documentation/tutorial03/#write-views-that-actually-do-somet
Are you maybe talking about changing the underlying database table name?
http://www.djangoproject.com/documentation/model-api/#table-names
On Jun 1, 2008, at 2:45 AM, Kless wrote:
>
> Is possible to change the model name?
>
> From a class as *class FooBar*
> it's got a model called *foobar*,
A single django app running under mod_python seems to use about
20-30MB of memory no matter what, but I think that number holds pretty
steady unless you're really getting a lot of traffic (and memcached
will save your life no matter what). I'm running several small- to
medium-sized sites o
you don't need them anymore.
E
On May 29, 2008, at 5:08 PM, sebastian stephenson wrote:
>
> well umm. can I add urls though the admin interface?
> On 28 May 2008, at 19:42, Eric Abrahamsen wrote:
>
>>
>> What I was originally suggesting you do (which of course migh
What I was originally suggesting you do (which of course might not
turn out to be the best solution) is use feedparser to read feed urls,
and save those feeds into your database. That way, you wouldn't be
using feedparser at all in your views, just regular database queries.
If your models i
Double curly brackets {{ }} are used for variable substitution. These
brackets: {% %} are used for template tags, of which the for loop is
one. So you want:
{% for et in entity.entity_type.all %}
Yours,
Eric
On May 25, 2008, at 6:59 PM, M.Ganesh wrote:
>
> Hi All,
>
> Unable to find a rele
Of course... That was a dumb question.
On May 24, 2008, at 5:16 AM, [EMAIL PROTECTED] wrote:
>
> We have groups and permissions because the User model is meant for all
> users, not just trusted users.
>
> On May 23, 3:49 pm, "Patrick J. Anderson" <[EMAIL PROTECTED]>
> wrote:
>> On Thu, 22 May 20
On May 23, 2008, at 3:10 PM, Matthias Kestenholz wrote:
>>> Well no. It's not even possible to pull the books and the categories
> (ManyToMany) out of the database in a single query. IIRC
> select_related() only follows ForeignKeys. If you need to optimize the
> querying of the categories, you n
On May 23, 2008, at 11:20 AM, [EMAIL PROTECTED] wrote:
>
> I find the "They're trusted, so let them enter it themselves" argument
> frustrating.
Not to mention: if they're trusted, then why do we have groups and
permissions?
>
>
> As someone above said, we're dealing with sites that potentia
On May 23, 2008, at 12:27 AM, jonknee wrote:
>
> On May 22, 11:08 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>
>> I tried using select_related('categories') on the original book
>> query,
>> but that seemed to actually slow it down. Are th
I saw Simon's debug footer middleware
(http://www.djangosnippets.org/snippets/766/
) come through the pipeline, and decided I'd give it a whirl, and I'm
now considering a career in gardening. I have some views I knew were
slow, and hit the database hard, but looking at the actual queries
i
I don't know what the standard is, but I'm doing exactly what you
detail here: two DB fields, one that stores Markdown text, and
another, not visible in the Admin interface, that stores HTML. In the
save method, one gets dumped into the other, via the markdown filter.
If you or one of your
views, etc.
>
>
> On May 22, 3:48 am, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>> On May 22, 2008, at 5:15 AM, sebey wrote:
>>
>>> that script you told me to do how do i get it running though the
>>> admin
>>> interface?
>>
>>
o put the script in place and set up a cron job.
>
>
> On May 21, 4:25 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
>> On May 21, 2008, at 11:07 PM, sebey wrote:
>>
>>
>>
>>>> Use Feedparser (http://www.feedparser.org/) in a stand-alone
>&
ettings
setup_environ(settings)
Then you'll be able to import your feed models, create new instances,
and save them, all within this script.
Next, Google for how to set up a cron job, read the feedparser
documentation for how to use feedparser, and you're good to go!
E
>
>
On May 21, 2008, at 6:58 PM, sebey wrote:
>
> I know css does not not have any variables but I was thinking that
> python/django could look though the css file and have
> background-color:{{insert python varible here}}
>
> but I did consider that first about copy and pasting a style sheet and
> j
Also, this can often mean that you've inadvertently mixed tabs and
spaces. If there's no obvious indentation error, check to see if your
text editor or whatever has a 'cleanup' command, or a tabs-to-spaces/
spaces-to-tabs command. Running that often clears up these glitches.
That's a heck of
This:
http://www.djangoproject.com/documentation/templates/#timesince
and the one right under it.
E
On May 19, 2008, at 3:24 PM, ERic ZoU wrote:
>
> Hi all,
>
> I have blog system that require a function that to show the hours/mins
> before/ago for the last post. Any way to solve it?
>
> Than
s.split('-'))) or None #
returns None if s is null
ValueError: invalid literal for int() with base 10: 'None'
On May 14, 2008, at 3:30 PM, Adi Jörg Sieker wrote:
> Hi Eric,
>
> On 14.05.2008, at 03:49, Eric Abrahamsen wrote:
>
>> app_years = Appeara
class Meta():
ordering = ['-app_date']
def __unicode__(self):
return "%s: %s/%s, %s" % (self.venue, self.app_date.month,
self.app_date.day,self.app_date.year)
def get_absolute_url(self):
return "/appearances/%s/#%s" % (self.ap
I've got a perplexing problem that I don't even know where to start
fixing. Creating a DateQuerySet for one of my models produces an empty
list every time. Here's at the prompt:
>>> apps = Appearance.objects.all()
>>> for ap in apps:
... print ap.app_date
...
2009-02-11 09:00:00
2008-06
> Awesome! Thanks much, Eric!
My pleasure... Just noticed there's a typo in the second part, should
be columns.setdefault..., not blocks.
Hooray for native group_by support in the ORM! I didn't realize that
was already in there.
--~--~-~--~~~---~--~~
You received
> This sounds like it might do what I need... Care to share a code
> example?
>
>
> Greg
(Don't forget to reply to the list...)
The documentation for the groupby function is notoriously obscure, but
it's actually simple to use. It generates pairs where the first item
is the common key for a
In the meantime, you can use the groupby template tag for simple
grouping operations in the template, or else I've had success using
the itertools.groupby function in the view, and then passing your
queryset as a dictionary or list of tuples to the template. It will be
nice to have native
I've been using something like:
City.objects.filter(jobs__isnull=True)
It seems to work, but I'd really like to know if this is undesirable
for any reason.
On May 6, 2008, at 8:05 PM, Dmitriy Kurilov wrote:
>
> Hi.
>
> # models
>
> class City(models.Model):
># Fields...
>
> class Job(mo
Mmmm... model inheritance... multiple OneToOne fields mmm
Thanks for all your hard work, Malcolm! Beers are owed to you!
On Apr 26, 2008, at 8:30 PM, Prairie Dogg wrote:
>
> Malcolm: Sorry - it's late over here, didn't mean to mis-type your
> name.
>
> File this and previous under: da
>> When I try to view an Entry object in the admin, it gives me a
>> KeyError, saying "Could not find Formfield or InlineObjectCollection
>> named 'series'". I don't really know what this means...
>
> It means that generic relations are not supported in the admin
> interface. You can't use them th
I'm trying to implement a very basic tagging function using generic
relations, and running into errors I don't understand. The basic setup
is, I've got a model called Series, and series should be linkable to
many models via a SeriesItem model. Following the instructions here:
http://www.djan
Whoops, sorry, that was bad advice, please ignore!
On Apr 20, 2008, at 5:19 AM, Matt wrote:
>
> I'm trying to get the following get_absolute_url function working in
> one of my models:
>
>
>def get_absolute_url(self):
>ret
Matt,
You're using get_absolute_url to return an actual view – it's only
meant to return a string representing the the URL for that model
instance. The generic view information goes in your URL config file
only, and get_absolute_url should return a URL that is matched by one
of the regula
I think what people are saying here is that your number, the iteration
limit, has to be coming from somewhere or something. Chances are, that
something is an iterable, or can be made into an iterable very easily,
and thus can be used in a for loop. Where is the number coming from?
On Apr 18
There's a branch of Django called NewForms Admin
(http://code.djangoproject.com/wiki/NewformsAdminBranch
) which will make it much easier to do what you're trying to do. From
murmurings on this list it seems that branch will be merged into trunk
before too long (in fact, there's a distinct w
Hmm, you've got me there! I looked at the source but I'm afraid my
eyes crossed halfway through. Maybe someone else can help?
On Apr 8, 2008, at 12:57 AM, Kevin Monceaux wrote:
>
>
> On Tue, 8 Apr 2008, Eric Abrahamsen wrote:
>
>> You just want plain old {% res
> Thanks, that sounds like just what I'm looking for. However, I've
> applied
> the patch and added a {% resetcycle rowcolors %} tag to the end of my
> include tag's template but it's not resetting the cycle var. I
> deleted
> the defaulttags.pyc file to make sure it got recompiled and also
Someone pointed me at this page, and I've been happily using the
resetcyle tag ever since..
http://code.djangoproject.com/ticket/5908
On Apr 7, 2008, at 10:33 PM, Kevin Monceaux wrote:
>
> Django Fans,
>
> I have another cycle tag question. Is there any way to reset a
> cycle tag
> variab
> 1. Frontend-Proxy and static file server (i.e. Nginx od lighttpd)
>if URL matches local file or rule: serve it
>else: request file from Backend-Server (i.e. Apache)
> 2. Backend Server
>handle urls as in urls.py or your resolving strategy and serve
> dynamic Data accordingly.
>
> In
Sorry, wrote too soon.
http://tn123.ath.cx/mod_xsendfile/
Guess I'll have to serve the files from django's apache, not my other
media server, but it seems like this will do it.
E
On Apr 6, 12:25 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
> > If you are using A
> If you are using Apache or lighttpd as a frontend-proxy you can use a
> similar aproach with: X-Sendfile.
I'd like to do something along these lines as well – keep files in a
protected directory and only allow them to be served if Django says
so. I'm serving static media from a different do
Also, if you haven't already, I'd definitely recommend switching to
mod_wsgi. I'm in the same boat as you – django apps on webfaction,
running up against memory limits (to the point where I was getting my
sites shut down); I started using mod_wsgi recently and haven't had
any trouble sinc
You can start with the www.djangoproject.com website itself!
http://code.djangoproject.com/browser/djangoproject.com
Eric
On Mar 31, 2008, at 4:37 PM, Marco wrote:
>
> Hi, all
>
> I'm a beginner on Django. I wanna know are there some studycase
> website core for learning?
>
> Thank you!
>
>
want to know one thing.
>
> If I create a comment model with my desired fields, can I use that
> comment model with the entry and Link models. Note I am using generic
> views for my blog app.
>
>
>
> On Mar 9, 7:15 pm, Eric Abrahamsen <[EMAIL PROTECTED]> wrote:
&g
> I tried this but I have some problem with the preview template
> There are errors showing up in the freepreview.html
> I dont prefer to preview the comment. I like to get it posted and also
> I want to include markdown syntax...
This part of the page:
http://code.djangoproject.com/wiki/Usin
101 - 200 of 252 matches
Mail list logo