This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Assumptions: | |
We use Django ORM | |
get_language() method returns the locale string | |
products is a list of dictionaries | |
""" | |
# All other previous imports come here | |
# ... | |
from django.db.models import Value, IntegerField, F |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
celery flower --address=127.0.0.1 --url_prefix=flower --broker=<broker url> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from datetime import timedelta | |
from django.utils import timezone | |
from transaction.models import PurchaseBaseModel, PurchaseSmartTone | |
from users.utils import check_charkhune_subscription | |
from utils.USDP_handler import user_inbox, active_deactive_tones, order_tone, \ | |
set_tone | |
from utils.formats import clean_phone_number, extract_person_ids, get_tone_id | |
from utils.irancell import safe_call, hide_tone_file |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
LOGGING = { | |
'version': 1, | |
'filters': { | |
'require_debug_true': { | |
'()': 'django.utils.log.RequireDebugTrue', | |
} | |
}, | |
'handlers': { | |
'console': { | |
'level': 'DEBUG', |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
# -*- coding: utf-8 -*- | |
import locale | |
import os | |
import re | |
import sys | |
# replace with the actual path to the bing-desktop-wallpaper-changer folder | |
path_to_Bing_Wallpapers="/home/hosein/Downloads/bing-desktop-wallpaper-changer-master/bin" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This file has been auto-generated by i3-config-wizard(1). | |
# It will not be overwritten, so edit it as you like. | |
# | |
# Should you change your keyboard layout some time, delete | |
# this file and re-run i3-config-wizard(1). | |
# | |
# i3 config file (v4) | |
# | |
# Please see http://i3wm.org/docs/userguide.html for a complete reference! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.uix.screenmanager import ScreenManager, Screen | |
from kivy.lang import Builder | |
from kivy.app import App | |
#from kivy.uix.popup import Popup | |
#from kivy.uix.label import Label | |
from kivy.core.audio import SoundLoader | |
Builder.load_string(''' | |
<MenuPage>: | |
BoxLayout: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from kivy.app import App | |
from kivy.uix.screenmanager import ScreenManager, Screen | |
from kivy.core.audio import SoundLoader,Sound | |
from kivy.lang import Builder | |
Builder.load_string(''' | |
<MenuPage>: | |
BoxLayout: | |
orientation:'vertical' | |
Button: | |
text:'play' |