Steps to start app and start Hello world - displays plain file


#21

Hi Tracy
Well I went through all the steps in Chapter 3 and I had previously messed up. I think I ran start project or start app twice. Anyway that is fixed, but when I fo the steps in chapter 4 and look at my app, it is still displaying the html as text with the tags appearing as text instead of being interpreted as html tags. So I guess I will need to upload my stuff to GitHub for you to review and see if you get the same result. But I can’t do that until the weekend. I have other commitments over the next couple of evenings. I will get this to you and we can take it from there. Thanks for your analogy about the virtual environment. I got it now :)


#22

Hi again. I found a bit of time so I decided to send try to get my stuff to you on GitHub, but I am stuck! I have already installed git and I did git init. That worked. Now I am trying to create ,gitignore. From the terminal, I go to projects/myhellopwebapp (where I have manage py). I then type ‘touch .gitignore’ and press Enter. It returns to the command prompt. But the file does not appear in the directory. If I try to create the file by copying another file and renaming it in Finder, it tells me I cannot create file names beginning with a period. I also tried in terminal specifying sudo. It prompted for my password, but still did not create the .gitignore file. Can you tell me how to create this file? Thank you.


#23

Thanks for the reminder, I should mention that you can’t see files starting with “.” in the Finder or when you use ls in the terminal.

In the terminal, in your project (in the directory with manage.py — if you do ls -lah, do you see it now? :)


#24

Updated the git tips page! https://github.com/hellowebbooks/hellowebapp/tree/master/git-tips


#25

Hi Tracy,
Thank you so much for this. Yes I see .gitignore and I figured out hoe to edit it using $ open -t .gitignore.

So I will send you my stuff, but not right now. I am off to work, and tonight I have a band practise. Tomorrow I work and I think we are going out tomorrow for birthday celebration (mine and Karen’s - we both have birthdays this week), Saturday I have a gig with the band so I won’t get back to this until Sunday most likely.

Thanks for your help!
Steve


#26

Hi Tracy,
I created .gitignore and copied the content you provided in your link and saved it, then did the following, but it looks like it didn’t commit anything. Is this expected, OK? I tried first without virtual env and then I activated venv and tried again, but get the same result.

(Sorry for needing so much help, but I really appreciate your patience with me!)

Stevens-MacBook-Pro:myhellowebapp stevencooke$ git commit -a -m "First commit"
On branch master

Initial commit

Untracked files:
.gitignore
collection/
hellowebapp/
manage py

nothing added to commit but untracked files present


#27

In the future, it’s always helpful to send along screenshots, FYI. :D

Do git add . (See the note here under “The very basic, important commands”: git add [FILE]: Adds files to be tracked - new files aren’t tracked by default. You can add all new files using git add . rather than naming the individual files as well.) That’ll add files into git, that you then can commit.


#28

Tracy I think I did this right The list is https://github.com/sscooke/helloapp.git

Please let me know if you can see my stuff. Thanks, Steve


#29

Hey Steve, here’s your issue:

Note the different in the file from the correct version:

Somehow your editor (?) inserted a bunch of extra code? What editor are you using?


#30

Tracy,

Where did that come from? I am using the TextEditor program that comes with MacOS 10.13.2 High Sierra.
Attached is a screen shot to show you what I see using this editor (and my directory structure).

Where is all that code coming from? Not sure what to do next!

Steve


#31

That TextEditor is actually doing a bunch of stuff in the background. Go to the menu “Format” and tell it to “Change to Plain Text.”

I highly recommend using Sublime Text for editing your files instead: https://www.sublimetext.com/


#32

Tracy

That is so weird! OK I will try changing the format in TextEditor. I purchased and installed Sublime editor last night but ran out of time to try it out. I will try later and let you know if this solves my issues. Hopefully it does, but I am amazed to find out that a Text Editor would insert all that stuff!

Will keep you posted. Again thanks for perceviering with me and this issue!
Steve


#33

A lot of people really love Sublime so I think it’ll help you out in the long term! Good luck. :D


#34

Hi Tracy,
I still haven’t tried Sublime yet, but good news, in TextEdit I said use plain text. At first it failed because that caused TextEdit to rename index from html to txt. I changed the name back and presto! It worked!!! Yay!

So it was that nasty TextEdit program that was the problem all along. But now that I know about changing the format I can choose to use it or learn to use Sublime. Either way I will not be bothering you about this issue any more!!!

Thank you again so much for your perseverance and ultimately finding the issue and solution.
Steve


#35

Yay! Glad we figured it out. :)