我有不同的文件夹中的数据库播种器clases.当我写db:seed时,控制台显示以下错误:
[ReflectionException] Class DatabaseSeeder does not exist , Laravel Seeder
Run Code Online (Sandbox Code Playgroud)
一类是这样的:
namespace Database\Seeds;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
use TiposCompromisosTableSeeder;
class DatabaseSeeder extends Seeder {
/**
* Run the database seeds.
*
* @return void
*/
public function run()
{
Eloquent::unguard();
$this->call('TiposCompromisosTableSeeder');
}
}
Run Code Online (Sandbox Code Playgroud)
我的另一课是
namespace Database\Seeds;
use Illuminate\Support\Facades\DB;
use Illuminate\Database\Seeder;
use Illuminate\Database\Eloquent\Model;
class TiposCompromisosTableSeeder extends Seeder{
public function run(){
DB::table('tipos')->insert(array(
'nombre' => 'prioridad',
'tabla' => 'compromisos',
'str1' => 'baja',
'int1' => 1
));
}
}
Run Code Online (Sandbox Code Playgroud)
我试过用
composer dump-autoupload …Run Code Online (Sandbox Code Playgroud) 我正在为我的api设置文档,当我要求时(http:// localhost:8000/api/v0/docs /)该应用程序显示此错误:
NoReverseMatch at /api/v0/docs/
'api-docs' is not a registered namespace
Run Code Online (Sandbox Code Playgroud)
当试图这样做
<script src="{% url **'api-docs:schema-js'** %}"></script>
Run Code Online (Sandbox Code Playgroud)
这是我的urls.py文件:
from django.contrib import admin
from django.conf.urls import url, include
from django.contrib.auth.models import User
from . import views
from rest_framework import routers, serializers, viewsets
from rest_framework.documentation import include_docs_urls
# Routers provide an easy way of automatically determining the URL conf.
router = routers.DefaultRouter()
router.register(r'goals', views.GoalViewSet)
urlpatterns = [
url(r'^goals/$', include(router.urls)),
url(r'^docs/', include_docs_urls(title='My API title')),
]
Run Code Online (Sandbox Code Playgroud)
我将命名空间添加到include_docs_urls但它不起作用.(我已经安装了coreapi,pygments和markdown).
事先感谢帮助我.
我正在配置 svn 服务器,但是当我尝试结帐时,提示显示此错误:
svn: E200002: Unable to connect to a repository at URL 'svn://localhost/heartview'
svn: E200002: /home/factory/svn/repository/heartview/conf/svnserve.conf:20: Option Expected
Run Code Online (Sandbox Code Playgroud)
我的 svnserver.conf 文件说:
[general]
line 20 :anon-access = read
line 21 :auth-access = write
Run Code Online (Sandbox Code Playgroud)