如何使用两个不同的芹菜项目,它消耗来自单个RabbitMQ安装的消息.
通常,如果我使用不同的rabbitmq,这些脚本可以正常工作.但是在生产机器上,我需要为它们共享相同的RabbitMQ后端.
注意:由于一些约束,我无法合并现有的新项目,因此它将是两个不同的项目.
我无法让django-grappelli工作.以下是我的所作所为 -
pip install django-grappelli
.grappelli
在' ' 之前在INSTALLED_APPS中添加了' django.contrib.admin
'.url(r'^grappelli/', include('grappelli.urls'))
在admin url之前添加了URL定义,即.url(r'^admin/', include(admin.site.urls))
syncdb
和collectstatic
命令.现在,当我运行命令runserver,并浏览localhost:8000/admin /时,令人惊讶的是我得到了默认的admin.
我在Google Chrome网络标签中检查了请求流量(在开发者工具中),我没有看到任何以Grappelli开头的网址请求.
我不知道我做错了什么.我在Windows 7机器上的virtualenv中使用Django 1.4.1-final.
在spring中,嵌入式ldap如何与spring-ldap模板一起使用.目前,我的配置是 -
<?xml version="1.0" encoding="UTF-8"?>
<beans xmlns="http://www.springframework.org/schema/beans"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:security="http://www.springframework.org/schema/security"
xsi:schemaLocation="http://www.springframework.org/schema/beans
http://www.springframework.org/schema/beans/spring-beans-3.1.xsd
http://www.springframework.org/schema/security
http://www.springframework.org/schema/security/spring-security-3.0.xsd">
<bean id="contextSource" class="org.springframework.ldap.core.support.LdapContextSource">
<property name="url" value="${PROVIDER_URL}" />
<property name="base" value="${Search_Base}" />
<property name="userDn" value="${SECURITY_PRINCIPAL}" />
<property name="password" value="${SECURITY_CREDENTIALS}" />
</bean>
<bean id="ldapTemplate" class="org.springframework.ldap.core.LdapTemplate">
<constructor-arg ref="contextSource" />
</bean>
</beans>
Run Code Online (Sandbox Code Playgroud)
ContextSource值在属性文件中可用.现在我想使用嵌入式ldap -
<security:ldap-server ldif="classpath:sample.ldif" root="cn=mojo"/>
Run Code Online (Sandbox Code Playgroud)
我将在LdapContextSource值中指定什么默认端口.