tmpbook/django-with-vuejs

项目完整版源码

royzhao1978 opened this issue · 6 comments

你好,目前在代码库中的代码只是框架,不知道能否提供项目完整版源码?

@royzhao1978 我只是演示了如何结合,并没有什么项目呀

Where is you 'dist' folder?

@Xmas118 just run npm run build in frontend directory

TEMPLATES.DIRS 's value is dist path So must execute 'run build' every time to see the results?

@Xmas118 you can execute run dev to see the results,if you want exchange data with django, you can use the full path like http://127.0.0.1:8000/query just like this below:

if (process.env.NODE_ENV === 'production') {
    base = '';
} else {
    base = 'http://localhost:8000';
}

i'll try. thx