[Fixed]-How to get username part from example.com/username/gallery in case of ArchiveIndexView? 18 December 2023 by thecoderscamp.com 1 Your URL captures the username as slug, so you can get it from self.kwargs['slug']. Daniel Roseman Best way to create Django instances while manipulating/hiding fields from caller? Source:stackexchange.com