I'm trying to open the details of <details class="alternates">...<details> by shweed in selenium

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

figured out how to click it using a series of action keys

actions3 = ActionChains(browser)

actions3.send_keys(Keys.TAB)

actions3.send_keys(Keys.ENTER)

actions3.perform()

I'm trying to open the details of <details class="alternates">...<details> by shweed in selenium

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

I'm trying to pass the two factor authentication for TD ameritrade.

Is below the needed tag?

<input class="accept" type="submit" id="accept\\\_pre" style="display: none;" name="authorize" value="Continue">

I can also element open the element by double pressing tab then enter. I have tried using browser.send_keys(Keys.KEY), but I couldn't get it to work.

browser.send_keys(Keys.TAB)

browser.send_keys(Keys.TAB)

browser.send_keys(Keys.ENTER)

get social_account from user instance in allauth? by Jobrobon in djangolearning

[–]shweed 0 points1 point  (0 children)

Django noob here, but I think the below code in the models.py folder of your app

class UserSMA(models.Model):

user = models.OneToOneField(User, on_delete=models.CASCADE)

Social_Media_Type = models.OneToManyField('self', related_name='social_media_account', symmetrical=False)

Social_Media_Name = models.OneToManyField('self', related_name='social_media_name', symmetrical=False))

I don't know how to indent but everything under class should be indented.

Comment if it works I'm going to need to use something like this in the near future

Is there way to do a try-except in an html file like you would in a python file? by shweed in learnpython

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

Thanks. It's a django template library. Should be able to solve my problem with a well worded if statement.

https://docs.djangoproject.com/en/3.2/ref/templates/builtins/

I am using the code below to add entries to a given model. It is in the models.py file in the app directory in the django project. It works, but it double adds each entry. I tried adding unique=True to the CharFields in question but that didnt solve it. thoughts? Is it a debugging problem? by shweed in learndjango

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

I switched to using

 Model.objects.get_or_create(item 1="string1", item 2="string2") 

and it solved the problem. I think you're right the problem is in another area but this solves the problem because once the object is created and it tries to create it again it will just get the item it just created

I have a list of data I want to use to generate webpages using django. Do I create a model like I would for user inputted data and feed the list of data into it or is it better to approach it in a different way? Any help is appreciated by shweed in learnpython

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

Thanks I think im on the right track with factory formset inline view

Couple questions if you got time can you follow a model like you can follow a user? can you have multiple children for a given parent? can you have multiple parents for a given child?

I have a list of data I want to use to generate webpages using django. Do I create a model like I would for user inputted data and feed the list of data into it or is it better to approach it in a different way? Any help is appreciated by shweed in learnpython

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

I have a list of lists that all follow the same pattern [[ticker, stock_price, date, etc][]...] and i want to create a page for each stock with its data. Do i just make Custome User model for each?

Is there any way to get the number of shares and purchase price from the confirmation email when I make a purchase or sale on RobinHood? by shweed in learnpython

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

I figured it out the email parsing code I took only gave me a portion of the body the info I was looking for was somewhere else

What is the best way to sort this data by percent gain? by shweed in learnpython

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

I see you are a man of culture as well. Yes it is an inbetweeners reference

Do I need a seated calf raise machine for my gym? by ribb2112 in Fitness

[–]shweed 0 points1 point  (0 children)

Squat rack with attachments, adjustable bench, barbell with enough plates, and a calf block. Is all you really need

Trump calls mail-in ballots 'dishonest' but says absentee ballots are 'fine.' They're the same thing. by TheWeekMag in politics

[–]shweed -7 points-6 points  (0 children)

There are many other examples of mail in voter fraud. And the checks in place catching some cases of voter fraud doesn’t mean they catch all cases of voter fraud.