Splunk Dev

Why Django framework app service.username returns an empty string?

i2sheri
Communicator
@render_to('blah.html')
@login_required
def some_fun(request):
    service = request.service
    username = service.username
    #username returned here is '' i.e., empty string
0 Karma
1 Solution

i2sheri
Communicator

Below line gives the username

username = request.user.username

View solution in original post

0 Karma

i2sheri
Communicator

Below line gives the username

username = request.user.username

0 Karma
Get Updates on the Splunk Community!

Webinar Recap | Revolutionizing IT Operations: The Transformative Power of AI and ML ...

The Transformative Power of AI and ML in Enhancing Observability   In the realm of IT operations, the ...

.conf24 | Registration Open!

Hello, hello! I come bearing good news: Registration for .conf24 is now open!   conf is Splunk’s rad annual ...

ICYMI - Check out the latest releases of Splunk Edge Processor

Splunk is pleased to announce the latest enhancements to Splunk Edge Processor.  HEC Receiver authorization ...