Readthedocs.org: Setup: Document the process of creating social networking connections

Created on 2 Jun 2016  路  12Comments  路  Source: readthedocs/readthedocs.org

Following http://docs.readthedocs.io/en/latest/install.html, once you have your local webserver running, if you follow the instructions on http://docs.readthedocs.io/en/latest/getting_started.html#import-your-docs (Go to your dashboard, click Import) you can end up with this:

image

Community Effort documentation stale

Most helpful comment

Thanks, @kwosie for the links - it helped my get my installation going..
Here's a bit of info on how i got it to work :

  1. Edit readthedocs/settings/base.py
    Add entry to the authentication backend section: 'allauth.account.auth_backends.AuthenticationBackend

AUTHENTICATION_BACKENDS = ( # Needed to login by username in Django admin, regardless ofallauth 'django.contrib.auth.backends.ModelBackend', #allauthspecific authentication methods, such as login by e-mail 'allauth.account.auth_backends.AuthenticationBackend', 'guardian.backends.ObjectPermissionBackend' )

  1. Start your installation
    I'm using port 80 and run in a private ip range: 10.39.89.210:80
    sudo python3 manage.py runserver 0.0.0.0:80

  2. Visit your RTD DJANGO Admin site :
    http://localhost:8000/admin
    http://<yourIP>:<PORT>/admin

    or http://10.39.89.210:80/admin for me :-)

  3. EDIT the SITES section

Visit the SITES section of the Django admin UI and modify the example.com domain to be your :

http://localhost:8000/admin/sites

Note: The ID of your site has to be the same as the SITE_ID key in
5readthedocs/settings/base.py ( it's SITE_ID = 1 by default) . You can check your site_id with sqlite3 :
cd readthedocs.org
sqlite3 dev.db
select * from django_site

If you choose to delete the example.com entry and add a new one, you have to edit the base.py file and change SITE_ID to the id of your site in the django_sites table.

  1. Example: connect github acccount
    First, head over to github and register a new OAuth application - you will retrieve a client id / client secret which you need for step 6:

    https://github.com/settings/applications/new

  2. Add a social account ( client id + secret ) to your RTD installation via the Django Admin UI

  • visit http://10.39.89.210/admin/socialaccount/ and click on a social account.
  • choose provider = github , enter client id and client secret
  • make sure you add "available site" : : and move this over to the chosen sites tab
  1. verify if it works by clicking connect github account in RTD UI.

This video helped me : https://www.youtube.com/watch?v=1yqKNQ3ogKQ&feature=youtu.be

thanks , good luck !

All 12 comments

This is a step required for allauth set up, there isn't a good way for us to automate this. Docs here are probably the best case.

2 years on, multiple issues stemming from this, and no progress. Amazing. I am sure someone would have added it to the documentation by now if we could figure it out. I have added a socialapp for gitlab with the keys and everything, migrated db, still same error.

Very ironic that a documentation software has poor documentation...

You completely missed my point.

I get your point, @jslay88. I think it could be phrased a bit nicer, though. I'd personally appreciate that; a lot of good work happens here, and a lot of us love this project. Slamming it isn't really all that useful.

We'd be super happy to work with you to write docs for this, if you're willing to do so and if you're stuck. It doesn't look like there's been a lot of interest in this, so far, which may have been why we haven't prioritized it. We'll fix this issue when we can, but other issues have a higher priority right now. The fastest way for this to be fixed would most likely be for you to suggest a pull request, which would really be great. Let us know if it's something you need help with, and will review the PR and try and help you land it.

I wasn't concerned about being nice when all I see to all the other issues that have been closed for this, have the same copy paste response without actually providing an answer. If there was actually a solution provided, you would have had no 'rude' comment, and instead, a PR.

As stated in my initial comment, I have no issue, nor do most of the others that have run into this problem, with adding it to the documentation, but there is NO posted solution for how to actually solve this problem. Therefore, due to chronological order of logic, I am unable to create a pull request, because I cannot produce working documentation, because there has been no provided solution....

This is after digging for about 2 hours, creating socialapps on the admin portal, linking things correctly as best as I can tell according to the other issues, which have not found a solution.

I understand that you're frustrated; but being nice is in the Code of Conduct, which defines how we interact on RTD. We want a friendly community. Please be respectful of our efforts. Rude comments don't make anyone happy, and unhappy people don't code well.

Regarding the issue: Ok. Let's ask one of the other maintainers (I don't personally know) - _what's the best way to get started with documenting this process?_ If we could get you some pointers for how to get started, then we should be able to solve the chicken-egg user-documentation problem you're mentioning.

@jslay88 the rtd team doesn't support custom installations and the respective documentation is maintained by the community (I know there are some users that already has his/her local rtd installation working). I only setup this in my development environment with this steps https://github.com/rtfd/readthedocs.org/issues/3573#issuecomment-362632502 but I'm not sure if that will work if you don't load the test_data.

That was the one (your comment specifically) that I followed. I have the test_data loaded from the get go. I have added the gitlab socialapp, provided the keys and callbacks, shutdown rtd server, made migrations, it showed changes related to gitlab, migrated, fired back up, same error, even after clearing caches. I have verified that I have it attached to the site as well.

Any more insight as to what is happening?

I also searched for a solution to this problem with no knowledge of Django. Found it's actually the allauth setup that is missing, and a tutorial with screenshots at allauth tutorial.
Furthermore, the allauth git repo has more info on additional auth providers: allauth github

Might be helpful to someone finding this issue.

Thanks, @kwosie for the links - it helped my get my installation going..
Here's a bit of info on how i got it to work :

  1. Edit readthedocs/settings/base.py
    Add entry to the authentication backend section: 'allauth.account.auth_backends.AuthenticationBackend

AUTHENTICATION_BACKENDS = ( # Needed to login by username in Django admin, regardless ofallauth 'django.contrib.auth.backends.ModelBackend', #allauthspecific authentication methods, such as login by e-mail 'allauth.account.auth_backends.AuthenticationBackend', 'guardian.backends.ObjectPermissionBackend' )

  1. Start your installation
    I'm using port 80 and run in a private ip range: 10.39.89.210:80
    sudo python3 manage.py runserver 0.0.0.0:80

  2. Visit your RTD DJANGO Admin site :
    http://localhost:8000/admin
    http://<yourIP>:<PORT>/admin

    or http://10.39.89.210:80/admin for me :-)

  3. EDIT the SITES section

Visit the SITES section of the Django admin UI and modify the example.com domain to be your :

http://localhost:8000/admin/sites

Note: The ID of your site has to be the same as the SITE_ID key in
5readthedocs/settings/base.py ( it's SITE_ID = 1 by default) . You can check your site_id with sqlite3 :
cd readthedocs.org
sqlite3 dev.db
select * from django_site

If you choose to delete the example.com entry and add a new one, you have to edit the base.py file and change SITE_ID to the id of your site in the django_sites table.

  1. Example: connect github acccount
    First, head over to github and register a new OAuth application - you will retrieve a client id / client secret which you need for step 6:

    https://github.com/settings/applications/new

  2. Add a social account ( client id + secret ) to your RTD installation via the Django Admin UI

  • visit http://10.39.89.210/admin/socialaccount/ and click on a social account.
  • choose provider = github , enter client id and client secret
  • make sure you add "available site" : : and move this over to the chosen sites tab
  1. verify if it works by clicking connect github account in RTD UI.

This video helped me : https://www.youtube.com/watch?v=1yqKNQ3ogKQ&feature=youtu.be

thanks , good luck !

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

cagataycali picture cagataycali  路  4Comments

gtalarico picture gtalarico  路  4Comments

boscorelly picture boscorelly  路  4Comments

JiaweiZhuang picture JiaweiZhuang  路  3Comments

humitos picture humitos  路  4Comments