[Django] Applying changes done to views.py immediately on Hostgator

Assumptions

You installed Django using Fcgi on Hostgator using their tutorial
https://support.hostgator.com/articles/django-with-fastcgi

To get the changes you just did to your views.py to be applied immediately to the deployed django application on hostgator .. Here are the steps:

  1. Use SSH to execute the following commands. (How to get your SSH to work)
  2. Get the processes of the current user
    ps -u CPANEL_USERNAME
  3. If your FCGI file name is index.fcgi, you should find it available in the list that the previous command showed. If not, then no process is currently running. Just visit your website now and the changes will be applied.
  4. If you find your index.fcgi file in the list, copy its ID (the 4-5 digits number that appears on the left).
  5. Finally, kill the process
    kill ID_YOU_GOT_IN_STEP_4
  6. Visit your website now, changes should be applied by now.

Technically speaking, when someone visits your django application on hostgator, FCGI process runs. This is done because of the htaccess file you create. The python files are compiled and ran in a, and i am quoting the FCGI website, a persistent isolated process. If people keep on visiting your website, the process will keep on running. If you make changes, they’re not compiled again because you have to wait till the current FCGI process ends. All we do here is to kill the running process and that will lead to compiling our code again, hence applying the changes.

If the application is private and no one, with you excluded, is visiting it yet .. Just wait for about 10 minutes for changes to be applied without refreshing or visiting the application. This way, the process will end and a new visit will compile the new code.

I don’t know yet the drawbacks of this but it’s perfect for the small application that I am working on now. Good luck!

20 thoughts on “[Django] Applying changes done to views.py immediately on Hostgator

  1. Moving click here on to polishing and compounding.
    Branding is now click here an entire species goes extinct.
    You do have click here to wear. When it comes to a closet tour but I’m using it and a Happy New Year.

    Choose your style, but, it doesn’t shift, then measure it.
    Take these pair of scissors, a customer facing job, not because 19 is my lucky socks.

    Name labels aren’t just limited to kids uniforms, they tend to migrate through designs.

  2. Greazte ρieces.Keep posting such kind of info on yourr site.
    Im reallʏ impressed by your blog.
    Hі there, You’ve done an incredible job. I’ll definitely digg it and
    personally suggest to my friends. I amm confident they will
    be benefited from this site.

  3. Years ago when so many anglers used milk protein baits these were mostly used in small amounts
    because they normally worked very fast and effectively compared to
    other baits of the time and it was just not necessary to pile in loads and loads of bait to catch loads of big fish.
    Research in in Australia tested the things of fish smear with oil solar energy advantages and disadvantages (g3t.nl) implementation on body fat arrangement.
    To break into such a safe, if a thief knows where the bolts are located
    on the door, he just has to drill through and hammer on the bolts to make them recede.

  4. Packaging:5This is about as standard as it
    gets – a 5 hour energy shaped bottle with a wrap.
    If lightning and thunder occur at the same time then it means that the lightning
    is definitely very close. You, nobody else but you alone,
    have got to pull yourself up and move on with your life.

  5. You can adopt their styles to suit yours; this is one of the best ways to determine the right fashion for
    you. It compares the design of vintage motorcycles to today’s models.
    Fresh pairs of UGG products arrive in latest designs and fake boots are replicas of these originals.

  6. Admiring the time and effort you put into your blog and in depth information you present.
    It’s nice to come across a blog every once in a while that isn’t
    the same unwanted rehashed material. Excellent read!
    I’ve bookmarked your site and I’m adding your
    RSS feeds to my Google account.

  7. Offering this resort one celebrity is an over statement;
    The lift acquired stuck; the room was horrendous- smelled
    like a water sewerage. After reviewing a ton of adverse evaluations I still picked remaining here generally for the place which
    is wonderful and you can not shed with walgreens right across the street.

    Massive lobby when we walked in a more so renowned hotel.

  8. So, it is necessary that you plan your shoe budget before buying one.
    Media doesn’t really know how to handle it and this was never more clear when we saw the
    Vogue Italia cover for June 2011. Toe Size:
    The right shoe will not only fit well but will also be flexible in the toe area, with enough space for your
    feet to relax, without being pinched in very tight.

  9. It is not better to select high-heeled shoe,
    if you are an obese. Thread and stitching – thread used in stitching is always the same as the
    colour of the leather. Toe Size: The right shoe will not only fit well but will also be flexible in the toe area, with enough space for your feet to relax,
    without being pinched in very tight.

  10. Most of the girls are choosing the basic sheepskin slip shoes,
    as they are comfortable and stylish. All footwear at Bourne is hand-crafted especially by Opanka construction and the use of adhesives and machinery is minimal while creating the shoes, thus making the designs eco-friendly.

    1990’s – Bra became a highlight on women’s wardrobe.

  11. So, it is necessary that you plan your shoe budget before buying one.
    All footwear at Bourne is hand-crafted especially by Opanka construction and the use of adhesives and machinery is minimal while creating
    the shoes, thus making the designs eco-friendly. Toe Size: The right shoe
    will not only fit well but will also be flexible in the toe area,
    with enough space for your feet to relax, without being pinched in very tight.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>