I'm trying to use the calendar module in my Django views.py file. If I make the import at the top of the file, with the rest of my package imports, and call the monthrange function on the module, I get the following:
'function' has no attribute 'monthrange'
If however I import the module in my function, where I make use of monthrange it works fine.
This has left me scratching my head. Any ideas?