Django and google webmaster tools file
How can I put a file, which is needed by the Google Webmasters Tool? Where to put it or how to configure django to read it? -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django and google webmaster tools file
galago pisze: > How can I put a file, which is needed by the Google Webmasters Tool? > Where to put it or how to configure django to read it? AFAIR, you can add a DNS record or meta tag as well, meta tag coud be placed in your template, probably base.html -- Bartek -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django and google webmaster tools file
This is a static file and should be served directly by webserver, so you need to configure your webserver to provide this file (like other static files but from another url). It is possible to server it by Django too, then you are looking for django.views.static.serve but It is not recommended. Regards, Martin Tirsel On Wed, 19 Jan 2011 19:39:41 +0100, galago wrote: How can I put a file, which is needed by the Google Webmasters Tool? Where to put it or how to configure django to read it? -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django and google webmaster tools file
Your static files probably already live in your MEDIA_URL and this file must live in your root path. As this is just a single file and won't be handled often you can take the same approach I use when dealing with robots.txt. Keep in mind that this is not a recomended way to serve static files but you can think about these files as exceptions. Add a line to your url conf with the path you want it to be on and create the file as a template with only static content: urlpatterns += patterns('django.views.generic.simple', (r'^robots.txt$', 'direct_to_template', {'template':'robots.txt', 'mimetype':'text/plain'}), ) On Wed, Jan 19, 2011 at 5:03 PM, Martin Tiršel wrote: > This is a static file and should be served directly by webserver, so you > need to configure your webserver to provide this file (like other static > files but from another url). > > It is possible to server it by Django too, then you are looking for > django.views.static.serve but It is not recommended. > > Regards, > Martin Tirsel > > > > On Wed, 19 Jan 2011 19:39:41 +0100, galago wrote: > > How can I put a file, which is needed by the Google Webmasters Tool? Where >> to put it or how to configure django to read it? >> > > -- > 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 > django-users+unsubscr...@googlegroups.com > . > For more options, visit this group at > http://groups.google.com/group/django-users?hl=en. > > -- Eduardo Cereto Carvalho -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
Re: Django and google webmaster tools file
Yes, you are right, this file is only for verification and not served regullary, so it is easier to add such urlpattern. Martin On Wed, 19 Jan 2011 22:36:37 +0100, Eduardo Cereto Carvalho wrote: Your static files probably already live in your MEDIA_URL and this file must live in your root path. As this is just a single file and won't be handled often you can take the same approach I use when dealing with robots.txt. Keep in mind that this is not a recomended way to serve static files but you can think about these files as exceptions. Add a line to your url conf with the path you want it to be on and create the file as a template with only static content: urlpatterns += patterns('django.views.generic.simple', (r'^robots.txt$', 'direct_to_template', {'template':'robots.txt', 'mimetype':'text/plain'}), ) On Wed, Jan 19, 2011 at 5:03 PM, Martin Tiršel wrote: This is a static file and should be served directly by webserver, so you need to configure your webserver to provide this file (like other static files but from another url). It is possible to server it by Django too, then you are looking for django.views.static.serve but It is not recommended. Regards, Martin Tirsel On Wed, 19 Jan 2011 19:39:41 +0100, galago wrote: How can I put a file, which is needed by the Google Webmasters Tool? Where to put it or how to configure django to read it? -- 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 django-users+unsubscr...@googlegroups.com . For more options, visit this group at http://groups.google.com/group/django-users?hl=en. -- 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 django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.