Hey Django community, I need some help from you,
There is two features that I don’t know how to implement in Django :
Just like Shopify does, I want to implement the multi-theme feature, for exemple the user will have his personal page, for exemple: domaine.com/username, where he can choose from premade themes (diffrent html and css but same data).
Give the user the oportunaty to buy a domain and link it, so his personal page will be hisdomain.com and not webapp’sDomain.com.
I know Django, it’s just I never done projects like that so am asking to have the knowledge to do it the right way.
Any explanations ?
Any online tutorials ?
Any packages ?
Thank you in advance.
- If the choice of themes is from a pre-defined set, you’ll need to find some way to specify which template / css / js to use for each page.
For example, in a typical page, you might render a page using a line that looks like this:
return render(request, 'somedir/sometemplate.html', context)
however, if you’ve got different templates based on some theme, you could set things up such that the previous line becomes:
return render(request, theme_name+'/some_dir/some_template.html', context)
(There are various ways to handle this, this is just one idea.)
- This is as much a deployment issue as a Django issue. Depending upon just how “different” you want those setups to be, you might want to take a look at the ‘Sites framework’