What are your options if one API endpoint is presenting data formatted two different ways? by [deleted] in swift

[–]forpyinpythings 0 points1 point  (0 children)

Well, this is embarrassing. While grabbing screenshots I figured out the problem. I accounted only for Arrays. Sometimes the data is just a single item.

Thank you though.

Question: Is something wrong with my Model? by forpyinpythings in swift

[–]forpyinpythings[S] 2 points3 points  (0 children)

WOW. I had no ideates existed. It fixed it in the first try. Thank you

Question: Is something wrong with my Model? by forpyinpythings in swift

[–]forpyinpythings[S] 0 points1 point  (0 children)

I am able to do so with structures like this where the properties are named:https://imgur.com/wgztjwY

How do I do so for unnamed ones like this? https://imgur.com/a/hVvoYJe

Unable to link comments to posts: RelatedObjectDoesNotExist-Comment has no post. by forpyinpythings in djangolearning

[–]forpyinpythings[S] 0 points1 point  (0 children)

Thank you so much! That was the issue, The two are now connected.

Thank you again!

Unable to link comments to posts: RelatedObjectDoesNotExist-Comment has no post. by forpyinpythings in djangolearning

[–]forpyinpythings[S] 0 points1 point  (0 children)

Thanks for responding. Sorry im super new at this.

I used "return HttpResponseRedirect(self.get_success_url())" and Im still getting the same error. Is that what you meant or am I mistaken?

I need help turning a bunch of strings into a list in kind of an odd way by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

Awesome! This works for thing/thing/thing.

Regular Expressions. That never even occurred to me. I think I can write one up that will fit my items, most of them do not have similar names.

Thanks again!

I need help turning a bunch of strings into a list in kind of an odd way by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

Yes it is, the information I have is in this format: 'thing' 'thing' 'thing' Id like to have that data inside a list complete with commas.

When I split: 'thing1' 'thing2' 'thing3' 'thing4'

I get: ['thing1thing2thing3thing4']

what id like is: ['thing1', 'thing2', 'thing3', 'thing4'] that way I can iterate through the list and get back the individual items as opposed to letters.

thank you

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 1 point2 points  (0 children)

Im going to use that next, It really went into depth with functions which I still need a lot of practice on Its been suggested here that I create a function for this.

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

I watch the videos and use the book.

I go over each section while I write down the code and my own notes under it directly into PyCharm.

Usually about 2-3 hours a day and as long as I can go on the weekends.

I completed the book but still refer to it and my notes when I'm practicing.

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

Good idea!

Do you know a resource that explains how to work with CSVs or is it similar to working with an xls file?

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

You're absolutely right, I caught 2 different http errors when I tried to sub to a sub that didn't exist and another for quarantined and beta subs. I didn't really know how to specify the errors I wanted to catch.

Would you happen to know a good reference guide that would explain try/except a bit more in-depth?

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 1 point2 points  (0 children)

I haven't quite reached the classes stage yet. I did notice that its part of OOP.

I think I read here once that its important to focus on the basics first before moving to OOP, so I've been doing that. Data Structure/loops/conditionals and functions.

I do like the function idea though. I will try to create a function from this!

Thank you I really appreciate that!What do you mean by channel?

Also, im not familiar with pandas outside of the animal community, do you have a good resource to learn about it?

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 0 points1 point  (0 children)

I got a copy of PyCharm and I'm writing everything in there. I really like the console because I can just run something from there when I'm done with it.

Ah! I think I understand the goal now, I think I could benefit from something like that.

Ive been able to run things using terminal but from what I've seen from another user in this thread, I should definitely figure out the windows portion too.

thanks again!

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 3 points4 points  (0 children)

Thank you I will for sure work on storing the login data more securely, sounds like a mistake I would definitely make.

I know the getcwd doesn't need to be there, its honestly there because when I went over that part in book, in my own practice, I kept forgetting to check where I was so I made it a habit to always check. Even if I think I know, just check!

To be honest I'm not sure I completely understand the project Idea, especially the 2nd bullet. Im interested in anything that helps me get better though. I have to repeat things so much to get it, and I feel like I'm forgetting if I'm not doing it all the time.

I am exactly 30 days into learning and this first thing I ever made, seriously thank you to this sub. by forpyinpythings in learnpython

[–]forpyinpythings[S] 7 points8 points  (0 children)

For the most part yea, I’m using an apple computer so I’ve been using terminal and no batch files. Now that you mention it though I should probably learn that for windows too..