Amitesh, here are the contents of my home.html:

<!doctype html>
> <html lang="en">
>   <head>
>     <title>J. R. Dobb's Blog!</title>
>     <!-- Required meta tags -->
>     <meta charset="utf-8">
>     <meta name="viewport" content="width=device-width, initial-scale=1, 
> shrink-to-fit=no">
>     <!-- Bootstrap CSS -->
>     <link rel="stylesheet" 
> href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/css/bootstrap.min.css";
>  
> integrity="sha384-PsH8R72JQ3SOdhVi3uxftmaW6Vc51MKb0q5P2rRUpPvrszuE4W1povHYgTpBfshb"
>  
> crossorigin="anonymous">
>   </head>
>   <body>
>     <nav class="navbar navbar-default">
>       <div class="container">
>         <div class="navbar-header">
>           <a class="navbar-brand" href="#">Dobbs' Clearing House</a>
>         </div>
>       </div>
>     </nav>
>     <h1>Hello, world!</h1>
>     <!-- Optional JavaScript -->
>     <!-- jQuery first, then Popper.js, then Bootstrap JS
>     <script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"; 
> integrity="sha384-KJ3o2DKtIkvYIK3UENzmM7KCkRr/rE9/Qpg6aAZGJwFDMVNA/GpGFF93hXpG5KkN"
>  
> crossorigin="anonymous"></script>
>     <script 
> src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.3/umd/popper.min.js";
>  
> integrity="sha384-vFJXuSJphROIrBnz7yo7oB41mKfc8JzQZiCq4NCceLEaO4IHwicKwpJf9c9IpFgh"
>  
> crossorigin="anonymous"></script>
>     <script 
> src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-beta.2/js/bootstrap.min.js";
>  
> integrity="sha384-alpBpkh1PFOepccYVYDB4do5UnbKysX5WZXm3XxPqe5iKTfUKjNkCk9SaVuEZflJ"
>  
> crossorigin="anonymous"></script> -->
>     
>   </body>
> </html>
> <h1>Dobbs' Homepage Test</h1>
> <h2> Latest News and Updates</h2>
> {% for post in posts.all %}
> <a href="{% url 'post_details' post.id %}">{{ post.title }}</a>
> <br>
> {{ post.pub_date_pretty }}
> <br>
> <img src="{{ post.image.url }}">
> <br>
> {{ post.summary }}
> <br>
> <br>
> {% endfor %}


Sorry if I confused you with the lorem ipsum non sense.  Please disregard 
that last post of mine.  

Thanks again,

Drone4four

On Wednesday, November 15, 2017 at 10:35:20 PM UTC-5, Amitesh Sahay wrote:
>
> Hello, 
>
> In the settings.py please give the full path to your appsclass as 
> mentioned in app.py. That should be the standard. 
>
> Please share the HTML code here, then it should be clear for further 
> suggestion.
>
> Regards,
> Amitesh Sahay
>
> primary :: *91-907 529 6235*
>
>
> On Thursday 16 November 2017, 6:47:43 AM IST, drone4four <
> [email protected] <javascript:>> wrote: 
>
>
> I am having fun trying to initiate a django project with some apps. I am 
> taking an awesome course on udemy called, The Ultimate Beginner's Guide to 
> Django. I was able to follow along and I have a basic blog up and running. 
> Now I am back tracking a little by starting over, this time using a 
> supplementary Django cheat sheet. I encountered a number of issues and 
> resolved them but now I find myself stuck. 
>
> When I try navigating to my new homepage, Django provides me with this 
> debug traceback <https://pastebin.com/QqXhgVM3>. Django is telling me 
> here that the templates directory doesn’t exist, when it clearly does. Here 
> is a screenshot of Atom <https://imgur.com/a/mth7B> so you can see my 
> project’s file tree. As you can see my directory tree for my project, there 
> is an folder which is called, blogitems. and within the blogitems folder is 
> a sub-folder called, templates, then blogitems again and finally my file, 
> home.html
>
> It’s rather confusing. I don’t like the redundancy and the recursive 
> nature of all the app files and directory names. Maybe this is my problem. 
> Can any of your make sense of my debug output to explain why I am getting 
> the error? Can anyone please provide some clarity here?
>
> Here is the cheat sheet:
>
> *Creating a Django App*
>
> 1. Open terminal and navigate to django project folder (where manage.py 
> exists)
> 2. django-admin startapp [app name] # use pluralised names, e.g. posts
> 3. Navigate to new app folder.
> 4. Create new subfolder called “templates”
> 5. Navigate to new templates folder.
> 6. Create new subfolder called same name as your app (e.g. posts)
> 7. Go back to project folder
> 9. Open project urls.py and add “from [appname] import views”. Then add 
> url path for new view.
>      e.g. url(r’^$’, views.home, name=‘home’)
> 10.Open views.py and add:
> def home(request):
>     return render(request, ‘posts/home.html’)
>
>
> 11. Navigate to projectfolder\appfolder\templates\appfolder
> 12.  Create new file ‘home.html’
> 13.  Go to project folder and open settings.py. Scroll down to 
> INSTALLED_APPs and add ‘appname’, to the end of the list of apps.
>
>
> It's this last step where I encounter the error. 
>
> Here are the contents of urls.py:
> from django.conf.urls import url
> from django.contrib import admin
> from blogitems import views
>
> urlpatterns = [
>     #initialization admin interface:
>     url(r'^admin/', admin.site.urls),
>     url(r’^$’, views.home, name=‘home’),
> ]
>
>
>
> I added the app into the settings.py:
> INSTALLED_APPS = [
>     'django.contrib.admin',
>     'django.contrib.auth',
>     'django.contrib.contenttypes',
>     'django.contrib.sessions',
>     'django.contrib.messages',
>     'django.contrib.staticfiles',
>     'blogitems',
> ]
>
> Is there any other information I could provide?
>
> Thanks for your attention.
>
> -- 
> 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 [email protected] <javascript:>.
> To post to this group, send email to [email protected] 
> <javascript:>.
> 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/770a99c0-3824-4e73-914e-f380fd5f48f6%40googlegroups.com
>  
> <https://groups.google.com/d/msgid/django-users/770a99c0-3824-4e73-914e-f380fd5f48f6%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> 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 [email protected].
To post to this group, send email to [email protected].
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/fcb2a687-5ca9-4807-9f17-d688acdf9143%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to