<commit_before>from django.views import generic
from django.shortcuts import get_object_or_404
from notifications.models import Notification

class OpenNotification(generic.RedirectView):
    def get_redirect_url(self, *args, **kwargs):
        notification = get_object_or_404(Notification, pk=kwargs.get('pk'))
        notification.mark_as_read()

        return notification.target.get_absolute_url()<commit_msg>go to editing history tab when opening a notification<commit_after>from django.views import generic
from django.shortcuts import get_object_or_404
from notifications.models import Notification

class OpenNotification(generic.RedirectView):
    def get_redirect_url(self, *args, **kwargs):
        notification = get_object_or_404(Notification, pk=kwargs.get('pk'))
        notification.mark_as_read()

        return notification.target.get_absolute_url()+'#editing-history'
{'fraction_non_alphanumeric': 0.0843644544431946, 'fraction_numerical': 0.013498312710911136, 'mean_word_length': 5.641791044776119, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7433007', 'n_tokens_mistral': 250, 'n_tokens_neox': 234, 'n_words': 55}