Re: [Tutor] Python Django Query

2019-04-02 Thread nitin chandra
Thanks Cameron,

Just got lucky yesterday and found a resource at my end to help me out.

Thank you

On Tue, 2 Apr 2019 at 04:31, Cameron Simpson  wrote:
>
> On 29Mar2019 21:18, nitin chandra  wrote:
> >Hi Everyone,
> >I need some guidance / corrections to my code.
> >I hosted a demo site on pythonanywhere.com and to test the initial
> >pages I wrote some test code.
> [...]
>
> Hi Nitin,
>
> I looks like nobody has replied; this probably means that nobody has the
> required specialty expertise to help you. (I don't.)
>
> >Good news, put in 10 hrs, tried so many suggestion given on the net,
> >yet non worked. So finally mailing the list.
>
> Might I suggest that you ask on the django-users mailing list, here:
>
>   https://www.djangoproject.com/community/
>
> You want the "Using Django" list there.
>
> There's a guideline to posting here:
>
>   https://code.djangoproject.com/wiki/UsingTheMailingList
>
> but your post looks fairly good on the face of it.
>
> Hoping this helps,
> Cameron Simpson 
>
> >
> >Objective : display main page with multiple links to other pages. Use
> >jQuery plugins, click the link on main page and open other pages.
> >
> >The following path and pages are posted below.
> >
> >Thanks
> >
> >Nitin Chandra
> >
> >
> >ERROR
> >When I click on 'Table' link on 'home' page, the following error is displayed
> >
> >http://selftech.pythonanywhere.com/table.html
> >Page not found (404)
> >
> >Request Method:GET
> >Request URL:http://selftech.pythonanywhere.com/table.html
> >
> >Using the URLconf defined in eduinfra.urls, Django tried these URL
> >patterns, in this order:
> >
> >admin/
> >[name='home.html']
> >
> >The current path, table.html, didn't match any of these.
> >
> >You're seeing this error because you have DEBUG = True in your Django
> >settings file. Change that to False, and Django will display a
> >standard 404 page.
> >
> >+++
> >
> >/home/selfTech/edu/tech/
> >
> > __init__.py
> > admin.py
> > apps.py
> > models.py
> > tests.py
> > urls.py
> > views.py
> >
> >/home/selfTech/edu/tech/templates/
> >
> > base.html
> > home.html
> > table.html
> >***
> >our 'base.html' code below (test code, gets rendered correctly)
> >
> >
> >  Navbar
> >   >data-target="#navbarTogglerDemo02" aria-controls="navbarTogglerDemo02"
> >aria-expanded="false" aria-label="Toggle navigation">
> >
> >  
> >
> >  
> >
> >  
> >Home  >class="sr-only">(current)
> >  
> >  
> >Link
> >  
> >  
> >Table
> >  
> >  
> > >aria-disabled="true">Disabled
> >  
> >
> >
> >  
> >   >type="submit">Search
> >
> >  
> >
> >   *
> >home.html
> >
> >{% extends 'base.html' %}
> >
> >{% block content%}
> >Hello TEAM :)
> >{% endblock %}
> >***
> >table.html (gives ERROR 404)
> >
> >
> >
> >
> >Name
> >
> >
> >
> >
> >*
> >/home/selfTech/edu/tech/
> >
> >urls.py
> >
> >from django.urls import path
> >from . import views
> >
> >urlpatterns = [
> >path('', views.home, name='home'),
> >path('table/', views.table, name='table') ## various combo did not work
> >   # path (' ', views.table, name='table') ## nope
> >   # path (' ', views.table, name='table.html') # nope
> >]
> >
> >*///
> >views.py
> >
> >from django.shortcuts import render
> >from django.http import HttpResponse
> ># Create your views here.
> >
> >def home (request):  /// correctly renders
> >return render (request, "home.html",{})
> >
> >def table (request): gives error
> >return HttpResponse ('This is a test Page')
> ># Tried the below code, nada
> ># return render (request, "table.html",{})
> >
> >*\
> >___
> >Tutor maillist  -  Tutor@python.org
> >To unsubscribe or change subscription options:
> >https://mail.python.org/mailman/listinfo/tutor
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor


Re: [Tutor] Questions about the deprecation of standard library modules

2019-04-02 Thread Steven D'Aprano
On Sat, Mar 30, 2019 at 10:13:16PM -0500, boB Stepp wrote:

> So my main question is how does one know in which Python version a
> deprecated module will be removed?  I'm not too concerned about the
> imp module, but _do_ want to know how the removal process works for
> deprecated standard library modules that I might be interested in.

The usual process goes something like this:

- after much discussion, the core developers agree to deprecate 
  a module;
- in a fit on enthusiasm, the docs are adjusted to note that the
  module is deprecated;
- many years later, somebody remembers the deprecation note in
  the docs, and wonders whether or not the module should finally
  be removed;
- the module is changed to give a warning when used;
- some years after that, somebody asks what's going on with
  the deprecated module, shouldn't it be removed by now?
- and the module is finally removed.

(Only half joking.)

In practice, it depends on the specific developer, and how good he or 
she is at coming back to the module and removing it after a "suitable" 
time. Suitable usually means a minimum of two releases, but it could be 
as little as one in urgent cases; in *very special circumstances* a 
module which is a security risk could be removed immediately, but that's 
rare.

Its not unusual for everyone to forget to remove a deprecated feature or 
module until long after it should have been removed, or to decide that 
deprecation notice or not, too many people are still using it and so it 
can't be removed.

On the other hand, its also not ususual for modules to be removed 
promptly. Usually its:

- one or two releases silently marked as deprecation pending;
- one or two releases marked depreciation (active warning);
- and then removed.


-- 
Steven
___
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
https://mail.python.org/mailman/listinfo/tutor