(tezst) des@des-desktop:~/job/$ pip install django-url-filter==0.3.0
Collecting django-url-filter==0.3.0
Downloading django_url_filter-0.3.0-py2.py3-none-any.whl
Collecting cached-property (from django-url-filter==0.3.0)
Downloading cached_property-1.3.0-py2.py3-none-any.whl
Installing collected packages: cached-property, django-url-filter
Successfully installed cached-property-1.3.0 django-url-filter-0.3.0
(tezst) des@des-desktop:~/job/$ pip install django-url-filter==0.2.0
Collecting django-url-filter==0.2.0
Downloading django-url-filter-0.2.0.tar.gz
Building wheels for collected packages: django-url-filter
Running setup.py bdist_wheel for django-url-filter ... done
Stored in directory: /home/des/.cache/pip/wheels/05/9a/80/4e2e9dacdb91607accafb71c72df59b561c5f51549f4da3e13
Successfully built django-url-filter
Installing collected packages: django-url-filter
Found existing installation: django-url-filter 0.3.0
Uninstalling django-url-filter-0.3.0:
Successfully uninstalled django-url-filter-0.3.0
Successfully installed django-url-filter-0.2.0
host_patterns = patterns('',
host(r'', settings.ROOT_URLCONF, name='www'),
host(r'(www\.)*(?P<subdomain>[0-9a-z\-]+)', 'base.urls', callback='base.callbacks.host_subdomains', name='subdomain-area'),
)
def host_subdomains(request, *args, **kwargs):
# ищим адрес сабдомена kwargs
class ProductColors(models.Model):
s = models.ForeignKey(Products)
colors = models.ManyToManyField(to=Colors)
class Colors(models.Model):
name = models.CharField(verbose_name="Название цвета")
[Desktop Entry]
Name=PyCharm
Comment=Среда разработки PyCharm
GenericName=PyCharm
Keywords=PyCharm;Python;Django;IDE;
Exec=/home/des/pycharm-root.sh
Terminal=false
Type=Application
Icon=/home/des/pycharm/bin/pycharm.png
#!/bin/bash
sudo -u root /home/des/pycharm/bin/pycharm.sh
des ALL=(ALL) NOPASSWD:/home/des/pycharm/bin/pycharm.sh
pip install django-cleanup