Updating urls.py doesn't work

Hi, I'm trying to add a new url to my site at transformbusiness.sg.

In the webroot folder, there is a file called urls.py.
I added in a url called "novshow".
Below is how the file looks like after I edited it...

# flake8:noqa
from django.conf.urls import *
from django.views.generic import TemplateView
from website.views import IndexView, NewsletterSignupView

urlpatterns = patterns('',
    url(r'^newsletter/signup$',
        NewsletterSignupView.as_view(),
        name='newsletter-signup'),
    url(r'^terms-and-conditions$',
        TemplateView.as_view(template_name='terms-and-conditions.html'),
        name='terms-and-conditions'),
    url(r'^privacy-policy$',
        TemplateView.as_view(template_name='privacy-policy.html'),
        name='privacy-policy'),
    url(r'^sitemap$',
        TemplateView.as_view(template_name='sitemap.html'),
        name='sitemap'),
    url(r'^novshow$',
        TemplateView.as_view(template_name='novshow.html'),
        name='novshow'),
    url(r'^$',
        IndexView.as_view(template_name='index.html'),
        name='index'),
)

Open in new window


I read somewhere that the urls.pyc file will be automatically re-compiled, but it doesn't seem to do so.
So, I SSH in, go to the webroot folder and compiled the urls.py file using the instructions at http://effbot.org/pyfaq/how-do-i-create-a-pyc-file.htm.

But transformbusiness.sg/novshow still doesn't work.
I've added the novshow.html file at the templates folder together with the other html files referenced in urls.py.

I'm not familiar with python/django, so if anyone here can help, that'd be great, thanks!
LVL 1
killdurstAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

WillNy3Commented:
I know this is super late but did you run makemigrations? Also, you need to add a trailing slash to your root url r'^/$'.... Last, it may be simpler to instead make function based views that render your html so that way you can easily add template variables as needed. Hope this helped!
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
killdurstAuthor Commented:
So sorry for this late reply...
I found a workaround to accomplish what i needed, so i sort of forgot about this question.
I will try your suggestion nonetheless, just in case.
Will update this thread soon....
0
Kyle RouxExpert Programming MentorCommented:
your issue is for the changes to take effect you need to restart your server, what ever is actually running your django app, probably gunicorn. only changes to templates will be recognized without restarting the app server.
1
killdurstAuthor Commented:
So sorry for this late reply. I no longer needed this to be completed actually. Just giving the points to thank you for the participation.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Python

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.