I count 12 available middleware classes at
http://docs.djangoproject.com/en/dev/ref/middleware/,
however I can not find a complete listing of the best order to place
them. I have read tips here and there about what to do with some of
them, but can someone please provide me with the definitive
I count 12 available middleware classes at
http://docs.djangoproject.com/en/dev/ref/middleware/,
however I can not find a complete listing of the best order to place
them. I have read tips here and there about what to do with some of
them, but can someone please provide me with the definitive
Hi,
>
> Is there somewhere I should be looking where I'm not? Some kind of
> built in rewriter?
Have you considered using Apache mod_rewrite instead of trying to
solve this at the application layer?
http://httpd.apache.org/docs/2.0/rewrite/rewrite_guide.html
Lighttpd and nginx also have simila
status code pointing at the new URL.
It seems to me that the best way to do this would be to write a
middleware class that works similarly to CommonMiddleware. However,
I'm having a hard time creating one that I'm satisfied with. The
problem is that anything I create will have to essen
Hey guys,
thanks for the help. I actually got it working like this:
class AliasMiddleware(object):
def process_request(self, request):
assert hasattr(request, 'session'), "The Django authentication
middleware requires session middleware to be installed. Edit your
MID
On Tue, Jun 24, 2008 at 11:14 PM, csmith <[EMAIL PROTECTED]> wrote:
>
> How can I add an attribute or variable? to the request object in
> middleware, where I can use it in other views via the request object.
> This is my custom middleware code so far:
>
> class AliasMidd
> How can I add an attribute or variable? to the request object in
> middleware, where I can use it in other views via the request object.
You can use threading.local() variables, like this:
import threading
_thread_locals = threading.local()
def get_current_user():
return g
How can I add an attribute or variable? to the request object in
middleware, where I can use it in other views via the request object.
This is my custom middleware code so far:
class AliasMiddleware(object):
def process_request(self, request):
assert hasattr(request, 'session
quest, response):
try:
self.activity.set_request_time()
except:
pass
return response
and that took care of it.
On May 28, 7:19 pm, Josh <[EMAIL PROTECTED]> wrote:
> I created a custom middleware for logging requests based on this blog
> post:http
ld mean there must be a
> > way for me to tell django to use a different urlpatterns. I checked on
> > CommonMiddleware that does a bit of url-rewriting and found it does a
> > HttpResponsePermenentRedirect and not change the actual url in place
> > which seems odd to me as I
rl-rewriting and found it does a
> HttpResponsePermenentRedirect and not change the actual url in place
> which seems odd to me as I expected the middleware to rewrite the URL
> in place.
>
> Thanks for all the help and your super framework,
> Sia
--~--~-~--~~~---~
that does a bit of url-rewriting and found it does a
HttpResponsePermenentRedirect and not change the actual url in place
which seems odd to me as I expected the middleware to rewrite the URL
in place.
Thanks for all the help and your super framework
ity's process_response.
Constantin Christmann schrieb:
> Hello,
>
> lately I installed a middleware to track user activity on my website
> (mainly code from this blog post
> http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html)
>
> I use the following middlewar
Hello,
lately I installed a middleware to track user activity on my website
(mainly code from this blog post
http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html)
I use the following middleware classes:
MIDDLEWARE_CLASSES = (
'django.middleware.common.CommonMiddl
I'm looking for a quick and simple way to create a request object - as
it would be received by a specific view - for some very basic
testing. Additionally, I want this object to have all the added
attributes from the middleware modules e.g. request.user.
I tried this:
(1)
I look
I created a custom middleware for logging requests based on this blog
post: http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html
It's mostly working fine except for one thing. It causes problems when
a URL without a trailing / is requested. In that case it gives me the
foll
I created a custom middleware for logging requests based on this blog
post: http://whijo.net/blog/brad/2007/07/19/statistics-logging-django.html
It's mostly working fine except for one thing. It causes problems when
a URL without a trailing / is requested. In that case it gives me the
foll
I finally found that the problem was coming from another middleware of
mine:
class AuthRequiredMiddleware(object):
def process_view(self, request, view_func, view_args,
view_kwargs):
if request.path.startswith(settings.MEDIA_URL) or request.path
in settings.PUBLIC_PATHS
Please ignore the "if DEBUG == True: blabla" statement, that was for
testing. Just consider the list of middlewares above that.
Don't understand why it doesn't work...
On May 24, 8:41 am, Julien <[EMAIL PROTECTED]> wrote:
> Hi,
>
> I'm using the middle
Hi,
I'm using the middleware from a snippet [1] so I could debug
exceptions raised by ajax calls. That snippets simply displays the
traceback in the console when an exception occurs:
class ConsoleExceptionMiddleware:
def process_exception(self, request, exception):
import trac
Thanks for the link Chris, but this is not what I'm trying to do. I'm
not worried about the way the price look, but the price currency
itself. Since the user is allowed to select that per session.
If there's a way for a filter to access the session variables I would
be OK, since instead of multip
Take a look at what we use in Satchmo. Maybe this will help -
http://www.satchmoproject.com/trac/browser/satchmo/trunk/satchmo/shop/templatetags/satchmo_currency.py
-Chris
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Gro
iables or the request session, I am wondering if middleware is the
answer here. But I have no prior middleware experience :)
Maybe a template tag would do it, not sure if it gets access to the
request.
On Apr 11, 2:55 pm, Dan Ellis <[EMAIL PROTECTED]> wrote:
> On Apr 11, 11:37 am, Panos Laga
On Apr 11, 11:37 am, Panos Laganakos <[EMAIL PROTECTED]>
wrote:
> I'm wondering if working on a
> middleware, `process_view` or something would be the right place to
> make the conversion.
Not a middleware, but a context processor.
http://www.djangoproject.com/documentat
the filter itself instead of a
string, so I'm curious how to make this happen.
I don't want to do it in the model level (maybe defining a OneToMany
with each currency to price), so I'm wondering if working on a
middleware, `process_view` or something wo
r 9, 2008 at 1:47 AM, andy baxter
> > > >
> > > > Do you mean middleware specifically written for django? If so not sure,
> > > > but it might be worth looking at dojo (http://www.dojotoolkit.org/). It
> > > > is a javascript toolkit which provides an A
Jarek Zgoda wrote:
> Chris Hoeppner napisał(a):
>
>
>> This is new to me. Dojo will be the official js toolkit for django?
>> Above jQuery? How come?
>>
>
> No. It was stated many times: Django would not have any "official js
> toolkit" and will not "be bound to" or "embrace" any single to
On Thu, Apr 10, 2008 at 6:42 AM, Todd O'Bryan <[EMAIL PROTECTED]> wrote:
>
> On Wed, Apr 9, 2008 at 6:54 AM, Russell Keith-Magee <[EMAIL PROTECTED]>
> wrote:
> > On Wed, Apr 9, 2008 at 1:47 AM, andy baxter
> > >
> > > Do you mean middlewa
On Wed, Apr 9, 2008 at 6:54 AM, Russell Keith-Magee <[EMAIL PROTECTED]>
wrote:
>
> On Wed, Apr 9, 2008 at 1:47 AM, andy baxter
> <[EMAIL PROTECTED]> wrote:
> >
> > Do you mean middleware specifically written for django? If so not sure,
> > but
On Wed, Apr 9, 2008 at 1:47 AM, andy baxter
<[EMAIL PROTECTED]> wrote:
>
> Do you mean middleware specifically written for django? If so not sure,
> but it might be worth looking at dojo (http://www.dojotoolkit.org/). It
> is a javascript toolkit which provides an API to m
Chris Hoeppner napisał(a):
> This is new to me. Dojo will be the official js toolkit for django?
> Above jQuery? How come?
No. It was stated many times: Django would not have any "official js
toolkit" and will not "be bound to" or "embrace" any single toolkit. You
are free to use the toolkit of
Hey Mr. Baxter,
This is new to me. Dojo will be the official js toolkit for django?
Above jQuery? How come?
~ Chris
El mar, 08-04-2008 a las 18:47 +0100, andy baxter escribió:
> Claudio Escudero wrote:
> > Hi,
> >
> > Someone knows there is any middleware that works
Claudio Escudero wrote:
> Hi,
>
> Someone knows there is any middleware that works with Ajax, similar to
> RJS of Ruby on Rails?
>
Do you mean middleware specifically written for django? If so not sure,
but it might be worth looking at dojo (http://www.dojotoolkit.org/). It
Claudio,
Your question made me look at RJS (which I had never heard of before)
and at some stuff I did for a recently completed site. I think a rev
0.1 of something like RJS could be done in a weekend. I'll email you
in the next day or so with some thoughts.
Cheers,
Peter
--~--~-~--~
Hi,
Someone knows there is any middleware that works with Ajax?
Tranks,
Claudio
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to dj
Hi,
Someone knows there is any middleware that works with Ajax, similar to RJS
of Ruby on Rails?
Tranks
Claudio
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this g
On 4/3/08, Chris <[EMAIL PROTECTED]> wrote:
>
> Can anyone help me with this? It looks like I need to pass in a
> django_content_type= to the request context
> before it gets passed to the middleware for further processing. Any
> thoughts?
Yes. I think you need to wait
Can anyone help me with this? It looks like I need to pass in a
django_content_type= to the request context
before it gets passed to the middleware for further processing. Any
thoughts?
On Apr 2, 3:37 pm, Chris <[EMAIL PROTECTED]> wrote:
> Is there a way to grab content_type and objec
Is there a way to grab content_type and object_id in a middleware
processor? Example if I went to my articles section:
http://www.xyz.com/articles// could I some how get the
content_type and the object_id from the request context that is passed
in? I want to be able to perform a middleware task
Austin,
There's an excellent overview of the how's and why's of Middleware at
http://www.djangoproject.com/documentation/middleware/
Fundamentally, you're just specifying a class that you've implemented
somewhere. It can be in a folder or not - that's just matchin
On Jan 22, 9:39 pm, Dan Conner <[EMAIL PROTECTED]> wrote:
> well, one way to do this is through a middleware class, like this:
> class SetEmptyPathInfo(object):
> def process_request(self, request):
> if not request.path:
> re
David Marquis napisał(a):
> 'Can't pickle function objects'
>
> I can't seem to understand why on earth Django is trying to pickle a
> 'function' into the user's session.
> This error often happens when users leave their browser open and try
> to continue the process later on (a few hours la
Hi folks,
My first post on the forum! I've been watching the threads for a
while, but now I need your help :)
For a recent project, my users sometimes get the following error:
(this error is output raw to the user, as text sent back to the
browser as the response content)
**
Mod_python
t;
> On 13 янв, 13:53, Grindizer <[EMAIL PROTECTED]> wrote:
when i wrote MyMiddleware i juste wanted to give a symbolic name (like
P or APP1). The real name of my middleware is ProfileMiddleware
(sorry, for MIDDLEWARE_CLASSES i juste make a copy/past of my project
i repla
n this project i define several applications, APP1, APP2, APP3
>
> In INSTALLED_APPS of my settings i add those application with full
> name,
> ("P.APP1", "P.APP2", etc.)
>
> and all was working fine. (Admin interface and front end).
>
> After i wrote a middle
Hello.
I have one project let say P,
In this project i define several applications, APP1, APP2, APP3
In INSTALLED_APPS of my settings i add those application with full
name,
("P.APP1", "P.APP2", etc.)
and all was working fine. (Admin interface and front end).
After i wrot
now I have to implement Django (which came out to be something I was
> > needing as framework). Familiar with Django basics and some core
> features, I
> > am still looking for some knwoledge base for certain issues.
> >
> > 1. I need a middleware intercepting request, and findi
for certain issues.
>
> 1. I need a middleware intercepting request, and finding if client request
> has cookies in it. If not, then I want to redirect that request to a page
> which serves a page with some user states (such as random unique uid
> assigned so his navigation and page accesse
On Jan 9, 6:04 pm, "Ravi Kumar" <[EMAIL PROTECTED]> wrote:
> Yes, I am using older self compiled version. Hmm,
> Well, lets look at what the new release has now.
> Are you people sure when I setup Django on mod_python+Apache+Linux, there
> won't be memory issues like what I read about the older mo
Yes, I am using older self compiled version. Hmm,
Well, lets look at what the new release has now.
Are you people sure when I setup Django on mod_python+Apache+Linux, there
won't be memory issues like what I read about the older mod_python.
Any suggestions to take about during setup or such.
>
estion doesn't
make sense in many situations. What's the character set encoding of a
PNG image? :-) It might even be that some text encodings fail to meet
that requirement, but they clearly aren't that common and it's only
going to be a requirement for legacy systems (in
Malcolm Tredinnick wrote:
> Hey Gary,
>
> On Tue, 2008-01-08 at 00:35 -0600, Gary Wilson Jr. wrote:
> [...]
>> So, looking at a couple places in Django trunk where response.content is
>> used,
>> these look like bugs:
>>
>>
>> django.contrib.csrf.middleware.CsrfMiddleware.process_response:
>>
>>
tring as the first argument and a bytestring
(request.content) as the second argument. The CSRF middleware is using
bytestrings throughout, so it's safe.
> django.test.testcases.TestCase.assertContains:
>
> def assertContains(self, response, text, count=None, status_code=200):
>
On Jan 8, 11:36 pm, "Ravi Kumar" <[EMAIL PROTECTED]> wrote:
> I am sorry. I mean to say "Django on Apache" has some memory overusage and
> leak problem due to mod_python or whatever :)
To repeat was Kenneth said but in respect of your clarification,
'where did you hear this? It is not true. '. :-
I did that.
--~--~-~--~~~---~--~~
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.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For
ame out to be something I was
> needing as framework). Familiar with Django basics and some core features, I
> am still looking for some knwoledge base for certain issues.
>
> 1. I need a middleware intercepting request, and finding if client request
> has cookies in it. If not, then I
I am sorry. I mean to say "Django on Apache" has some memory overusage and
leak problem due to mod_python or whatever :)
But i did read those docs. Suggestion were to restart (using cron, stop then
start rather than restart) to release those. So if this is true, is there
any way to command it.
Any
t;> bytestring.
>>>> I'm playing with a response middleware doing something like:
>>>>
>>>> MY_RE.sub(u'%s' % text, response.content)
>>>>
>>>> which raises a UnicodeDecodeError if response.content contains non-ascii.
>>>
On 08-Jan-08, at 11:05 AM, Ravi Kumar wrote:
> 3. I was reading some pros-cons about Django. I came to know Django
> has a memory problem in deployment environment, leaked memory. I
> also read many articles regarding how to prevent such leakage and
> hogging
where did you hear this? It i
need a middleware intercepting request, and finding if client request
has cookies in it. If not, then I want to redirect that request to a page
which serves a page with some user states (such as random unique uid
assigned so his navigation and page accesses can be recorded). The page
would use
On Mon, 2008-01-07 at 18:28 -0600, Gary Wilson Jr. wrote:
> Malcolm Tredinnick wrote:
> > On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
> >> It appears that at this point, response.content is a utf8-encoded
> >> bytestring.
> >> I'm playing w
Malcolm Tredinnick wrote:
> On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
>> It appears that at this point, response.content is a utf8-encoded bytestring.
>> I'm playing with a response middleware doing something like:
>>
>> MY_RE.sub(u'%s' %
On Sun, 2008-01-06 at 15:25 -0600, Gary Wilson Jr. wrote:
> It appears that at this point, response.content is a utf8-encoded bytestring.
> I'm playing with a response middleware doing something like:
>
> MY_RE.sub(u'%s' % text, response.content)
>
> whi
It appears that at this point, response.content is a utf8-encoded bytestring.
I'm playing with a response middleware doing something like:
MY_RE.sub(u'%s' % text, response.content)
which raises a UnicodeDecodeError if response.content contains non-ascii.
I understand that the
On Dec 5, 7:02 pm, Malcolm Tredinnick <[EMAIL PROTECTED]>
wrote:
>
> If you're using CACHE_MIDDLEWARE_ANONYMOUS_ONLY you need a different
> middleware ordering, as the error message says. That setting is a real
> hack and I'd love to implement it in a better way some
On Wed, 2007-12-05 at 15:26 +0100, Paul Rauch wrote:
> hi list,
>
> I got some Problems with the middlewareorder of cachemiddlerware,
> since it does not seem possible to order it the right way.
>
> >Put the CacheMiddleware before any other middleware that might add
>
hi list,
I got some Problems with the middlewareorder of cachemiddlerware,
since it does not seem possible to order it the right way.
>Put the CacheMiddleware before any other middleware that might add
>something to the Vary header (response middleware is applied in reverse
>or
fined pattern it
> > would log that request as well as place a cookie on the client.
>
> > Is custom middleware the correct place to do this?
>
> Yes. It sounds like you want to use process_request, do your
> matching, and either log right then, or, if you need to wait
On 10/19/07, Steve Potter <[EMAIL PROTECTED]> wrote:
>
> I would like to put together a piece of code that will test the
> referer for each request and if it matches a predefined pattern it
> would log that request as well as place a cookie on the client.
>
> Is custo
I would like to put together a piece of code that will test the
referer for each request and if it matches a predefined pattern it
would log that request as well as place a cookie on the client.
Is custom middleware the correct place to do this?
Also, I'm not exactly clea
On 10/5/07, Robin Becker <[EMAIL PROTECTED]> wrote:
> can the middleware determine the template used by V0 so that it can be used
> automatically to generate V2?
Yes. Have a look at django.test.utils.instrumented_test_render and
.setup_test_environment.
You'll see a w
A colleague is writing a response middleware which hijacks the normal view
under
certain circumstances. Diagramatically
V0 -->M(0)--> V1 is the normal case view V0 goes directly to V1 ie the
middleware M does nothing.
when the hijack is to take place
V0 -->M(1)-->V2-->M(
Hi!
I wonder if there is any way to get current appname in middleware.
I'm going to build one universal middleware that will be used for some
different applications. My problem is that the middleware must read
some data from a db table (and put it into request) and the table name
is diff
jamin <[EMAIL PROTECTED]> wrote:
>
> > Today I was looking for some middleware that would allow changing of
> > the text of a site into Pirate Talk without effecting the content, as
> > today was Talk like a Pirate day.http://www.talklikeapirate.com/.
> > There was
Jacob wrote something like this a while ago
http://toys.jacobian.org/misc/pirate.py.txt
On Sep 19, 5:26 am, Scott Benjamin <[EMAIL PROTECTED]> wrote:
> Today I was looking for some middleware that would allow changing of
> the text of a site into Pirate Talk without effecting the
Today I was looking for some middleware that would allow changing of
the text of a site into Pirate Talk without effecting the content, as
today was Talk like a Pirate day. http://www.talklikeapirate.com/ .
There wasn't anything available for Django that would change site text
into "P
Eratothene wrote:
> I think you better not disable cache middleware in tests. If tests
> fail, so will be in production. I had similar problem, I thought it
> was something wrong with tests, but really it was problem in the code.
> My site was running well on django built-in server
ommonMiddleware',
> 'django.contrib.sessions.middleware.SessionMiddleware',
> 'django.contrib.auth.middleware.AuthenticationMiddleware',
> 'django.middleware.doc.XViewMiddleware',
> 'django.middleware.cache.CacheMiddleware',
> 'django.contrib.flatpages.middleware.FlatpageFal
ddleware',
'django.middleware.cache.CacheMiddleware',
'django.contrib.flatpages.middleware.FlatpageFallbackMiddleware',
)
Eratothene wrote:
> I think you better not disable cache middleware in tests. If tests
> fail, so will be in production. I had simila
I think you better not disable cache middleware in tests. If tests
fail, so will be in production. I had similar problem, I thought it
was something wrong with tests, but really it was problem in the code.
My site was running well on django built-in server, but not on apache
mod_python.
The
On Thu, 2007-08-16 at 17:05 -0600, Norman Harman wrote:
> Hi,
>
> request.template is None instead of what it should be because the response is
> from the
> cache middleware.
>
> Which is fine. My question is there a good way to disable the cache
> middleware dur
Hi,
request.template is None instead of what it should be because the response is
from the
cache middleware.
Which is fine. My question is there a good way to disable the cache
middleware during
tests?
"good" being atleast the following. is automatic, isn't based of
/5176
On 16 авг, 02:46, "Kai Kuehne" <[EMAIL PROTECTED]> wrote:
> Hi Erarothene,
>
> On 8/16/07, Eratothene <[EMAIL PROTECTED]> wrote:
>
>
>
> > I am totally confused with CacheMiddleware docs and middleware docs.
>
> > I want to use su
Hi Erarothene,
On 8/16/07, Eratothene <[EMAIL PROTECTED]> wrote:
>
> I am totally confused with CacheMiddleware docs and middleware docs.
>
> I want to use such middlewares in project:
> ConditionalGetMiddleware
> GZipMiddleware - addes Vary on Accept-Encoding
> Sessio
I am totally confused with CacheMiddleware docs and middleware docs.
I want to use such middlewares in project:
ConditionalGetMiddleware
GZipMiddleware - addes Vary on Accept-Encoding
SessionMiddleware - addes Vary on Cookie
CacheMiddleware -
I am trying to find correct order for this
The middleware is loaded by whatever is serving your requests, and
when it loads it'll process through that file - invoking "foofunc()"
in the path and executing it.
I'm not sure I understand your second question though.
-joe
On 7/31/07, james_027 <[EMAIL PROTECTED
Hi Thomas
> The methods of each middleware are called one for every request. If your
> changes need information from the request, that's the right place.
>
> If you want to add a method which should be added once the server (mod_python,
> scgi, ...) starts you can use this
Am Dienstag, 31. Juli 2007 11:26 schrieb james_027:
> Hi,
>
> I want to make sure that my understanding is right. is middleware the
> place where I can add more attribute to the HttpRequest Object and
> manipulate the added attribte?
>
> Is this advisable? if Not where is the
Hi,
I want to make sure that my understanding is right. is middleware the
place where I can add more attribute to the HttpRequest Object and
manipulate the added attribte?
Is this advisable? if Not where is the right place to do it?
Thanks
james
sy as the django user
model
I can make a middleware like this
from ksk.main.models import Profile
class ProfileMiddleware(object):
"""Use to synchronize django user and ksk profile"""
def process_request(self, request):
if request.user.is_authenticat
On 7/14/07, Amit Ramon <[EMAIL PROTECTED]> wrote:
> 1. The language must be set before creating the menu (so the menu will be in
> the correct language). I assume that middleware gets called before context
> processors. Am I right here?
Yes.
> 2. I noticed that the middle
se (it's simply another model),
and I have a function that creates the menu and I pass it to the template in
the extra_context.
Following a tip from Malcolm (thanks!), in order not to repeat code for doing
1 in each and every view, I created a custom middleware that sets the
language in its
I recently hacked together a small middleware that validates all
outgoing html and if it encounters a validation error, throws a 500
status code and error page with the validation error message(s) and
html source.
Similar in aim to Luke Plant's Validator App (http://lukeplant.me.uk/
reso
ore for the
look and feel when the users visit the site.
I can probably get away with restricting it to this particular app (in
the middleware) and just create a list of common view urls that it
should ignore when looking at the theme portion of the url, so as to
avoid strange path catches.
-Chris
On
I've done something similar to this, putting the site language in the
url.
Basically you create a middleware process_request, that will take
request.path and set it to something else.
For example you might do:
request.path = "/app/theme/view/"
parts = request.path.split(&qu
Chris Kelly wrote:
> I am in the process of writing an app that will have a "theme" based
> on if a subdirectory is specified e.g.:
>
> http://somesite.com/app/(theme)/abunchofviews/
>
> basically, if they go to /app/bluetheme/register, it'll give them a
> registration page with a blue theme heade
about if this would be a candidate for being written as
middleware? Right now it looks like I only need it for this particular
app, and not any other ones on the site, if that makes a difference.
I am a little new to writing middleware, so please tell me if you
think there is a better way to do t
limited testing, it seems to work. But, I am
wondering why there are two middleware that support this and which one
I should use (or both).
Thanks in advance...
CT
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
Hello,
I have a custom middleware class that would be used project-wide. I've
put it in the 'middleware' subdirectory of my project because it
doesn't really belong to any app.
The question is where to put tests for such code that exists outside
of any application? Django
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
401 - 500 of 621 matches
Mail list logo