Your second url will catch anything that you serve under the path "/ abc/", you should change it from (r'^abc/', main_page) to (r'^abc/$', main_page).
Then you need to: 1. define a view for your forgot password page that renders the content 2. add a url for that view to your urls.py file Furthermore, I *strongly* suggest that you read through the django docs and learn how to use the template system—you'll be happy you did it. You can get started here: http://docs.djangoproject.com/en/dev/intro/overview/ also look at my post above that links to the doc for generating urls in templates. -- Peter On Sep 9, 10:52 am, Ajit jena <jenaajitkumar...@gmail.com> wrote: > Hi , > > I have one question plz help me. > > I am create a page and it is showing , when I am redirect from view.py page. > > In *url.py* page I have written > > urlpatterns = patterns('', > (r'^$', login_page), > (r'^abc/', main_page), > > ) > > *In view.py:* > > from django.http import HttpResponse > > def main_page(request): > output = ''' > <html> > <head><title>%s</title></head> > <body bgcolor='black' text='red'> > <form> > <center> > <h1>%s</h1></center> > <p>%s</p> > Enter your Name : <input type="text" name="aj"><br /><br /> > Emp id : <input type="text" name="aj" size=10><br /><br /> > Email id : <input type="text" name="aj1"><br /><br /> > mob : <input type="text" name="aj2" size =10><br /><br /> > DOB : <input type="text" name="aj3"> (dd/mm/yyyy)<br /><br > /><br /> > <input type="submit" name="aj" value= "Submit"> <input > type="Reset" name="aj" value="Clear"><br /> > <br /><br /><br /> > </form> > For more information > <br /><a href="http://www.mindfiresolutions.com" > target='_blank'> Click here</a> > </body> > </html> > ''' % ('Application page', 'Welcome to Django Group', > 'Employee Details') > return HttpResponse(output) > > def login_page(request): > login = ''' > <html> > <head><title>Login</title></head> > <body bgcolor="#487858" text='#f6f6f6'> > <center> > <h1>Web on webs...</h1><br /><br /> > <form action="/abc/templates/aa_page.html"> > Username : <input type="text" name="username" id ='username' > size=12><br /> > Password : <input type="password" name="password" > id='password' size=12> > <br/><br/> > <input type="submit" name="log" value= "Submit"> > </form> > <a href="/abc/templates/main_page.html">New user</a> <br/><a > href="/abc/templates/password_page.html">Forget password?</a> > </center> > </body> > </html> > ''' > return HttpResponse(login) > > def aa_page(request): > > login = ''' > <html> > <head><title>Success</title></head> > <body bgcolor="#487858" text='#f6f6f6'> > <center> > <h2> Log in Successfully!!!</h2> > </center> > </body> > </html> > ''' > return HttpResponse(login) > > But I want to see the page when I click the Forget password? link.(<a > href="/abc/templates/password_page.html">Forget password?</a> in login_page > method of view.py page) > But it shows the main_page data from view.py file. > > Is there any setting required. I think It is a silly question. But please > help me. > > Thanks, > Ajit > > On Wed, Sep 9, 2009 at 8:19 PM, Ajit jena <jenaajitkumar...@gmail.com>wrote: > > > thanks Peter, > > > On Wed, Sep 9, 2009 at 2:28 AM, Peter Coles <pe...@hunch.com> wrote: > > >> Make yourself familiar with the django documention page—if you know > >> where to look for stuff there, you'll find it to be a very handy > >> resource.http://docs.djangoproject.com/en/dev/ > > >> > 1: How can I go to next page when i submit the data in index page(log > >> > in page) > > >>http://docs.djangoproject.com/en/dev/ref/request-response/#django.htt... > > >> > 2: How can I link a page with a text. so that when I click on the text > >> > It will so the page I want. > > >> This sounds like you're trying to just put a link on a page? of the > >> format <a href="_url_here_">Click this link</a>? The following will > >> show you the best way to generate the url for the "_url_here_" part: > > >>http://docs.djangoproject.com/en/dev/ref/templates/builtins/#url > >> You should really give this a read too, naming url patterns can be > >> very convenient: > >>http://docs.djangoproject.com/en/dev/topics/http/urls/#naming-url-pat... > > >> Finally, you should really read the content provided under "First > >> Steps" on the doc page:http://docs.djangoproject.com/en/dev/#first-steps > >> Especially the intro overview > >>http://docs.djangoproject.com/en/dev/intro/overview/#intro-overview > >> and then the tutorials > > >> > Can any one give some tips (which may face silly issues while create > >> > simple web application) > > >> > Please help me to for gaining knowledge about django framework. > > >> > many many thanks in advance for help! --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---