Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
How can I get all Django groups and optionally get associated user record?
This should be pretty simple since it's very simple with pure SQL. I have the following query which gets exactly what I want in Django: SELECT auth_group.id, auth_group.name, auth_user.username FROM auth_group LEFT JOIN auth_user_groups ON auth_group.id = auth_user_groups.group_id LEFT JOIN auth_user ON auth_user_groups.user_id = auth_user.id WHERE auth_user.id = 3 OR auth_user.id IS NULL; How can I get this result using the ORM properly? -
How to stop the user from being able to submit all other Django forms once a specific form is submitted?
I am trying to create an e-commerce site (CS50 Project 2) that allows its users to make comments, bids, and add listing items to their watchlists. I want the user who created the listing to be able to close the listing so that the winner (highest bidder) is displayed and no other of the forms will work (I also want to delete the listing from the watchlist). Currently, when the user who created the listing closes the listing, it saves (because it is a Django model), but the forms do not disappear, the listing does not delete off the watchlist, and the messages do not appear. How do I fix this? (I think it has to do with the if statement.) views.py @login_required(login_url='login') def listing(request, id): #gets listing listing = get_object_or_404(Listings.objects, pk=id) #code for comment and bid forms listing_price = listing.bid sellar = listing.user comment_obj = Comments.objects.filter(listing=listing) #types of forms comment_form = CommentForm() bid_form = BidsForm() #watchlist_form = WatchListForm() #closelisting_form = CloseListingForm() #close listing code if sellar == request.user: closeListingButton = True else: closeListingButton = False closeListing = '' try: has_closed = get_object_or_404(CloseListing, Q( user=request.user) & Q(listing=listing)) except: has_closed = False if has_closed: closeListing = False else: closeListing = True … -
Django creating a new model for genre or include it in book model?
I have a book model and every book has a genre. I'm confused if 1) I should create a new Model for genre then create a many to one relationship between book and model..... or 2) should I just include genre as a field in the Book model? If I wanted to get all books for a specific genre would using 1) make the search faster/more efficient since I could get all the books associated with a genre object? Because If I use 2) I would have to filter through every book to see if it has the specified genre. -
display a json through a GET request in django permission denied
I'd like to display the contents of a JSON file through a GET request. In views.py I use a GET request to open data2.json. The file is in the same directory as views.py. But I get the following error: File "C:\Users\Kaik\Documents\djangoPractice\shopping_cart\api_app\views.py", line 134, in get with open(pdfPath2,"r") as file: PermissionError: [Errno 13] Permission denied: 'C:\\Users\\Kaik\\Documents\\djangoPractice\\shopping_cart\\api_app' [12/Jun/2022 11:14:04] "GET /study/data2.json HTTP/1.1" 500 90058 Here is the GET in views: from django.views import View from django.http import JsonResponse import json from shopping_cart import settings from .models import CartItem from django.utils.decorators import method_decorator from django.views.decorators.csrf import csrf_exempt from . import studyduck_all from . import iniStudyduck from iniStudyduck import initiateDuck import os def get(self, request, pdfname): path = os.getcwd() pdfPath = os.path.join(path, 'api_app') pdfPath2 = os.path.join(settings.MEDIA_ROOT, 'textfile.txt') jsonData = '' with open(pdfPath2,"r") as file: jsonData = json.load(file) return JsonResponse(jsonData) Here is my SETTINGS: """ Django settings for shopping_cart project. Generated by 'django-admin startproject' using Django 2.2.5. For more information on this file, see https://docs.djangoproject.com/en/2.2/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/2.2/ref/settings/ """ import os # new from pathlib import Path # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) print("HERE IS THE BASE DIR ", BASE_DIR) … -
Geodjango: different geometry fields in a single leaflet map
I have two geometry fields in a model, a PointField and a PolygonField. class Site(models.Model): name = models.CharField(max_length=254) location = models.PointField(null=True, blank=True) surrounding_polygon = models.PolygonField(null=True, blank=True) When I load this model into a form, two maps appear, one for each geometry field. How can I put both the Point and Polygon in a single map on the form, and then save the information in their respective fields? I am using the leaflet map. -
Django simple upload function
Getting this error: Exception Type: AttributeError Exception Value: 'InMemoryUploadedFile' object has no attribute 'save' When trying to have a Django function as simple as: def upload(request): file = request.FILES["picture"] file.save("hello.png") return HttpResponse("done uploading") Note: I know there is a longer way to make this simple procedure but I need it for now to be as simple as this one -
Django intersection between two ranges of hours
I am trying to do an intersection between two ranges of hours. As an example let's say we have: current user interval -> 09:30 - 12:30 other user in database -> 10:30 - 14:30 What I am trying to do is actually have a match between my current interval and other users in the database, returning me not only the user BUT also an extra field "available: 2 hours" My code: related_users = UserProfile.objects\ .filter( Q(start_date="9:30") & Q(end_date="12:20") )\ .exclude(user_id=current_user_profile.id) How could I do this intersection? thanks -
bool object is not callable
I am trying to get the user order but I got the following error bool object is not callable. How can I solve this problem? django version 4.0.5 def shop(request , id): blog = Blog.objects.get(id = id) user = request.user if blog.number > 0 : if user not in blog.cart.all() : if request.method == 'POST' : try: orders = Order.objects.get(user = user , current=True) except: orders = Order.objects.create(user=user) orders.save() order = Order.objects.get(user = user , current=True) color = request.POST['color'] size = request.POST['size '] form = Num(request.POST) if form.is_valid(): num = form.cleaned_data['num'] nums = Num.objects.create(num=num , model=blog) item = OrderItem.objects.create(blog=blog , num=num , order=order , color=color , size=size) item.save() blog.number -= num blog.save() blog.cart.add(user) form = Num() return redirect('blog:detail' , id) return redirect('blog:list') -
Upload and process csv in Django
I want to upload a csv file in django. API enabled to receive a csv, clean and structure the data, and return it in the call. Have another API that says something interesting about the data it has received. Here the top 3 lines of the csv: enter image description here 2022-06-07 07:10:58.314000,"{""data"": {""Sensor settings"": null}, ""offset"": {""Sensor settings_offset"": null}}" 2022-06-07 07:15:58.495000,"{""data"": {""Co2"": 152, ""Light"": 200, ""Humidity"": 0.47, ""Temperature"": 27.4, ""Motion (PIR)"": 0}, ""offset"": {""Co2_offset"": 0, ""Light_offset"": 0, ""Humidity_offset"": 0, ""Temperature_offset"": 0, ""Motion (PIR)_offset"": 0}}" 2022-06-07 07:25:58.303000,"{""data"": {""Co2"": 166, ""Light"": 195, ""Humidity"": 0.48, ""Temperature"": 27.3, ""Motion (PIR)"": 8}, ""offset"": {""Co2_offset"": 0, ""Light_offset"": 0, ""Humidity_offset"": 0, ""Temperature_offset"": 0, ""Motion (PIR)_offset"": 0}}" -
Why Django admin page redirected you too many times
This is my main urls file from django.contrib import admin from django.urls import path,include from . import views urlpatterns = [ path('',views.apiOverview), path('admin/', admin.site.urls), path('academy/', include('academy.urls')), path('administration/', include('administration.urls')), ] this code working fine in localhost, but when i run it in online server works other endpoints correctly but when i use to login admin by using admin/ then showing this Error..!! I search it but unable to solve this issue. I use online rederect tool where shows 301 and 302 redirection code!! Please help me!! -
Django: How to get a person whose birthday is today from a database?
Good afternoon, I recently started programming with Django and there was a slight difficulty with displaying the date of birth of a person whose birthday is today from the database, can anyone come across this? model.py class HapB(models.Model): name = models.CharField('Имя', max_length=50) last_n = models.CharField('Фамилия', max_length=50) Otdel = models.CharField('Отдел', max_length=50) date_of_birth = models.DateField('Дата рождения', null=True, blank=True) def __str__(self): return self.name -
Is transferring JSON data in Django possible without JS / JQuery?
I am learning how to handle JSON files in Django and I have successfully unpacked JSON, but now I would like to put it inside the table. Is there a way to do that with pure HTML and using so called "tornado brackets" {{ }} not with jQuery / JS functions? My code: API BACKEND FILE from requests import get default_values = { "repoName": "", "repoURL": "" } def get_response(): response = get_json() main_dictionary = { "items":[] } try: for repos in response: main_dictionary["items"].append({ "repoName": repos["name"], "repoURL": repos["html_url"] }) except KeyError as error: print("Key Error, check the validity of the keys you try to use to decode JSON") return main_dictionary["items"] def get_json(): first_response = get('https://api.github.com/users/jacobtoye/repos') response = first_response.json() return response A FAILED ATTEMPT AT RENDERING PURE HTML TABLE {% block content %} <table> <tr> {% for repos in response %} <td>{{ repoName }}</td> {% if not forloop.last and forloop.counter == 3 or forloop.counter == 6 %} </tr> {% endif %} <tr> {% endfor %} </tr> </table> The table doesn't show at all. I don't think that any other code files are substantial for this problem, but if you think you need more code, LMK I will gladly show you :) -
My DataTable isn't displaying like it should
https://datatables.net/ I took the datatable from this site. I write through my code but previous and next buttons are not styled. I'm using Django framework. How can I fix this? Here is my html table: <div class="table-keep"> <div class="container"> <h1>Olv Go Registrations</h1> <table class="table" border=1 id="mydatatablem"> <thead> <tr> <th>Full Name</th> <th>Company</th> <th>Email</th> <th>Phone Number</th> <th>Note</th> </tr> </thead> <tbody> {% for x in x_list %} <tr> <td>{{x.full_name}}</td> <td>{{x.company}}</td> <td>{{x.email}}</td> <td>{{x.phone_number}}</td> <td>{{x.note}}</td> </tr> {% endfor %} </tbody> </table> </div> </div> <!-- Latest compiled and minified JavaScript --> <script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.7/js/bootstrap.min.js" integrity="sha384-Tc5IQib027qvyjSMfHjOMaLkfuWVxZxUPnCJA7l2mCWNIpG9mGCD8wGNIcPD7Txa" crossorigin="anonymous"></script> <script src='https://cdn.datatables.net/1.12.1/js/jquery.dataTables.min.js'></script> <script> $(document).ready(function () { $('#mydatatablem').DataTable(); }); </script> When I use this datatable my on my site the buttons looks like this: https://i.stack.imgur.com/6MQDg.png -
Django google-authentication while using XAMPP(mysql)
I Am working on a Django project, and now I want to add google authentication To my project. when I'm adding Authentication: I face the redirect page problem. task/problem: we need to redirect the home page with some MySQL data(XAMPP). Error: after migration, I run the manage.py runserver. when I'm opening the localhost:8000/account/login, it's now working. -
Session work in local server not in server - Django
I have a Django app which uses cookie session to pass data from one to another template/functions. The problem that I face is that while setting the cookie with either file based, DB based it worked in local perfectly, but while I try set the same session in Digital Ocean development server, it failed for some unknown reason. Here are file which transaction with session settings.py Attempt 1: SESSION_ENGINE = "django.contrib.sessions.backends.signed_cookies" SESSION_COOKIE_NAME = "user_session" SESSION_COOKIE_HTTPONLY = True SESSION_SAVE_EVERY_REQUEST = True SESSION_EXPIRE_AT_BROWSER_CLOSE = True Attempt 2: SESSION_ENGINE = 'django.contrib.sessions.backends.file' SESSION_FILE_PATH = os.path.join(BASE_DIR, "session") views.py def pre_login(request): request.session['pre_login'] = data .... def index(request): user_data = request.session['pre_login'] .... While checking the cookie session in browser, it creates a sessionid for Localhost. But when checking session for the same code, there is nothing for my development server. Please help!!! -
How to solve this fail during installation of Pillow?
I am trying to install pillow and can't solve this installation error. Python version 3.9.7. Pip version 22.1.2 Thank you for help. PS C:\code\django> python -m pip install Pillow Collecting Pillow Using cached Pillow-9.1.1.tar.gz (49.8 MB) Preparing metadata (setup.py) ... done Building wheels for collected packages: Pillow Building wheel for Pillow (setup.py) ... error error: subprocess-exited-with-error × python setup.py bdist_wheel did not run successfully. │ exit code: 1 ╰─> [186 lines of output] running bdist_wheel running build running build_py creating build creating build\lib.mingw_x86_64-cpython-39 creating build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\BdfFontFile.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\BlpImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\BmpImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\BufrStubImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\ContainerIO.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\CurImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\DcxImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\DdsImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\EpsImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\ExifTags.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\features.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FitsImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FitsStubImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FliImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FontFile.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FpxImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\FtexImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GbrImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GdImageFile.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GifImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GimpGradientFile.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GimpPaletteFile.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\GribStubImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\Hdf5StubImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\IcnsImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\IcoImagePlugin.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\Image.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\ImageChops.py -> build\lib.mingw_x86_64-cpython-39\PIL copying src\PIL\ImageCms.py -> … -
Django, Webpack and Heroku: Error reading /app/webpack-stats.json
I'm trying to use Django with Webpack on Heroku via django-webpack-loader. After pushing the files from the repository to Heroku, I run webpack to generate the static files in /dist as well as webpack-stats.json: npx webpack --config webpack.config.js This works fine: both the /dist files and the webpack-stats.json file are correctly created (both are placed within /app/). However, when I try to load the page I get an error: OSError at / Error reading /app/webpack-stats.json. Are you sure webpack has generated the file and the path is correct? The error doensn't say much other than the file /app/webpack-stats.json is missing; however, the file exists, its content is well-formatted and it's in the right location. -
I get an error [<class 'decimal.ConversionSyntax'>] in my cart, how do I fix this?
When adding an item to the cart, an error occurs InvalidOperation at /cart/ [<class 'decimal.ConversionSyntax'>]. My code: cart..py ............................... from decimal import Decimal from django.conf import settings from TeaYardApp.models import Products class Cart(object): def __init__(self, request): self.session = request.session cart = self.session.get(settings.CART_SESSION_ID) if not cart: cart = self.session[settings.CART_SESSION_ID] = {} self.cart = cart def __iter__(self): product_ids = self.cart.keys() # получаем товары и добавляем их в корзину product = Products.objects.filter(id__in=product_ids) cart = self.cart.copy() for product in product: cart[str(product.id)]['product'] = product for item in cart.values(): item['price'] = Decimal(item['price']) item['total_price'] = item['price'] * item['quantity'] yield item def __len__(self): return sum(item['quantity'] for item in self.cart.values()) def add(self, product, quantity=1, update_quantity=False): product_id = str(product.id) if product_id not in self.cart: self.cart[product_id] = {'quantity': 0, 'price': str(product.price)} if update_quantity: self.cart[product_id]['quantity'] = quantity else: self.cart[product_id]['quantity'] += quantity self.save() def save(self): self.session.modified = True def remove(self, product): product_id = str(product.id) if product_id in self.cart: del self.cart[product_id] self.save() def get_total_price(self): return sum(Decimal(item['price']) * item['quantity'] for item in self.cart.values()) def clear(self): del self.session[settings.CART_SESSION_ID] self.save() Form for adding goods to the cart,forms.py .................................. from django import forms PRODUCT_QUANTITY_CHOICES = [(i, str(i)) for i in range(25, 200+1, 25)] class CartAddProductForm(forms.Form): quantity = forms.TypedChoiceField( choices=PRODUCT_QUANTITY_CHOICES, coerce=int) update = forms.BooleanField(required=False, initial=False, widget=forms.HiddenInput) I don't know … -
How do I use filter for Count in Django annotate()?
So I've seen lots of posts dealing with the same question, but most of them were outdated(Django versions) and I couldn't find anything helpful. So the problem is, I was trying to use filter for Count in Django annotation. Below is an example, and I've tried three variances that I found after Googling. all_posts = Post.objects.all().annotate( count_comments = Count('user_comment', validated=True), #1 count_comments = Count('user_comment').filter(validated=True), #2 count_comments = Count('user_comment', filter=Q(validated=True)), #3 ) As you can see, I'm trying to get the number of comments that are validated. But obviously none of them works. What is the correct way of using the filter? -
Why does the set method in the many-to-many field through a custom model not work but add method does?
I have these models: class PackRepo(BaseModel): title = models.CharField(max_length=256, verbose_name='Title') class PackVersion(ModelWithUID, BaseModel): repositories = models.ManyToManyField( to='PackRepo', verbose_name='Chart Repositories', related_name='chart_versions', through='ChartVersionRepo' ) class ChartVersionRepo(BaseModel): chart_version = models.ForeignKey(PackVersion, on_delete=CASCADE) chart_repo = models.ForeignKey(PackRepo, on_delete=CASCADE) class Meta: unique_together = ['chart_version', 'chart_repo'] BaseModel has some auto-generated or nullable fields. When I want to set a couple of PackRepo for PackVersion in the migration file, the set() method does not work but add method does. The set method does not raise any errors but ChartVersionRepo's instances do not change. I searched it but I could not find the reason. This is my code: ChartRepoModel = apps.get_model("core", "packrepo") pack_version_new_item = copy.deepcopy(duplicate_items[0]) pack_version_new_item.pk = None pack_version_new_item.save() repos = ChartRepoModel.objects.filter(pack_versions__in=duplicate_items_ids).distinct().values_list('id', flat=True) new_item.repositories.set(repos) -
Django match the day and after the hour
recently I posted here a question to match the calendar users. Now the problem is, I am matching the exact interval of days-time. Here are the four conditions I am looking for: Search to each day if doesn't exist a match in the day, exclude the result from the list. if exists at least one day equal, check the range hour. if the hour of the user is inside the mine, then include the result on the list. Please, take a look at the other post to respond to this. I separated the questions to be more clear. Thanks -
plot with matplotlib using django
How i can add on my code that i want colors without color yellow because the yellow is just for outliers def show_absorbance(df_abs, crop_left, crop_right, clean_param): df_abs_t = df_abs.iloc[:, -1].T outliers = inf_norm_detection(df_abs,crop_left, crop_right, clean_param) colors = list(mcolors.CSS4_COLORS.values()) plt.figure(figsize=(16, 10)) plt.subplot(221) plt.plot(df_abs.to_numpy()[:, 1:].T, 'yellow') for i, outlier in enumerate(outliers): plt.plot(df_abs.loc[outlier].iloc[1:], c=colors[i],label=outlier) plt.legend() plt.show() so when i defined here colors , how i remove the yellow? colors = list(mcolors.CSS4_COLORS.values()) -
ModuleNotFoundError: No module named” when run in docker
I have the following Django project which runs perfectly in non-docker debug mode. xxxProjectv3 │ ├── asgi.py │ ├── celery.py │ ├── __init__.py │ ├── settings │ │ ├── development_settings.py │ │ ├── django_settings.py │ │ ├── __init__.py │ │ ├── production_settings.py │ │ └── project_settings.py │ ├── urls.py │ └── wsgi.py ├── CCTV │ ├── admin.py │ ├── apps.py │ ├── camera.py │ ├── consumers.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── routing.py │ ├── tasks.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── celerybeat-schedule.db ├── db.sqlite3 ├── docker-compose.yml ├── Dockerfile ├── dome_control │ ├── admin.py │ ├── apps.py │ ├── conditions.py │ ├── consumers.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── relays.py │ ├── routing.py │ ├── tasks.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── home │ ├── admin_bak.py │ ├── apps.py │ ├── __init__.py │ ├── migrations │ │ └── __init__.py │ ├── models.py │ ├── tests.py │ ├── urls.py │ └── views.py ├── manage.py ├── requirements.txt ├── shared_data │ ├── conditions.json │ ├── debug.log │ ├── django.log │ ├── relays.json │ └── temperhum.json ├── static … -
Integration Vue.js in my Django application
I have a generic question about best practises in terms of using Vue.js and Django. My idea is to integrate Vue.js framework to the existing app. In total I have more than 15 views in Django (ListViews, DetailVIews, TemplateViews) and I'd like to use Vue.js only in 2 views (together with DRF). What is the best way to do it? Should I create a seperate app (in most courses I watched it is called backend and frontend) and connect it to SQL database and leave everything else as it is or I really need to adjust all views to Vue.js framework? I am also concerened about authentication process because everything is written puerly in Django and I am not sure how would that cooperate when creating app in Vue.js? -
Single user view in Django API (Rest Framework)
I created an API on Django using the rest framework, I populate that through the default Django Admin Page. My question: the API works fine and I'm able to get all the results, but I'm looking to create an endopoint like /api/<int:CID> that returns just one user. I would like to use the field 'CID' to filter. How can I do that? Thanks! I've some fields in my API, here my serializers.py class HCSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = HomeController fields = ('full_name','Staff','CID', 'OI', 'Rating', 'GND', 'TWR', 'APP', 'CTR', 'Notes') class VCSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = VisitingController fields = ('full_name','CID', 'OI', 'Rating', 'GND', 'TWR', 'APP', 'CTR', 'Notes') my views.py class HCViewSet(APIView): def get(self): HC = HomeController.objects.all().order_by('full_name') serializer = HCSerializer(HC, many=True) return Response(serializer.data) class VCViewSet(APIView): def get(self): VC = VisitingController.objects.all().order_by('full_name') serializer = VCSerializer(VC, many=True) return Response(serializer.data) my models.py class HomeController(models.Model): full_name = models.CharField(max_length=60) ATM = 'ATM' DATM = 'DATM' TA = 'TA' EC = 'EC' FE = 'FE' WM = 'WM' INS = 'INS' MTR = 'MTR' BLK = 'BLK' Staff = [ (ATM, 'Air Traffic Manager'), (DATM, 'Deputy Air Traffic Manager'), (TA, 'Training Administrator'), (EC, 'Events Coordinator'), (FE, 'Facility Engeneer'), (WM, 'Webmaster'), (INS, 'Instructor'), (MTR, 'Mentor'), (BLK, 'Blank'), ] Staff = …