While these pages are static right now and probably doesn't need to be a Django application it helped serve the purpose of learning and getting more familiar with Django. Below are the steps I took to update my site with the new files, I feel there are better ways to accomplish this and when I learn them I will write a revision to this blog post. On to the steps and some screenshots for fun.
I ran python manage.py startapp resume in the same directory as manage.py and the polls application from the official tutorial to create a new app called resume.
Updated settings.py INSTALLED_APPS to include the newly created resume application.
Moved down one directory to where the main urls.py file is. I updated urlpatterns to include the newly created resume app and make it the index page. I don't feel this is probably the Django way to do it but it worked and as I learn I will create revisions and pointers on these blog posts.
After updating urls.py move to the resume directory you created a few steps back. Edit urls.py and add the template urls and the views names that you will create in the next step. It would probably make more sense to create the views first but I just jotted them down and made the appropriate views.
Now create the views.py file and add all of your views that you need to create. The contexts aren't doing anything but for some reason the page doesn't render without them. Obviously I am doing something wrong but again it works and I will update this post when I figure out what it is.
The next step was to unload all of the files into a resume directory inside your template directory. I am still having a hard time figuring out where I need to put my static files, CSS, pictures and javascript. Right now I have put them inside of folders in the public_html.
I have a contact me page that was used with Twitter Bootstrap but I would like to look into using Django features for that and that would be a great opportunity. I loved working with Bootstrap and it was easy to make a nice looking and professional page. I can see myself using it in other areas and in other designs. I have learned a lot from using it and uploading the page to my site. I still feel I missing a lot of the fundamentals of Django though and hoping that comes with a little more practice and reading.
No comments:
Post a Comment