#69 No sample messages
Closed: complete 5 years ago by jflory7. Opened 5 years ago by chinmay.

The website is not showing sample messages, be it mobile or desktop website.


We will add some examples on the website. Thanks for the feedback :)
I will make the issue public, so Outreachy and GSoC students can work on it.

Metadata Update from @jonatoni:
- Issue private status set to: False (was: True)
- Issue tagged with: easyfix

5 years ago

Metadata Update from @jonatoni:
- Issue tagged with: help wanted, newcomers

5 years ago

May I work on this @jonatoni ? Thanks!

Metadata Update from @jonatoni:
- Issue assigned to kritisingh1

5 years ago

sure :) I assigned the issue to you.

Metadata Update from @jflory7:
- Issue untagged with: good first issue, help wanted
- Issue priority set to: waiting on assignee (was: awaiting triage)
- Issue tagged with: PASSED, difficulty - medium, improvement, type - backend, type - frontend, type - summer coding

5 years ago

Does this work locally or is it a configuration issue on the production environment? It would be a good idea to create some "test" packets and see if you can get them to appear at all in a local development environment.

It may be on the production side if none of the packages have been approved by the admin

Does this work locally or is it a configuration issue on the production environment? It would be a good idea to create some "test" packets and see if you can get them to appear at all in a local development environment.

This seems to be working on the local development environment. Here's a snapshot attached of the same.

Screenshot_from_2019-03-02_13-44-29.png

The templates and views in place to get this functionality running are working on the local development environment by following these two steps:

  1. Comment out import fedmsg and fedmsg.publish() [Line no 19 and 150 in views.py]
  2. Set the admin_approved_public model field for the message to True using shell.

On finding permanent fixes for the above:

  1. It's being addressed in #96.
  2. I don't see admin_approved_public being set anywhere in the local development environment after a message is approved by sender and recipient to be displayed in the archives. Where is this supposed to be set?
    The flow as I imagine should be to create a superuser ie admin and using the Django admin site, to set the permission. Configuring Django admin site would help in visualising and navigating models easily for newcomers too. Or else the permission could be set via command line as I did here.

@jflory7 Please let me know if Django Admin Site seems like a feasible idea, I'll be happy to address the same in a PR.
Also, should I send a PR adding the procedure for setting the packets approved by admin to get them displayed in the archives and sample messages in the docs?

Related to this ticket, @shraddhaag submitted #129 to fix this issue.

I don't see admin_approved_public being set anywhere in the local development environment after a message is approved by sender and recipient to be displayed in the archives. Where is this supposed to be set?

Good question. I understood this to be set by a site admin through the Admin Site, but I have never tried this myself. Were you able to access the Admin Site to set the flag on the Happiness Packet?

The flow as I imagine should be to create a superuser ie admin and using the Django admin site, to set the permission. Configuring Django admin site would help in visualising and navigating models easily for newcomers too.

This sounds right to me. :thumbsup:

Or else the permission could be set via command line as I did here.

@shraddhaag, how were you able to create a staff account locally to access the admin portal:

http://localhost:8000/drunken-octo-lama/

I couldn't figure this one. I did create a super user but it doesn't seem like that was enough.

Also, should I send a PR adding the procedure for setting the packets approved by admin to get them displayed in the archives and sample messages in the docs?

If this is not already happening, then yes, it should happen. It is not clear to me how upstream is doing this now, but it looks like the functionality works as designed on the happinesspackets.io website.

It's my first time looking into this part of the code, so I will be learning a little bit on this too. :book:

Good question. I understood this to be set by a site admin through the Admin Site, but I have never tried this myself. Were you able to access the Admin Site to set the flag on the Happiness Packet?

No I wasn't able to access the admin site even though I created a super user and checked through django shell, that is_staff is enabled. Yet it returns Please enter the correct username and password for a staff account. Note that both fields may be case-sensitive.

Also I don't see the models registered on django admin site (as there is no admin module in the app messaging). So even if we were able to login, I don't think if that would be enough to change permissions as desired.

I'll be sure to post my findings here. Thanks :)

@shraddhaag Hmm, tricky. I'm not sure why this is, but I have a feeling this will be part of a bigger issue. We should probably file a new issue to track the Admin Site functionality separately.

Theoretically, this ticket should be fixed, since this was tested manually by editing the database directly.

Sorry about the delay in response, I just came across this :sweat_smile:

@shraddhaag Hmm, tricky. I'm not sure why this is, but I have a feeling this will be part of a bigger issue. We should probably file a new issue to track the Admin Site functionality separately.

You're right. I'll open a new issue for the same, let's migrate the discussion on the new issue.

Theoretically, this ticket should be fixed, since this was tested manually by editing the database directly.

I agree. I think this ticket can be closed now :)

Metadata Update from @jflory7:
- Issue assigned to shraddhaag (was: kritisingh1)
- Issue marked as blocking: #157
- Issue set to the milestone: Summer Coding 2019: community bonding

5 years ago

Since #129 fixed this specific bug and we have #157 to track the Admin Site discussion, I'm closing this ticket as complete! :clapper:

Metadata Update from @jflory7:
- Issue close_status updated to: complete
- Issue status updated to: Closed (was: Open)

5 years ago

Login to comment on this ticket.