https://github.com/noors312/bitrix
Python library for Bitrix
https://github.com/noors312/bitrix
bitrix24 django python3
Last synced: about 2 months ago
JSON representation
Python library for Bitrix
- Host: GitHub
- URL: https://github.com/noors312/bitrix
- Owner: noors312
- License: mit
- Created: 2018-11-04T14:58:28.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2018-11-10T08:39:55.000Z (over 6 years ago)
- Last Synced: 2025-03-20T15:46:00.565Z (2 months ago)
- Topics: bitrix24, django, python3
- Language: Python
- Homepage:
- Size: 19.5 KB
- Stars: 3
- Watchers: 0
- Forks: 1
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
DJANGO BITRIX
---
Python lib for BITRIX APIINSTALLING
---
`$ pip instlal bitrix`
#### CONFIGURE YOUR APP AND BITRIX
1) Create webhook in your Bitrix \

2) Copy your webhook url (exclude `profile/`)\

3) Create `BITRIX_WEBHOOK_URL` parameter in your `settings.py` and set equal to your webhook url
4) Thats's it!#### USAGE
You can use Bitrix24 class everywhere
1) As mixin
```python
from django.views.generic import View
from bitrix.main import Bitrix24class ClassBasedView(Bitrix24,View):
def do_someting(self):
"""
do something
"""
params = {
'key1':'value1',
'key2':'value2'
}
self.call_method("your method",params)
```
2) With `django.signals`
```python
from django.db.models.signals import post_save
from django.dispatch import receiver
from bitrix.main import Bitrix24@receiver(post_save, sender=YourModel, dispatch_uid="sell_levels")
def set_level(sender, instance, created, **kwargs):
"""
do something
"""
bx24 = Bitrix24()
params = {
'key1':'value1',
'key2':'value2'
}
bx24.call_method("method",params)```