Best Python code snippet using lemoncheesecake
urls.py
Source:urls.py
1from django.conf.urls import url2from django.contrib.auth.decorators import login_required, permission_required3from . import api4from . import views, products, subcategory_products5urlpatterns = [6 7 url(r'^$',permission_required('product.view_product', login_url='not_found')8 (products.view), name='product-list'),9 url(r'^list-paginate/$', products.paginate, name='product-list-paginate'),10 url(r'^list/search/$', products.search, name='product-list-search'),11 url(r'^(?P<pk>[0-9]+)/update/$', permission_required('product.change_product', login_url='not_found')12 (views.product_edit), name='product-update'),13 url(r'^(?P<pk>[0-9]+)/update/(?P<name>[\w\-]+)$', permission_required('product.change_product', login_url='not_found')14 (views.product_edit), name='product-update'),15 url(r'^(?P<pk>[0-9]+)/delete/$', permission_required('product.delete_product', login_url='not_found')16 (views.product_delete), name='product-delete'),17 url(r'^add/(?P<class_pk>[0-9]+)/$', permission_required('product.add_product', login_url='not_found')18 (views.product_create), name='product-add'),19 url(r'^add/$', permission_required('product.add_product', login_url='not_found')20 (views.product_create), name='product-add'),21 url(r'^product/data/$', permission_required('product.add_product', login_url='not_found')22 (views.product_data), name='product-data'),23 url(r'^fetch_variants/$', permission_required('product.view_product', login_url='not_found')24 (views.fetch_variants), name='fetch-variants'),25 url(r'^fetch_variants/real/$', permission_required('product.view_product', login_url='not_found')26 (views.fetch_variants32), name='fetch-variants32'),27 # tax routes28 url(r'^tax/$', permission_required('product.view_producttax', login_url='not_found')29 (views.tax_list), name='tax-list'),30 url(r'^tax/add$', permission_required('product.add_producttax', login_url='not_found')31 (views.tax_add), name='tax-add'),32 url(r'^tax/add/ajax$',33 views.tax_add_ajax, name='tax-add-ajax'), 34 url(r'^tax/delete/(?P<pk>[0-9]+)/$', permission_required('product.delete_producttax', login_url='not_found')35 (views.tax_delete), name='tax-delete'),36 url(r'^tax/edit(?P<pk>[0-9]+)/$', permission_required('product.change_producttax', login_url='not_found')37 (views.tax_edit), name='tax-update'),38 # end tax39 # purchase routes40 url(r'^purchase/$', permission_required('product.view_stock', login_url='not_found')41 (views.stocks), name='purchase-list'),42 # end purchase routes43 # search routes44 url(r'^search_ajax/$',45 views.search_product, name='search-product'),46 url(r'^search_sku/$',47 views.search_sku, name='search-sku'),48 url(r'^search_productclass/$',49 views.search_productclass, name='search-type'),50 # pagination51 url(r'^stocks/$', permission_required('product.view_stock', login_url='not_found')52 (views.stocks), name='stocks'),53 url(r'^stock_paginate/$', views.stock_paginate, name='stock_paginate'),54 url(r'^stock_pages/$', permission_required('product.view_stock', login_url='not_found')55 (views.stock_pages), name='stock_pages'),56 url( r'^stock_search/$', views.stock_search, name = 'stock_search' ),57 url(r'^stock_filter/$',58 views.stock_filter, name='stock_filter'),59 60 url(r'^product_pages/$',61 views.stock_pages, name='product_pages'),62 url(r'^product_filter/$',63 views.product_filter, name='product_filter'),64 # end search routes65 # url(r'^classes/$', permission_required('product.view_productclass', login_url='not_found')66 # (views.product_class_list), name='product-class-list'),67 url(r'^classes/$', permission_required('product.view_productclass', login_url='not_found')68 (views.class_list_view), name='product-class-list'),69 url(r'^classes/paginate/$', permission_required('product.view_productclass', login_url='not_found')70 (views.paginate_class_list), name='paginate-class-list'),71 url(r'^classes/search/$', permission_required('product.view_productclass', login_url='not_found')72 (views.search_class_list), name='search-class-list'),73 url(r'^classes/add/$', permission_required('product.add_productclass', login_url='not_found')74 (views.product_class_create), name='product-class-add'),75 url(r'^classes/refresh/$',76 views.refresh_producttype, name='refresh_producttype'), 77 78 url(r'^classes/add/new_window/(\d+)/$', permission_required('product.add_productclass', login_url='not_found')79 (views.product_class_create), name='product-class-add-new'),80 url(r'^classes/add/form32b/$', permission_required('product.add_productclass', login_url='not_found')81 (views.product_class_form32b), name='product-class-form32b'),82 83 url(r'^classes/(?P<pk>[0-9]+)/update/$', permission_required('product.change_productclass', login_url='not_found')84 (views.product_class_edit), name='product-class-update'),85 url(r'^classes/(?P<pk>[0-9]+)/delete/$', permission_required('product.delete_productclass', login_url='not_found')86 (views.product_class_delete), name='product-class-delete'),87 url(r'^subcategory/(?P<pk>[0-9]+)/$', permission_required('product.view_productclass', login_url='not_found')88 (subcategory_products.view), name='subcategory-products'),89 url(r'^subcategory/products/paginate/$', subcategory_products.paginate, name='subcategory-products-paginate'),90 url(r'^subcategory/products/search/$', subcategory_products.search, name='subcategory-products-search'),91 url(r'^(?P<product_pk>[0-9]+)/variants/(?P<variant_pk>[0-9]+)/$', permission_required('product.change_productvariant', login_url='not_found')92 (views.variant_edit), name='variant-update'),93 url(r'^have-variants/$', views.have_variants, name='have-variants'),94 url(r'^(?P<product_pk>[0-9]+)/variants/add/$', permission_required('product.add_productvariant', login_url='not_found')95 (views.variant_edit), name='variant-add'),96 url(r'^(?P<product_pk>[0-9]+)/variants/(?P<variant_pk>[0-9]+)/delete/$', permission_required('product.delete_productvariant', login_url='not_found')97 (views.variant_delete), name='variant-delete'),98 url(r'^(?P<product_pk>[0-9]+)/single/variants/(?P<variant_pk>[0-9]+)/delete/$', permission_required('product.delete_productvariant', login_url='not_found')99 (views.single_variant_delete), name='single-variant-delete'),100 101 url(r'^(?P<product_pk>[0-9]+)/variants/bulk_delete/', permission_required('product.delete_productvariant', login_url='not_found')102 (views.variants_bulk_delete), name='variant-bulk-delete'),103 url(r'^products_pdf/$', products.products_pdf, name='products_pdf'),104 url(r'^products_export_csv/$', products.products_export_csv, name='products_export_csv'),105 url(r'^(?P<product_pk>[0-9]+)/stock/(?P<stock_pk>[0-9]+)/$', permission_required('product.change_stock', login_url='not_found')106 (views.stock_edit), name='product-stock-update'),107 url(r'^stock/(?P<stock_pk>[0-9]+)/history$', permission_required('product.view_stock', login_url='not_found')108 (views.stock_history), name='stock-history'),109 url(r'^(?P<product_pk>[0-9]+)/stock/add/$', permission_required('product.add_stock', login_url='not_found')110 (views.stock_edit), name='product-stock-add'),111 url(r'^(?P<product_pk>[0-9]+)/product-stock/add/form/$', permission_required('product.add_stock', login_url='not_found')112 (views.stock_form), name='product-stock-add-form'),113 url(r'^(?P<product_pk>[0-9]+)/stock/add/$', permission_required('product.add_stock', login_url='not_found')114 (views.stock_edit), name='product-stock-add'),115 url(r'^(?P<product_pk>[0-9]+)/stock/add/refresh$', permission_required('product.add_stock', login_url='not_found')116 (views.stock_fresh), name='refresh-stock-table'), 117 url(r'^(?P<product_pk>[0-9]+)/stock/(?P<stock_pk>[0-9]+)/delete/$', permission_required('product.delete_stock', login_url='not_found')118 (views.stock_delete), name='product-stock-delete'),119 url(r'^(?P<product_pk>[0-9]+)/stock/bulk_delete/', permission_required('product.delete_stock', login_url='not_found')120 (views.stock_bulk_delete), name='stock-bulk-delete'),121 url(r'^add_stock_ajax/$',122 views.add_stock_ajax,name='add_stock_ajax'),123 url(r'^(?P<product_pk>[0-9]+)/delete/single/stock/(?P<stock_pk>[0-9]+)/delete/$', permission_required('product.delete_productvariant', login_url='not_found')124 (views.single_stock_delete), name='single-stock-delete'),125 url(r'^re_order/$',126 views.re_order,name='re_order'),127 url(r'^re_order/pagination/$',128 views.reorder_pagination,name='reorder_pagination'),129 url(r'^re_order/search/$',130 views.reorder_search,name='reorder_search'),131 url(r'^re_order/form/(?P<pk>[0-9]+)$',132 views.re_order_form,name='re_order_form'),133 url(r'^re_order/form/item/(?P<pk>[0-9]+)$',134 views.add_reorder_stock,name='reorder_stock'),135 url(r'^re_order/request/$',136 views.request_order,name='request_order'), 137 138 url(r'^(?P<product_pk>[0-9]+)/images/(?P<img_pk>[0-9]+)/$', permission_required('product.change_productimage', login_url='not_found')139 (views.product_image_edit), name='product-image-update'),140 url(r'^(?P<product_pk>[0-9]+)/images/add/$', permission_required('product.add_productimage', login_url='not_found')141 (views.product_image_edit), name='product-image-add'),142 url(r'^(?P<product_pk>[0-9]+)/images/(?P<img_pk>[0-9]+)/delete/$', permission_required('product.delete_productimage', login_url='not_found')143 (views.product_image_delete), name='product-image-delete'),144 url('^(?P<product_pk>[0-9]+)/images/reorder/$', permission_required('product.change_productimage', login_url='not_found')145 (api.reorder_product_images), name='product-images-reorder'),146 url('^(?P<product_pk>[0-9]+)/images/upload/$', permission_required('product.add_productimage', login_url='not_found')147 (api.upload_image), name='product-images-upload'),148 # url(r'attributes/$', permission_required('product.view_productattribute', login_url='not_found')149 # (views.attribute_list), name='product-attributes'),150 url(r'attributes/$', permission_required('product.view_productattribute', login_url='not_found')151 (views.view_attr), name='product-attributes'),152 url(r'attributes/paginate/$', permission_required('product.view_productattribute', login_url='not_found')153 (views.paginate_attr), name='attr_paginate'),154 url(r'new-attribute/$', views.new_attribute,name='new-attribute'),155 url(r'attributes/search$',156 views.search_attribute, name='search-attribute'),157 url(r'attributes/add/new/$',158 views.add_new_attribute, name='add-new-attribute'),159 url(r'attributes/(?P<pk>[0-9]+)/add/ney/$',160 views.add_new_attribute, name='edit-new-attribute'),161 162 url(r'attributes/(?P<pk>[0-9]+)/$', permission_required('product.change_productattribute', login_url='not_found')163 (views.attribute_edit), name='product-attribute-update'),164 url(r'attributes/add/$', permission_required('product.add_productattribute', login_url='not_found')165 (views.attribute_edit), name='product-attribute-add'),166 url(r'attributes/add/modal/$', permission_required('product.add_productattribute', login_url='not_found')167 (views.attribute_add_modal), name='product-attribute-add-modal'),168 url(r'attributes/(?P<pk>[0-9]+)/delete/$', permission_required('product.delete_productattribute', login_url='not_found')169 (views.attribute_delete), name='product-attribute-delete'),170 url(r'attr_list/$',views.attr_list,name="attr_list"),171 url(r'attr_list/form32b/$',views.attr_list_f32b,name="attr_list_f32b"),172 url(r'attr_list/form32d/$',views.attr_list_f32d,name="attr_list_f32d"),173 url(r'add-attributes/ajax/$',views.add_attributes,name="add-attributes"),174 url(r'attributes/ajax_add/$',175 views.attribute_add, name='product-attr-add'),176 url(r'attributes/ajax_add/(\d+)/$',177 views.attribute_add, name='product-attr-add-value'),178 179 url(r'stocklocations/$', permission_required('product.view_stocklocation', login_url='not_found')180 (views.stock_location_list), name='product-stock-location-list'),181 url(r'stocklocations/pagiante/$', views.stock_location_pagination, name='product-stock-location-paginate'),182 url(r'stocklocations/search/$', views.stock_location_search, name='product-stock-location-search'),183 url(r'stocklocations/add/$', permission_required('product.add_stocklocation', login_url='not_found')184 (views.stock_location_edit), name='product-stock-location-add'),185 url(r'stocklocations/(?P<location_pk>[0-9]+)/$', permission_required('product.change_stocklocation', login_url='not_found')186 (views.stock_location_edit), name='product-stock-location-edit'),187 url(r'stocklocations/(?P<location_pk>[0-9]+)/delete/$', permission_required('product.delete_stocklocation', login_url='not_found')188 (views.stock_location_delete), name='product-stock-location-delete'),189 url(r'update/stock/data/$', permission_required('product.view_stock', login_url='not_found')190 (views.purchase_data), name='update-stock-purchase-data'),...
not_found.py
Source:not_found.py
...4# Created by: PyQt5 UI code generator 5.11.35#6# WARNING! All changes made in this file will be lost!7from PyQt5 import QtCore, QtGui, QtWidgets8class Ui_not_found(object):9 def setupUi(self, not_found):10 not_found.setObjectName("not_found")11 not_found.resize(400, 433)12 icon = QtGui.QIcon()13 icon.addPixmap(QtGui.QPixmap(":/Alien.png"), QtGui.QIcon.Normal, QtGui.QIcon.Off)14 not_found.setWindowIcon(icon)15 not_found.setStyleSheet("QDialog{background-color: rgb(213, 213, 213);}")16 self.label = QtWidgets.QLabel(not_found)17 self.label.setGeometry(QtCore.QRect(70, 40, 261, 31))18 font = QtGui.QFont()19 font.setPointSize(12)20 font.setBold(True)21 font.setWeight(75)22 self.label.setFont(font)...
Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.
You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.
Get 100 minutes of automation test minutes FREE!!