You should take a look at https://docs.djangoproject.com/en/1.11/topics/http/middleware/#process-view
It is not a reserved keyword but simply a function that is called by the Django middleware system.

On Apr 15, 2017 4:47 PM, shahab emami <royarame...@gmail.com> wrote:
hello

i want to learn MIDDLEWARE in django  .

i created this:

class SimpleMiddleware(object):

    def process_request(self, request):
        print("%%%%%%%%%%%%%%%%")

and i added in settings.py. then as you probably know i see "%%%%%%" in console with every click.
that is the exact thing that i except.

but when i change name of method:

    def hello(self, request):
        print("%%%%%%%%%%%%%%%%")
  it doesn't work anymore  .

is process_request a keyword? where can i find list of this names ?

--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/504db6b6-c18f-4c2b-8453-9d6db429b966%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/58f22888.ced61c0a.ba536.1f20SMTPIN_ADDED_MISSING%40gmr-mx.google.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to