tmpbook / django-with-vuejs

Fast and clear in DevOps.
MIT License
423 stars 108 forks source link

项目完整版源码 #11

Closed royzhao1978 closed 7 years ago

royzhao1978 commented 7 years ago

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

tmpbook commented 7 years ago

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

Xmas118 commented 7 years ago

Where is you 'dist' folder?

tmpbook commented 7 years ago

@Xmas118 just run npm run build in frontend directory

Xmas118 commented 7 years ago

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

tmpbook commented 7 years ago

@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';
}
Xmas118 commented 7 years ago

i'll try. thx