Django Newbe: What is the best way to go about creating groups? - django

I am trying to allow users to create their own groups, let other users(members) join the group. I would like to have some guidance on how to do this, any links or resources would be helpful. I have just deleted my first attempt, starting again. I will post some of my code later. In my last attempt I kept on getting the Error 404: no user matches the query. I already have my profiles app and UserLogin by email app built.
UPDATE:
Thanks all but I have figured it out, I used the pinax groups app to guide me and just customised certain areas.

Related

Issue trying to programmatically post messages to a private Facebook group using Graph API

I am trying to programmatically post messages to a private Facebook group. I plan to write the code to do this in Python. I would like to run the code from my laptop. I have seen multiple articles demonstrating how to write this code. I don't need help with that.
I am an Admin user in the private FB group.
The issue I have is the techniques described all depend on creating an app. This seems like overkill to me. I don't need a general-purpose app. I'd prefer not to go through the burden of getting an app approved.
Thus far, the only way I have seen to enable the required permissions to write messages to a group is by creating an app and adding that app to a group.
Is there a simpler way, that does not require writing an app, that then must be approved, when I don't need an approved general purpose app?
Thus far, I have not been able to post this question to the Facebook community. The webpage is throwing a cryptic error when I try to post.

Facebook graph api groups_access_member_info permission

I have install app to private group, after app preview app has following permissions:
groups_access_member_info
public_profile
email
Groups API
After app installation to group I'm able to call groupID/feed and I can see posts and comments that I have made (I'm group admin) including my user object. My goal is to see which user made comment with its id, name etc. In access token debugger it has all permissions. App is already in live mode with Business Verification. I tried to find answer in documentation but according to documentation app has all required permissions.I also tried to remove and install app again to group but it works the same way.
Is there any way how to deal with this issue ?
Thanks in advance

issue automatically adding members to google groups (G-suite) with Admin SDK

(I have done a search through the questions to see if I could find something on this, but have not found answers.)
I have two google groups through my G-suite and I want to automatically add people to both groups after they sign up for my club through a process on my website. I think this should be possible using:
https://developers.google.com/admin-sdk/directory/v1/guides/manage-group-members
I have gone into the API Console, created a new project, enabled the Admin SDKI API, and got an API key. However, I think I am running into the Authorization issue because we keep getting an error that the authorization token is missing.
I have tried using the OAuth 2.0 but I'm not sure if this should be "Internal" or "External". I'm not creating a whole app for someone to use - all I want to do is on the back end of the site take information that comes through when someone joins the club and automatically have them added to my google groups.
Is it possible for someone to please explain to me what I need to do?
I'm sorry this is kind of a basic question.
Thank you for your help.

Adding groups to django app

I'd like to add the capability for users to create their own groups and invite others to join the group (or leave the group) or for users to request access to a group to a django app.
The group in this case is basically a pool of potential players for a football match, from which the actual players will be chosen.
Is the standard django auth groups system the correct thing to use here or is there another way? I'd need it to be able to do invitations and stuff, obviously.
I can obviously write my own but is there another app out there that already does this kind of thing nicely?
If not, has anyone got any tips on how to go about this?
Creating your own model will give you more control to add extra information to those groups, such as the invitation system you described. The auth groups models was designed for classifying users by what level of control they have over the data on the website, which isn't what you want a groups model for. A new model will be much easier for you work with than trying to extend the existing groups model; which has built in functionality that you won't use, and probably has security features that will make it difficult to work with.

Django openid authentication issue when I changed the url domain of my site but kept the same database

I should first note that I am a newbie in python/django applications but I am trying hard to learn :)
I am working/experimenting on a django project that supports login through openid providers. So I was able to login through my google account with no problems.
Recently, I decided to change the url of my site but at the same time I kept the current database because I dont want to lose my data,users etc. After that point, I am not able to login to the application. This is the following scenario that happens all the time:
Try to login to my site
Site doesn't remember me and I am redirected to google server
I fill my credentials in google server
I am redirected to my site that complains that the user already exists
So, I don't know how to manage with this problem. Is there any workaround or a hack that I can do to my database that will solve this problem? When I browse to my database I find several tables that may be related:
django_authopenid_association, django_authopenid_nonce, django_authopenid_userassociation,django_authopenid_userpasswordqueu
One of the tables in my database (django_authopenid_association) contains the following data. Do you believe that If I reset anything there is going to help?
If you have any good advices/tips are more than welcome.
Thanx
I found a solution/temp hack that worked for me. Of course, this doesn't imply that my solution is the optimal nor that I recommend this to anyone else.
What I did is to create a second account to my application using the same gmail account but having different user name. Then, I edit the new entry in the django_authopenid_association table, copy paste the openid_url value and use it for my old user (database entry 1 in the screenshot of my question).
After that, since I was able to login with my old user, I delete from the database the new user and everything seems to work smoothly until now.