我正在为我父亲的公司创建一个帐户管理应用程序。我像这样将Django与电子集成在一起:
mainWindow.loadURL('http://localhost:8000')
在package.json
中:
"start": "start python manage.py runserver && start electron ."
在我的 createView,DetailView,DeleteView 中。我添加了这个:
success_url = reverse_lazy('home')
如果我在chrome浏览器中打开它,则可以正常工作,不用担心。 但是如果我在电子中做到这一点。它显示了此味精
有人可以帮我吗?
答案 0 :(得分:0)
您在这里@Shahul Hameed
~~所有进口~~
class EntryListView(ListView):
model = Entries
template_name = 'accounts/home.html'
class EntryDetailView(DetailView):
model = Entries
class EntryCreateView(CreateView):
model = Entries
fields = [~~All fields~~]
success_url = reverse_lazy('home')
class EntryUpdateView(UpdateView):
model = Entries
fields = [~~All fields~~]
success_url = reverse_lazy('home')
class EntryDeleteView(DeleteView):
model = Entries
success_url = reverse_lazy('home')