我在iOS App Storyboard中创建了一个Container View.我想在UICollectionView的一个单元格中水平翻页(就像Android的FragmentPager一样).但是,如果您在UICollectionViewCell中放入容器视图,则会发生错误:
故事板:错误:非法配置:容器视图不能放在运行时重复的元素中
ios fragmentpageradapter container-view uicollectionview uicollectionviewcell
我想使用 django_compressor 但它在我的生产环境中不起作用。
在开发 ( DEBUG=True) 中,它正在工作并创建了.sass-cache&CACHE文件夹。
我的settings.py是
DEBUG = False
TEMPLATE_DEBUG = False
INSTALLED_APPS = (
...,
'django.contrib.staticfiles',
'compressor',
'myapp',
)
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'com.app.static')?
STATICFILES_DIRS = (
os.path.join(BASE_DIR, 'static'),
)
STATICFILES_FINDERS = (
'django.contrib.staticfiles.finders.FileSystemFinder',
'django.contrib.staticfiles.finders.AppDirectoriesFinder',
'compressor.finders.CompressorFinder',
)
COMPRESS_ENABLED = True
COMPRESS_ROOT = STATIC_ROOT
COMPRESS_PRECOMPILERS = (
('text/x-scss', 'sass --scss {infile} {outfile}'),
)
MEDIA_URL = '/media/'
Run Code Online (Sandbox Code Playgroud)
scss 文件将模板目录放在 app.scss 文件中。
{% load staticfiles %}
{% load compress %}
<html> …Run Code Online (Sandbox Code Playgroud) 我想通过使用 pyenv 和 ansible 来安装 python3.x。
- name: install pyenv
git: >
repo=https://github.com/pyenv/pyenv.git
dest=/home/www/.pyenv
accept_hostkey=yes
become: yes
become_user: www
- name: enable pyenv
shell: |
echo 'export PYENV_ROOT="/home/www/.pyenv"' >> /home/www/.bashrc
echo 'export PATH="$PYENV_ROOT/bin:$PATH"' >> /home/www/.bashrc
echo 'eval "$(pyenv init -)"' >> /home/www/.bashrc
- name: install python
shell: pyenv install 3.4.3
Run Code Online (Sandbox Code Playgroud)
如何使用ansible安装python3.x?