Re: page redirecting only home page

2019-10-12 Thread Mohammad yunus
In URL('empty') Convert it into URL(r^'$',your view) On Sat, 12 Oct 2019, 8:06 pm lemme smash, wrote: > why you have type="button" on anchor?) > > On Saturday, October 12, 2019 at 7:07:48 AM UTC+3, narendra thapa wrote: >> >> i have two template load_page.html and ask_questions.html while i am >

Re: page redirecting only home page

2019-10-12 Thread lemme smash
why you have type="button" on anchor?) On Saturday, October 12, 2019 at 7:07:48 AM UTC+3, narendra thapa wrote: > > i have two template load_page.html and ask_questions.html while i am > linking a ask_questions.html through load_page.html via a anchor tag i am > not getting ask_questions.html bu

Re: Create a multitab home page of a blog

2019-07-16 Thread Jani Tiainen
ty much new to Django, so I cannot figure this out: > > I have the home page and the way to post updates in my blog, but I want to > sort the posts into categories. Like sports, fitness, politics. But I want > to do it into two lists of multiple tabs, one horizontal and one vertical.

Create a multitab home page of a blog

2019-07-15 Thread Nicolas Huergo
Hey! I'm pretty much new to Django, so I cannot figure this out: I have the home page and the way to post updates in my blog, but I want to sort the posts into categories. Like sports, fitness, politics. But I want to do it into two lists of multiple tabs, one horizontal and one vertical.

Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-14 Thread Manjunath
Also, It would be better if you rearrange your patterns. urlpatterns=[ path('login/', LoginView.as_view(template_name='accounts/login.html'), name='login'), re_path(r'^$',views.home, name='home'), ] Since your path *r'^$' *matches all request, it is better to keep this at end of your list. On

Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-13 Thread Alex Callaway
Thanks! On Monday, November 12, 2018 at 7:06:37 PM UTC-8, Jason wrote: > > you have an ending slash on your login urls, and no ending slash in your > links defined. try adding a trailing slash > -- You received this message because you are subscribed to the Google Groups "Django users" group.

Re: Why does my Django project open the same home page irrespective or which url I type?

2018-11-12 Thread Jason
you have an ending slash on your login urls, and no ending slash in your links defined. try adding a trailing slash -- 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

Why does my Django project open the same home page irrespective or which url I type?

2018-11-12 Thread Alex Callaway
In my urlpatterns in the url.py file of my app, I have two pages: from django.urls import path, re_path from django.conf.urls import url from . import views from django.contrib.auth.views import LoginView urlpatterns=[ re_path(r'^$',views.home, name='home'), path('login/', LoginView.as_view(templ

Re: How can I solve the broken home page in the root folder?

2017-02-03 Thread Melvyn Sopacua
On Tuesday 31 January 2017 06:51:35 Thames Khi wrote: > I added the following to main site urls.py: and I assume this also contains: from data import views > url(r'^$', views.home, name='home'), > > and added the following to the /data/views.py file. > > def home(request): > return HttpRespons

Re: How can I solve the broken home page in the root folder?

2017-01-31 Thread Thames Khi
Thank you very much. I added the following to main site urls.py: url(r'^$', views.home, name='home'), and added the following to the /data/views.py file. def home(request): return HttpResponse("Main Page") This somewhat makes sense, just wondering why the main site does not require a views.py

Re: How can I solve the broken home page in the root folder?

2017-01-31 Thread ludovic coues
Try "url(r'^/', include('data.urls'))," in url_patterns. This should do what you want. Alternatively, you can set a simple view on r'^$' that will redirect to your main app. On 31 Jan 2017 1:09 p.m., "Thames Khi" wrote: I followed a simple tutorial to create a sample application in DJango. Her

How can I solve the broken home page in the root folder?

2017-01-31 Thread Thames Khi
I followed a simple tutorial to create a sample application in DJango. Here is my code for urls.py in the root folder: from django.conf.urls import url, include from django.contrib import admin #from data import views urlpatterns = [ url(r'^data/', include('data.urls')), url(r'^admin/', adm

SOLVED Erroneous links in my Django URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread NoviceSortOf
Thanks that does the job. I'm editing subject to read as 'Solved' - Is this considered best practice in this form? On Thursday, December 22, 2016 at 2:43:23 AM UTC+1, NoviceSortOf wrote: > > > URLs not defined in my urls.py all show my home page and not a 404 missin

Re: Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread Vijay Khemlani
tml")), > (r'^about.htm/$', TemplateView.as_view(template_name= > "about.html")), > (r'^contactus.htm/$', TemplateView.as_view(template_name= > "contactus.html")), > (r'^subjectslst/$', TemplateView.as_view(temp

Re: Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-22 Thread NoviceSortOf
as_view(template_name= "subjectslst.html")), (r'$',index2), (r'^index2/$',index2), ) On Thursday, December 22, 2016 at 2:56:57 AM UTC+1, Vijay Khemlani wrote: > > show your urls.py > > On Wed, Dec 21,

Re: Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-21 Thread Vijay Khemlani
show your urls.py On Wed, Dec 21, 2016 at 10:43 PM, NoviceSortOf wrote: > > URLs not defined in my urls.py all show my home page and not a 404 missing > page error. > > For instance > > www.mysite.com > Naturally shows my home page. > > www.mysite.com/catalogs >

Erroneous links in my URLs - all load the home page -- not a 404 or other error.page

2016-12-21 Thread NoviceSortOf
URLs not defined in my urls.py all show my home page and not a 404 missing page error. For instance www.mysite.com Naturally shows my home page. www.mysite.com/catalogs Shows the downloadable catalogs then anything goes. www.mysite.com/thisisanonsenselink or www.mysite.com

Re: Home Page

2016-02-25 Thread Malik Rumi
our questions you are thinking a bit too hard. > > If you want to have a view for the default page (home page) on a website, > just create an app that will handle those pages. In one project that I am > currently working on, we created an app called website. In that app we have > t

Re: Home Page

2016-02-24 Thread Andreas Kuhne
Malik, I find that in many of your questions you are thinking a bit too hard. If you want to have a view for the default page (home page) on a website, just create an app that will handle those pages. In one project that I am currently working on, we created an app called website. In that app we

Re: Home Page

2016-02-24 Thread Rafael E. Ferrero
.com/PyAr/pyarweb/blob/master/community/views.py#L16> in line 16 Hope you can find them useful to learn. Regards!! Rafael E. Ferrero 2016-02-24 16:57 GMT-03:00 Malik Rumi : > > I'm not sure what you're looking for here. Designing a home page is not > a django topic. Using

Re: Home Page

2016-02-24 Thread Malik Rumi
> I'm not sure what you're looking for here. Designing a home page is not a django topic. Using django to deliver a homepage is the same as delivering any other page Please don't take offense, Bob, I appreciate you taking the time to respond. I could not disagree with you more.

Re: Home Page

2016-02-23 Thread Bob Gailer
On Feb 23, 2016 7:59 AM, "Malik Rumi" wrote: > > Why is there so little information in the docs Documentation evolves. User input helps that process. Perhaps you can make a contribution as you learn. about how to build a home page I'm not sure what you're looking

Re: Home Page

2016-02-23 Thread jorrit787
I struggled with this as well. I usually end up creating a 'common' app for my homepage and project-wide templates and static files, but I don't know if that's considered a best practice. Alternatively you could put your homepage in your most used/most important app. -- You received this messa

Re: Home Page

2016-02-23 Thread Sithembewena Lloyd Dube
; Why is there so little information in the docs about how to build a home > page, where to put the url, whether or not to build a separate app around > it, why or why not to put it in the folder with settings in it, and how to > handle a complex home page with a lot of changing content - like

Home Page

2016-02-23 Thread Malik Rumi
Why is there so little information in the docs about how to build a home page, where to put the url, whether or not to build a separate app around it, why or why not to put it in the folder with settings in it, and how to handle a complex home page with a lot of changing content - like on a

redirecting to home page instead of given route

2015-11-23 Thread venkat
I'm new to django. I'm trying to save bookmark collected from form . But it is not getting saved in DB and also it is redirecting to home page def bookmark_save_page(request): if request.method == 'POST': form = BookmarkSaveForm(request.POST)

Re: django documentation tutorial 3 questions. home page missing.

2014-05-09 Thread François Schiettecatte
Presumably because there is nothing set to handle localhost:8000/ in your urlpatterns like this: # Root view, goes to 'app.home.views.page' (r'^$', 'app.home.views.page'), François On May 8, 2014, at 11:46 PM, cheesiong lim wrote: > hi all, > i am learning django by using django

django documentation tutorial 3 questions. home page missing.

2014-05-08 Thread cheesiong lim
hi all, i am learning django by using django 1.6 documents tutorial 1 - 6. this round is my 4th try and, previous 3 try was successful and i understand more on every try. i am in tutorial 3 now, to create views. according to the documents, after i created a view, i need to map it to a URL.

Home page not loading when using domain name

2014-02-12 Thread bhudspeth60
I am using Django 1.5 and Django-CMS 2.4.2 When I use my basic domain name (ex. www.siteName.edu) I get a page that is other than the intended home page (but instead another page further down the list as viewed in the Django Admin). I have to use " www.siteName.edu/home/" to get my ho

Re: Custom view on the home page based on groups assigned to user.

2013-04-13 Thread Enator24
page that user would be able to see based on his group. >> >> Please advise , it is something like workflow app. I am stuck at this >> point only. >> >> I have already looked into "request.user " approch but scene is different >> here. i just want th

Re: Custom view on the home page based on groups assigned to user.

2013-04-12 Thread Enator24
t; > Please advise , it is something like workflow app. I am stuck at this > point only. > > I have already looked into "request.user " approch but scene is different > here. i just want the custom home page based on group. > > Thanks , > Enator > -- You recei

Re: Custom view on the home page based on groups assigned to user.

2013-04-12 Thread Anurag Chourasia
django login , just want to customize the home ppage > that user would be able to see based on his group. > > Please advise , it is something like workflow app. I am stuck at this > point only. > > I have already looked into "request.user " approch but scene is different

Custom view on the home page based on groups assigned to user.

2013-04-12 Thread Enator24
"request.user " approch but scene is different here. i just want the custom home page based on group. Thanks , Enator -- 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 i

Re: django site home page

2012-01-15 Thread Guddu
Hi Marjenni, Something like this (r'^$','.views.'), Replace the variables in <> accordingly Regards, Guddu On Jan 15, 7:39 pm, marjenni wrote: > Hi all, >    A really simple one. What goes in urls.py to set a callback > function for the base website url? > > thanks > > mark -- You recei

django site home page

2012-01-15 Thread marjenni
Hi all, A really simple one. What goes in urls.py to set a callback function for the base website url? thanks mark -- 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 unsubs

Re: Organizing/Loading components on a home page using python

2011-12-18 Thread Kristian Øllegaard
Hi Waqar, Check out django-cms - you are probably looking for a CMS. There are other django based CMSes as well, but personally I only had experience with the django-cms, which worked great for my usecases. Here you can make cms plugins that you can rearrange dire

Re: Organizing/Loading components on a home page using python

2011-12-18 Thread creecode
Hello Waqar, It sounds like you are looking for something like Drupal. Although I've not used it myself I think Drupal has an architecture like you describe. Django is a web framework it is not a website builder with auto-configuring modules. Don't get me wrong. Django is a fantastic web fram

Organizing/Loading components on a home page using python

2011-12-18 Thread Waqar Azeem
I don't know from where to start to ask this question. I need to create a HOME page with multiple components, like • News • Products • Forum Topic • Ads and so on. The little knowledge that i have accumulated on Django forced me to start using the templates, because I didn't find small

Re: admin home page

2011-02-27 Thread Vladimir
To Lee Hinde: Thank You. You answered me: Your browser's not finding the admin media location to load the css. Look at the docs for ADMIN_MEDIA_PREFIX. (I think that's the one...) I have looked: ADMIN_MEDIA_PREFIX Default: '/media/' The URL prefix for admin media -- CSS, JavaScript and images used

Re: mistake in admin home page

2011-02-27 Thread Lee Hinde
On Sun, Feb 27, 2011 at 5:46 AM, vladimir wrote: > Please help me, why do I get such a form of admin home page (after > autentification): > > http://www.google.com/url?sa=D&q=https://docs.google.com/leaf%3Fid%3D0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3LWI5ZWEtYTFmM2JkODY5YmEy%26h

Re: admin home page

2011-02-27 Thread Vladimir
I have installed Django-1.2.5. No effect. -- 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.co

Re: admin home page

2011-02-27 Thread Stefano
I use virtualenv so can test my app with multiple django version easy. http://pypi.python.org/pypi/virtualenv S. 2011/2/27 Vladimir : > is it a good idea to delete Django from Python27/Lib/site-packages and > install Django-1.2.5 ? > > -- > You received this message because you are subscribed t

Re: admin home page

2011-02-27 Thread Vladimir
is it a good idea to delete Django from Python27/Lib/site-packages and install Django-1.2.5 ? -- 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, sen

Re: admin home page

2011-02-27 Thread Vladimir
/* DJANGO Admin styles */ body { margin: 0; padding: 0; font-size: 12px; font-family: "Lucida Grande","DejaVu Sans","Bitstream Vera Sans",Verdana,Arial,sans-serif; color: #333; background: #fff; } /* LINKS */ a:link, a:visited { color: #5b80b2; text-decoration

Re: admin home page

2011-02-27 Thread Stefano
seems that django is not able to decode the .css files try to open /contrib/admin/media/css/base.css with notepad and check it's content S. 2011/2/27 Vladimir : > Django 1.2.3, > > in settings.py I have not edit this values: > MEDIA_ROOT = '' > MEDIA_URL = '' > ADMIN_MEDIA_PREFIX = '/media/' > >

Re: admin home page

2011-02-27 Thread Vladimir
Django 1.2.3, in settings.py I have not edit this values: MEDIA_ROOT = '' MEDIA_URL = '' ADMIN_MEDIA_PREFIX = '/media/' urls.py: from django.conf.urls.defaults import * # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patter

Re: admin home page

2011-02-27 Thread s . apostolico
nothing ? is it enabled ? Please indicate: - django version - the value of MEDIA_ROOT, MEDIA_URL, ADMIN_MEDIA_PREFIX - urls.py 2011/2/27 Vladimir : > 1) firebug shows nothing in "net->all" panel, 2) the same result is in > Firefox 3.6.13, Internet Explorer 8, Google Chrome > > -- > You received

Re: admin home page

2011-02-27 Thread Vladimir
1) firebug shows nothing in "net->all" panel, 2) the same result is in Firefox 3.6.13, Internet Explorer 8, Google Chrome -- 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 unsu

Re: admin home page

2011-02-27 Thread s . apostolico
es (project level and/or > application level), but I cannot find them exactly. Please help > > On 26 фев, 21:58, vladimir wrote: >> 1. Studying example in "The Definite Guide to Django. 2nd ed. >> A.Holovaty, J.Kaplan-Moss" I have got impropper form of admin home &g

Re: admin home page

2011-02-27 Thread veva...@yandex.ru
lovaty, J.Kaplan-Moss" I have got impropper form of admin home > page (after > authorisation):https://docs.google.com/leaf?id=0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3... > 2. Studying example (CMS) in "Python Web Development with Django. > J.Forcier, P.Bissex, W.Chun" I have g

mistake in admin home page

2011-02-27 Thread vladimir
Please help me, why do I get such a form of admin home page (after autentification): http://www.google.com/url?sa=D&q=https://docs.google.com/leaf%3Fid%3D0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3LWI5ZWEtYTFmM2JkODY5YmEy%26hl%3Den%26authkey%3DCMCK6uQG -- You received this message because you

admin home page

2011-02-26 Thread vladimir
1. Studying example in "The Definite Guide to Django. 2nd ed. A.Holovaty, J.Kaplan-Moss" I have got impropper form of admin home page (after authorisation): https://docs.google.com/leaf?id=0B5W4njXO9ND_YmY0ZGQ4NTktZWZiZC00MzU3LWI5ZWEtYTFmM2JkODY5YmEy&hl=en&authkey=CMCK6uQG 2. Stu

Re: Blog Listing on Home Page

2011-02-22 Thread delegbede
view and then loop over it in my template like so: > {% for article in articles %} > article.author > article.date > article.content > {% endfor %} > This renders all the articles in my blog. > I however want it to show an article per page. > How can I achieve that. >

Re: Blog Listing on Home Page

2011-02-22 Thread delegbede
bject: Re: Blog Listing on Home Page This is definitely doable. And easy -- you can use django's generic views for it. I recommend you pick up / download "Practical Django Projects," by James Bennett. He'll walk you through every step for creating a blog, using generic views,

Re: Blog Listing on Home Page

2011-02-22 Thread Karen McNeil
view and then loop over it in my template like so: > {% for article in articles %} > article.author > article.date > article.content > {% endfor %} > This renders all the articles in my blog. > I however want it to show an article per page. > How can I achieve that. > Alterna

Blog Listing on Home Page

2011-02-21 Thread delegbede
icles %} article.author article.date article.content {% endfor %} This renders all the articles in my blog. I however want it to show an article per page. How can I achieve that. Alternatively, I am thinking I could do a filter of articles on my home page and the do a drill down from years, to m

Re: How to launch home page from urls.py?

2010-10-13 Thread Chris Boyd
Thank you Rob! > {'template': 'index.html'} But in that case I have to use Django template file, while my home page is built with Pyjamas (http://pyjs.org/). Can I use a Django urlpattern to launch any HTML file, not just Django tempalte file? Thank you, Chris On Wed,

Re: How to launch home page from urls.py?

2010-10-13 Thread Robbington
Hi Chris, I use urlpatterns = patterns('django.views.generic.simple', (r'^$', 'direct_to_template',{'template': 'index.html'}), ) Where template is the defined template directory in my settings.py Seems a better way to me, as then if you want to expand your site you can just incorperate

Re: How to launch home page from urls.py?

2010-10-13 Thread Chris Boyd
part of the URI, specifically "/winapp/HomePage.html <http://a.b.com/winapp/HomePage.html>" in order to launch the home page. { 'document_root': 'winapp' } provides only the folder, but I need to pass the sub-folder ("winapp") and the filename ("HomeP

Re: How to launch home page from urls.py?

2010-10-13 Thread Jonathan Barratt
On 13 ?.?. 2010, at 7:57, Chris wrote: > Hello, > > Currently in my urls.py I have "( r'^winapp/(?P.*)$', > 'django.views.static.serve', { 'document_root': 'winapp' } )," and I > can launch my home pahe by pointing my browser to something like > "a.b.com/winapp/HomePage.html". > > I have gone t

How to launch home page from urls.py?

2010-10-13 Thread Chris
Hello, Currently in my urls.py I have "( r'^winapp/(?P.*)$', 'django.views.static.serve', { 'document_root': 'winapp' } )," and I can launch my home pahe by pointing my browser to something like "a.b.com/winapp/HomePage.html". I have gone through the documentation and a couple of books, but I can

Re: how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread Justin Myers
It already tells you why it's showing that page. You need to add some entries to urls.py, at the very least. The tutorial Sithembewena linked you to is a good start. -Justin On Sep 16, 12:25 am, perfecthills wrote: > Have a website build on django, i desire to transfer the website to a > new doma

Re: how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread Sithembewena Lloyd Dube
Start here and work your way through the whole tutorial : http://docs.djangoproject.com/en/1.2/intro/tutorial01/#intro-tutorial01 On Thu, Sep 16, 2010 at 7:25 AM, perfecthills wrote: > Have a website build on django, i desire to transfer the website to a > new domain, i already created the appli

how to replace "Congratulations on your first Django-powered page." with my home page

2010-09-16 Thread perfecthills
Have a website build on django, i desire to transfer the website to a new domain, i already created the application and even website at webfaction, i have even copied the entire code of the previous site to the ftp of the new website iwant. well being new, all i get is It worked! Congratulations

flatpages and views on home page

2010-09-11 Thread Bobby Roberts
hi group. Got an issue I need some help with asap. I have flatpages installed and a url at / for my home page. I've also got a form on my home page powered by a view. my urls portion for this view is: rr'^$','DoNewsLetter'), my issue is this... the view executes pe

Re: home page menu view variables cross every view?

2010-09-11 Thread Goran
Works great! Thank you very much! Goran On Sep 8, 3:51 pm, bagheera wrote: > Dnia 08-09-2010 o 15:41:13 Goran napisał(a): > > > > > Thanks for your help but I think that understand how template works. > > My menu is drop down menu with menu items which comes from variable > > {{ for menuitem i

Re: home page menu view variables cross every view?

2010-09-08 Thread bagheera
Dnia 08-09-2010 o 15:41:13 Goran napisał(a): Thanks for your help but I think that understand how template works. My menu is drop down menu with menu items which comes from variable {{ for menuitem in myvariable }} {{ menuitem.title }} {{ endfor }} and myvariable is in my view: myvariable = It

Re: home page menu view variables cross every view?

2010-09-08 Thread Goran
Thanks for your help but I think that understand how template works. My menu is drop down menu with menu items which comes from variable {{ for menuitem in myvariable }} {{ menuitem.title }} {{ endfor }} and myvariable is in my view: myvariable = Item.objects.all() So if I extend base.html menu i

Re: home page menu view variables cross every view?

2010-09-07 Thread Vasil Vangelovski
ies to generate that menu. On Tue, Sep 7, 2010 at 8:55 PM, Goran wrote: > I'm Django novice and I want to have some menu (top menu) which have > some dynamically populated items. So inside home page view I have some > variables to get these menu items. But because it's top menu

Re: home page menu view variables cross every view?

2010-09-07 Thread Thomas Rega
On Tue, Sep 7, 2010 at 8:55 PM, Goran wrote: > I'm Django novice and I want to have some menu (top menu) which have > some dynamically populated items. So inside home page view I have some > variables to get these menu items. But because it's top menu I need it > on every

home page menu view variables cross every view?

2010-09-07 Thread Goran
I'm Django novice and I want to have some menu (top menu) which have some dynamically populated items. So inside home page view I have some variables to get these menu items. But because it's top menu I need it on every page on the site and i have about 20 views. So I'm place these

Re: Redirect home page

2009-10-12 Thread ashbii
I second Graeme's suggestion. It should make your life easier regarding translations. On Oct 11, 1:54 pm, Graeme Glass wrote: > On Oct 11, 12:24 am, Caisys wrote: > > > Hi, > > I would like visitors to my site homepagewww.example.comtobe > > redirected towww.example.com/en/inorder to allow for

Re: Redirect home page

2009-10-11 Thread Graeme Glass
On Oct 11, 12:24 am, Caisys wrote: > Hi, > I would like visitors to my site homepagewww.example.comto be > redirected towww.example.com/en/in order to allow for translations > in the future. > > What is the most efficient way? > > 1- Use apache mod-rewrite? > 2- I know i could use the HttpRespon

Re: Redirect home page

2009-10-11 Thread Caisys
Thanks On Oct 11, 8:15 am, jeffschenck wrote: > The simplest option is probably to use the redirect generic view > (http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views- > generic-simple-redirect-to). You could add something like this to your > urlconf: > > (r'^$', 'django.views.

Re: Redirect home page

2009-10-10 Thread jeffschenck
The simplest option is probably to use the redirect generic view (http://docs.djangoproject.com/en/dev/ref/generic-views/#django-views- generic-simple-redirect-to). You could add something like this to your urlconf: (r'^$', 'django.views.generic.simple.redirect_to', {'url': '/en/'}), jeff --~--

Re: Redirect home page

2009-10-10 Thread Kurt Neufeld
You could use middleware to do this as I learned last week, but why not just make a "view" which is only a function. urls.py: ... (r'^$', 'views.DomainRootRedirect' ) ... views.py: def DomainRootRedirect( request, *args, **kwargs ): return HttpResponseRedirect(

Redirect home page

2009-10-10 Thread Caisys
Hi, I would like visitors to my site homepage www.example.com to be redirected to www.example.com/en/ in order to allow for translations in the future. What is the most efficient way? 1- Use apache mod-rewrite? 2- I know i could use the HttpResponseRedirect function in django but i felt it might

Re: home page caching

2009-07-14 Thread Ramdas S
On Tue, Jul 14, 2009 at 11:47 PM, Michel Thadeu Sabchuk wrote: > > Hi Ramdas, > > > It would be great if you can throw some more light on your solution. > Sounds > > like a splendid idea and will be helpful for many including me > > This is easy, I loaded the page through urllib and write it to a

Re: home page caching

2009-07-14 Thread Michel Thadeu Sabchuk
Hi Ramdas, > It would be great if you can throw some more light on your solution. Sounds > like a splendid idea and will be helpful for many including me This is easy, I loaded the page through urllib and write it to a static file, then I served the file through nginx. Anyway, I will create a sn

Re: home page caching

2009-07-13 Thread Javier Guerra
On Mon, Jul 13, 2009 at 5:29 PM, Sam Tregar wrote: > I'm a beginner with Django, so I'm curious to hear about Django-specific > approaches. the Django-specific approaches start with the doc: http://docs.djangoproject.com/en/dev/topics/cache/#the-per-view-cache in short: 1: add some preferences

Re: home page caching

2009-07-13 Thread Sam Tregar
On Mon, Jul 13, 2009 at 3:34 PM, Ramdas S wrote: > I have a web site where around 15 SQL semi complex queries run on the home > page. Traffic is increasing and the page loads are getting slower. What is > the best way to cache just the home page. I have already done standard > memc

Re: home page caching

2009-07-13 Thread Ramdas S
QL semi complex queries run on the > home > > page. Traffic is increasing and the page loads are getting slower. What > is > > the best way to cache just the home page. I have already done standard > > memcached on the server. > > I'm still learning about caching so f

Re: home page caching

2009-07-13 Thread Javier Guerra
On Mon, Jul 13, 2009 at 3:12 PM, Michel Thadeu Sabchuk wrote: > I made a script to generate the homepage every x minutes and serve it > through nginx, I don't have too much RAM :) this is a really good solution. some benchmarks have shown NginX performance when serving static files comparable to

Re: home page caching

2009-07-13 Thread Michel Thadeu Sabchuk
Hi Ramdas, > I have a web site where around 15 SQL semi complex queries run on the home > page. Traffic is increasing and the page loads are getting slower. What is > the best way to cache just the home page. I have already done standard > memcached on the server. I'm sti

home page caching

2009-07-13 Thread Ramdas S
I have a web site where around 15 SQL semi complex queries run on the home page. Traffic is increasing and the page loads are getting slower. What is the best way to cache just the home page. I have already done standard memcached on the server. Please suggest the best caching options, where we

Re: Linking Back to Home Page from Template

2009-04-10 Thread Anthony
I tried looking up this question since it > > can't be a new one, but the closest thread I found was this one: > > > http://groups.google.com/group/django-users/browse_thread/ > > thread/d2524403e13fcd22/515358199feebc68?lnk=gst&q=url+home > > +page#515358199fee

Re: Linking Back to Home Page from Template

2009-04-10 Thread Colin Bean
com/group/django-users/browse_thread/ > thread/d2524403e13fcd22/515358199feebc68?lnk=gst&q=url+home > +page#515358199feebc68">Home page question thread > > > I'm trying to set up my templates so that I have a link back to my > home page.  I've got the following URL conf

Re: Linking Back to Home Page from Template

2009-04-10 Thread Joe Sr.
3e13fcd22/515358199feebc68?lnk=gst&q=url+home > +page#515358199feebc68">Home page question thread > > I'm trying to set up my templates so that I have a link back to my > home page.  I've got the following URL conf set up so that it points > to "http://www.mys

Linking Back to Home Page from Template

2009-04-10 Thread Anthony
Hi Everyone, This is really basic and I tried looking up this question since it can't be a new one, but the closest thread I found was this one: http://groups.google.com/group/django-users/browse_thread/ thread/d2524403e13fcd22/515358199feebc68?lnk=gst&q=url+home +page#515358199feeb

Re: admin home page shows no permission to do anything

2008-10-30 Thread Chuck22
Never mind. I found the solution. Put admin.autodiscover() to urls.py fix the issue. On Oct 30, 9:40 pm, Chuck Bai2 <[EMAIL PROTECTED]> wrote: > I got the following message when login as superuser to admin home page: > * > You don't have permission to edit anything. > *

admin home page shows no permission to do anything

2008-10-30 Thread Chuck Bai2
I got the following message when login as superuser to admin home page: * You don't have permission to edit anything. * Recent Actions My Actions None available I delete all my database tables and regenerate them through syncdb, but it did not help. The login/logout pa

Re: home page

2008-07-06 Thread keegan3d
Thanks everyone! This group is always so helpful and FAST! I made a view.py file in the project root because I wanted to use data from my apps to populate the home page. It worked great! On Jul 6, 9:17 pm, "Milan Andric" <[EMAIL PROTECTED]> wrote: > On Sun, Jul 6, 2008 at

Re: home page

2008-07-06 Thread Milan Andric
On Sun, Jul 6, 2008 at 10:52 PM, keegan3d <[EMAIL PROTECTED]> wrote: > > Hey everyone, > > I am a little foggy on how I would go about making a home page, by > that I mean the page that people see when they go to the main address: > www.mysite.com. > > Should I m

Re: home page

2008-07-06 Thread Jeff Anderson
keegan3d wrote: Hey everyone, I am a little foggy on how I would go about making a home page, by that I mean the page that people see when they go to the main address: www.mysite.com. Should I make a "home page" app? or does django have a way of dealing with this? Another solutio

Re: home page

2008-07-06 Thread Eric Abrahamsen
u put the view it calls makes very little difference. Hope that helps, Eric On Jul 7, 2008, at 11:52 AM, keegan3d wrote: > > Hey everyone, > > I am a little foggy on how I would go about making a home page, by > that I mean the page that people see when they go to the ma

home page

2008-07-06 Thread keegan3d
Hey everyone, I am a little foggy on how I would go about making a home page, by that I mean the page that people see when they go to the main address: www.mysite.com. Should I make a "home page" app? or does django have a way of dealing with this? Thanks for the he

Re: Set Index (Home) Page

2008-04-07 Thread Kevin Monceaux
On Mon, 7 Apr 2008, ichbindev wrote: > that would take care of (b) where no page was matched. It would also > take care of (a) but in principle the home page should not be reached > through a "page not found" kind of thing. I agree, in your initial post you said: >

Re: Set Index (Home) Page

2008-04-07 Thread Tim Chase
ichbindev wrote: > I am trying to write urlconf file so that there is an index or home > page. If none of the patterns match, it should, by default, go to that > page. For example, a sample urlconf could be > > urlpatterns = patterns('', > (r'^time/$',

Re: Set Index (Home) Page

2008-04-07 Thread ichbindev
Thanks, Kevin. Of the two situations (a) the user types http://www.example.com/ (b) the user types http://www.example.com/somethingelse/ that would take care of (b) where no page was matched. It would also take care of (a) but in principle the home page should not be reached through a "pag

Re: Set Index (Home) Page

2008-04-07 Thread Kevin Monceaux
On Mon, 7 Apr 2008, ichbindev wrote: > In short, is there such a thing as 'default' in urlpatterns so that it > calls a view when none of the other patterns match? Is something like: http://www.DjangoProject.com/documentation/url_dispatch/#handler404 what you're looking for? Kevin http://w

  1   2   >