Django community: RSS
This page, updated regularly, aggregates Django Q&A from the Django community.
-
Database not updating with custom save method
class Bike(models.Model): BikeFile = models.FileField(null=True, upload_to='') RegoNumber = models.CharField(max_length=10) RegoExpiry = models.DateField( auto_now=False, auto_now_add=False, null=True) LastRentedDate = models.DateField( auto_now=False, auto_now_add=False, editable=True, null=True) Hire = models.OneToOneField( Hire, on_delete=models.SET_NULL, null=True, related_name='Hire') def __str__(self): return self.RegoNumber def save(self, *args, **kwargs): if self.Hire != None: # Why isn't this running print(localdate()) self.LastRentedDate = localdate() print(f'{self.LastRentedDate} is last rented date from model') self.BikeFile = f'{self.RegoNumber}\'s hire on {self.Hire.StartRentDate}.pdf' return super(Bike, self).save(*args, **kwargs) For some reason self.LastRentedDate is not updating in the database, even though when I run the save on the Bike the print(f'{self.LastRentedDate} is last rented date from model') runs with the proper localdate(). Assignment to self.BikeFile also works -
How to add another model in ListView that has forign key with the main model
Sorry for my bad english I'm making a dashboard website I have 2 models the second one has foreign key of the first one example of josn model1: { id:1, name: name1, location: location1 } model2: { id:1 model1_id: 1 photo: "http://url/media/picures/myphoto478998691182.jpg" ... } So there supposed to be more of model2 to each model1 instance In my views I have a ListView of model1 I want to add to last photo of model2 referring to each model1 id If I have 2 instances of model1 each has 5 instances of model2 I want to filter model2 by id and get the last photo for each instance in model1 How to fix this code: class Model1List(CustomLoginRequired, ListView): model = Model1 paginate_by = 100 def get_context_data(self, **kwargs): photo_list = Model2.objects.filter(model1_id = self.kwargs.get('id')) photo = list(photo_list.values_list('photo', flat=True))[-1] context = super().get_context_data(**kwargs) context['now'] = timezone.now() context['photo'] = photo return context So I can use in the html template somehow like this {% for object in object_list %} <div class="branches-list-unit" id="{{ object.slug }}"> <h5 class="branch-list-unit__name">{{ object.name }}</h5> <img class="branch-list-unit__img" src="{{ object.photo }}" </div> {% endfor %} -
uWSGI Segmentation Fault Prevents Web Server Running
I am currently running a web server through two containers: NGINX Container: Serves HTTPS requests and redirects HTTP to HTTPS. HTTPS requests are passed through uwsgi to the django app. Django Container: Runs the necessary Django code. When running docker-compose up --build, everything compiles correctly until uWSGI raises a Segmentation Fault. .... django3_1 | Python main interpreter initialized at 0x7fd7bce0d190 django3_1 | python threads support enabled django3_1 | your server socket listen backlog is limited to 100 connections django3_1 | your mercy for graceful operations on workers is 60 seconds django3_1 | mapped 145840 bytes (142 KB) for 1 cores django3_1 | *** Operational MODE: single process *** django3_1 | !!! uWSGI process 7 got Segmentation Fault !!! test_django3_1 exited with code 1 Would appreciate if there's any advice, as I'm not able to see into the container for debugging purposes when it is starting up, therefore I don't know where this segmentation fault is occurring. The SSL certificates have been correctly set up. -
Cant install tflite_runtime while deploying on web application online
System information OS Platform and Distribution (windows 10) TensorFlow version: Uninstalled(As I cannot use such a huge library) Python version: 3.8 Installed using virtualenv and pip3 on local requirements.txt GPU 8Gb memory: I am new to this but I will try to explain my situation. So I am using tflite.interpreter to load the saved model(converted to tflite) using tflite. interpreter. Everything works fine on the local system but when I deploy my Django app to Heroku or azure. I cant install tflite_runtime from Requirements.py during git push to remote. I used this to install it on my local pip3 install --extra-index-url https://google-coral.github.io/py-repo/ tflite_runtime How do I include tflite_runtime in requirements.txt so that it automatically installs using pip while pushing to GIT? -
'unique_together' refers to the nonexistent field 'semantics_tmplt'
Django 3.1.7 class BranchSemanticsTemplate(models.Model): semantics_tmplt = models.ForeignKey(SemanticsLevel2Tmplt, on_delete=models.PROTECT, verbose_name=gettext("Semantics template"), related_name="%(app_label)s_%(class)s_related", related_query_name="%(app_label)s_%(class)ss", ), branch_tmplt = models.ForeignKey(BranchTmplt, on_delete=models.PROTECT, verbose_name=gettext("Branch template"), related_name="%(app_label)s_%(class)s_related", related_query_name="%(app_label)s_%(class)ss", ), class Meta: verbose_name = gettext("Branch template - branch- semantics - semantics template") verbose_name_plural = verbose_name unique_together = ['semantics_tmplt', 'branch_tmplt', ] Problem: (venv) michael@michael:~/PycharmProjects/ads6/ads6$ python manage.py makemigrations SystemCheckError: System check identified some issues: ERRORS: dashboard.BranchSemanticsTemplate: (models.E012) 'unique_together' refers to the nonexistent field 'branch_tmplt'. dashboard.BranchSemanticsTemplate: (models.E012) 'unique_together' refers to the nonexistent field 'semantics_tmplt'. Could you help me here? -
AttributeError: x object has no attribute 'GET' (DRF)
I am trying to grab a user's list using Django Rest Framework and an Ajax request. However, I get the following error AttributeError: 'UserListViewSet' object has no attribute 'GET' Not sure what I am doing wrong - I am newer to DRF than vanilla Django. Ajax call: const showUserLists = function(map){ let userName = "Henry"; $.ajax({ type: 'GET', url: '/api/userlist/', data: { 'username': userName }, success: function (data) { data.forEach(item => { console.log(item.list_name) $("#userLists").append("<li class=userlist data-name=\"" + item.list_name + "\">" + item.list_name + "</li>") }) } }); }; urls.py: router = DefaultRouter() router.register('userlist', views.UserListViewSet, basename= 'userlist') router.register('uservenue', views.UserVenueViewSet, basename= 'uservenue') views.py #this shows all lists for a user class UserListViewSet(viewsets.ModelViewSet): serializer_class = UserListSerializer def get_queryset(request): name = request.GET.get('username', None) return UserList.objects.filter(user=name) Traceback: Traceback (most recent call last): File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/django/core/handlers/exception.py", line 47, in inner response = get_response(request) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/django/core/handlers/base.py", line 179, in _get_response response = wrapped_callback(request, *callback_args, **callback_kwargs) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/django/views/decorators/csrf.py", line 54, in wrapped_view return view_func(*args, **kwargs) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/rest_framework/viewsets.py", line 114, in view return self.dispatch(request, *args, **kwargs) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/rest_framework/views.py", line 505, in dispatch response = self.handle_exception(exc) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/rest_framework/views.py", line 465, in handle_exception self.raise_uncaught_exception(exc) File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/rest_framework/views.py", line 476, in raise_uncaught_exception raise exc File "/Users/x/Desktop/Coding/anybody/avenv/lib/python3.6/site-packages/rest_framework/views.py", line 502, in dispatch response = handler(request, *args, … -
Trouble rendering results from searchbar in Django
I have been working on a search bar in django and I am close but having some issues rendering the results to the page. Views.py class SearchResultsView(ListView): model = Project template_name = 'search_results.html' def get_queryset(self): proj=self.request.GET.get('proj') proj_list=Project.objects.filter( Q(name__icontains=proj) | Q(projectTag__icontains=proj) ) proj_list1=Project.objects.filter( Q(department__icontains=proj) ) proj_list2 = list(set(proj_list) & set(proj_list1)) return proj_list2 class SearchPageView(TemplateView): template_name = 'searchbar.html' search_results.html {% extends 'main/base.html' %} <html> {%block content%} <h1> Search Results </h1> {% if proj %} <ul> {% for project in proj_list2%} <li> {{project.name}}, {{project.department}}, {{project.projectTag}} </li> {% endfor %} </ul> {% else %} <h2>sorry, no results</h2> {% endif %} {%endblock%} </html> Whenever I search something that should definitely yield results, I get "sorry, no results." Thank you. Please help me to understand my disconnect. The bigger aim for this is to then add different models to query from (i.e. not just search in projects, but also search by user). -
Cross-origin API call from a node.js server to a django server, need to edit data on the django side
For a project I am using a really old version of django (1.5.2). An app has been created using this version of django long time ago, and I am making a separate app that needs to make API calls to the django app. My separate app is in node.js/typescript. From my node app, I need to be able to POST some data to the django app. I have created the new API inside the django app, and it works internally. If I try to call the endpoint from my node app, it does not work - the method is called, but the posting part does not work as it looks for authentication and since I sent the request from the node app, the user shows up as AnonymousUser, who is non-authenticated. For APIs that do not require POST (just GET), I can access the django API endpoints from node since I defined CORS MiddleWare in the django app. I was wondering how I might be able to POST information from node app to the django app, and also authenticate user if the user is logged into the django app from another tab. -
Авторизация в андроид приложении
Я недавно начал изучать разработку под андроид на kotlin. Пишу небольшое клиент-серверное приложение. Серверная часть на Django готова и работает. Теперь прикручиваю интерфейс. Есть несколько вопросов: Я уже умею сделать запрос с логином и паролем. В ответ, если всё хорошо, Django присылает куки, в которых есть SCRF токен, id сессии, время жизни токена и сессии. Как мне сохранять эти куки в приложении для последующего использования? При открытии приложения мне надо как-то понимать, авторизован ли пользователь. Как это правильно сделать? Думал просто проверять наличие сохраненных куки, если всё с ними ок, значит авторизован. если их нет или время жизни закончилось, то снова запрашивать логин и пароль. Но может есть более православный способ? Есть данные, которые требуется синхронизировать с удаленной БД (например, список городов). Как это лучше реализовать? SQLLite и при открытии приложения синхронизировать все необходимые данные? Или есть более православный способ? -
How can I get image from android app to Django
I want to get image from android app to Django server. How can I get image? I use Django REST-Framework. And I want to save image to server. What should I use?(filefield or imagefield) -
TemplateDoesNotExist at /trade/confirm/
When a user clicks a button in a form, I am sending a POST request in a form with action="{% url 'trade-confirm' %}". The method that is called, insert_transaction, is working correctly. But when that method is finished it returns a DetailView, TransactionDetailView, which is showing the below error: TemplateDoesNotExist at /trade/confirm/ confirmed-trade/20/ Screenshot of error here: enter image description here Below is my code: Folder structure: game-exchange -blog --migrations/ --static/ --templates/ ---blog/ ----about.html ----base.html ----matches.html ----transaction.html ----your-trades.html --admin.py --apps.py --models.py --urls.py --views.py -django_project/ -media/ -users/ -manage.py -posts.json -Procfile blog/urls.py urlpatterns = [ #the 2 relevant url's path('confirmed-trade/<int:pk>/', views.TransactionDetailView.as_view(), name='confirmed-trade'), # Loads transaction form path('trade/confirm/', views.insert_transaction, name='trade-confirm'), # url to accept POST call from Your Trades page to create a Transaction ] blog/models.py (transaction object only) class Transaction(models.Model): name = models.TextField() created_date = models.DateTimeField(default=timezone.now) trade_one = models.ForeignKey(Trade, on_delete=models.CASCADE, related_name='trade_one', db_column='trade_one') trade_two = models.ForeignKey(Trade, on_delete=models.CASCADE, related_name='trade_two', db_column='trade_two') status = models.TextField(default='Waiting for 2nd confirmation') def get_transaction_name(self): return ''.join([self.trade_one_id, ' and ', self.trade_two_id, ' on ', timezone.now().strftime("%b %d, %Y %H:%M:%S UTC"), ')']) def save(self, *args, **kwargs): self.name = self.get_transaction_name() super(Transaction, self).save(*args, **kwargs) def __str__(self): return self.name def get_absolute_url(self): return reverse('confirmed-trade', kwargs={'pk': self.pk}) views.py: def insert_transaction(request): if 'trade_1_id' not in request.POST or 'trade_2_id' not … -
Django print not printing when i "runserver"
i have this program, it used to work (print in th console) but it doesn't anymore i want to figure out why ! This is my views.py : import requests import os import json from django.http import JsonResponse, HttpResponse from django.shortcuts import render def btc(request): query_url = [ 'https://api.blockchair.com/bitcoin/stats', ] headers = { } result = list(requests.get(u, headers=headers) for u in query_url) json_data1 = result[0].json() data = [] data.append(json_data1['data']['transactions']) print(data) context = { "data": data, } return render(request, "index.html", context) it used to print the "data" values in the console when i do python manage.py runserver any idea on how to fix it ? -
What to choose for web development, Django or Laravel?
I'm new here and this is my first Question. I'm going to start web development. But I'm confused that what to start, Pyhthon(Django) or Php(larave) ? Help me plz... -
Django migrate app zero does not drop tables
I understand that all migrations applied to an app can be reversed using "migrate <app_name> zero". In the migration folder for the app, there are two migration files. However the below shows "No migrations to apply". And afterward when trying to run "migrate <app_name>" the database is returning an error saying that there is already an object of the name. Can someone help me understand what is happening here? Why is "migrate <app_name> zero" not seeing the two migrations that need to be reversed. C:\Users\...\mysite>python manage.py migrate awards zero Operations to perform: Unapply all migrations: awards Running migrations: No migrations to apply. C:\Users\...\mysite>python manage.py migrate awards Operations to perform: Apply all migrations: awards Running migrations: Applying awards.0001_initial...Traceback (most recent call last): File "C:\Program Files\Python38\lib\site-packages\django\db\backends\utils.py", line 84, in _execute return self.cursor.execute(sql) File "C:\Program Files\Python38\lib\site-packages\sql_server\pyodbc\base.py", line 553, in execute return self.cursor.execute(sql, params) pyodbc.ProgrammingError: ('42S01', "[42S01] [Microsoft][ODBC Driver 17 for SQL Server][SQL Server]There is already an object named 'awards_student' in the database. (2714) (SQLExecDirectW)") Thank you! -
After I submit form with uploading photos, there are nothing to save on Django database
I met a problem. When I choose a photo as a profile_pic on the registration page, it saves any information without a photo. But I can't find out why it didn't work. There is nothing in the Profile pic after submitting. setting.py """ Django settings for learning_templates project. Generated by 'django-admin startproject' using Django 3.1.7. For more information on this file, see https://docs.djangoproject.com/en/3.1/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/3.1/ref/settings/ """ from pathlib import Path import os # Build paths inside the project like this: BASE_DIR / 'subdir'. BASE_DIR = Path(__file__).resolve().parent.parent TEMPLATE_DIR=os.path.join(BASE_DIR,'templates') STATIC_DIR=os.path.join(BASE_DIR,'static') MEDIA_DIR=os.path.join(BASE_DIR,'media') # Quick-start development settings - unsuitable for production # See https://docs.djangoproject.com/en/3.1/howto/deployment/checklist/ # SECURITY WARNING: keep the secret key used in production secret! SECRET_KEY = 'pgmh_#pcqd(3sf(a3oj#^vyv4l-#p6g=n-=^!z)0d@!k)!_ear' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True ALLOWED_HOSTS = [] # Application definition INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'basic_app', ] MIDDLEWARE = [ 'django.middleware.security.SecurityMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] ROOT_URLCONF = 'learning_templates.urls' TEMPLATES = [ { 'BACKEND': 'django.template.backends.django.DjangoTemplates', 'DIRS': [TEMPLATE_DIR,], 'APP_DIRS': True, 'OPTIONS': { 'context_processors': [ 'django.template.context_processors.debug', 'django.template.context_processors.request', 'django.contrib.auth.context_processors.auth', 'django.contrib.messages.context_processors.messages', ], }, }, ] WSGI_APPLICATION = 'learning_templates.wsgi.application' # Database # https://docs.djangoproject.com/en/3.1/ref/settings/#databases DATABASES = { … -
Django image not storing
I am trying to upload the image of desktop to the server using ModelView. It's storing link into the database but image is not getting uploaded into the MEDIA folder. Models: class File(models.Model): # file = models.FileField(blank=False, null=False) file = models.ImageField(upload_to='media/', blank=True) remark = models.CharField(max_length=20) timestamp = models.DateTimeField(auto_now_add=True) URL: path('upload/', views.FileView.as_view(), name='file-upload'), Serializer: class FileSerializer(serializers.ModelSerializer): class Meta: model = File fields="__all__" View: class FileView(generics.ListCreateAPIView): queryset = File.objects.all() serializer_class = FileSerializer Global settings: if settings.DEBUG: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) Output: "id": 18, "file": "https://<URL>/media/home/tguser/tgportal/core/media/check.png", "remark": "ok", "timestamp": "2021-03-19T16:43:50.131435Z" } The file link is generating but no file uploded at that location. Any help appreciated. PD -
DJANGO Problem at rendering Form - Dropdownlist not show
When I rendering {{form.as_p}}: all input text is fine display as expected (from model.CharField) all select option just showing label without dropdownlist (from model.ForeignKey) but when i use w3shool html editor, copying code from view page source html and paste in w3.html editor all is fine, select option is appear on that. So, What is wrong? please help me get the answer, and fix the problem thank you models.py class Project(models.Model): project_no = models.CharField(max_length=10, blank=True) project_name = models.CharField(max_length=100, blank=True) project_no_file = models.CharField(max_length=10, blank=True) project_div = models.ForeignKey(Division, on_delete=models.CASCADE) project_cord = models.ForeignKey(Inspector, on_delete=models.CASCADE) def __str__(self): return self.project_no class Inspector(models.Model): inspector_name = models.CharField(max_length=50, blank=True) inspector_biro = models.ForeignKey(Biro, on_delete=models.CASCADE) def __str__(self): return self.inspector_name class Division(models.Model): div_name = models.CharField(max_length=50, blank=True) def __str__(self): return self.div_name views.py class AddView(CreateView): template_name = "launching/adddata.html" model = Project fields = '__all__' urls.py re_path(r'^project/add/$', AddView.as_view(), name='create') adddata.html <div class="container"> <form method="post" enctype="multipart/form-data" name="form_add"> {% csrf_token %} {{ form.as_p }} <input type="submit" value="Save"> </form> </div> result in browser dropdownlist for Project div and project cord not show result in W3.editor all is fine when its run the rendering code in w3editor -
Is this code correct to send email (django)?
Test.py email = EmailMessage() email['from'] = 'Your Name' email['to'] = 'name@gmail.com' email['subject'] = 'Welcome to Ourr Website!' email.set_content("Hope You are doingg great.") with smtplib.SMTP(host='smtp.gmail.com', port=587) as smtp: smtp.ehlo() smtp.starttls() smtp.login('example@gmail.com', 'password: ********') smtp.send_message(email) print("Done") When I exicute I'm getting timeout error(10060), can any one help Thank out -
Styling PhoneNumberPrefixWidget in django with crispyforms
I'm rendering a crispy form and I've added a PhoneNumberPrefixWidget from this library, after adding it to crispy form's layout I can't change the style. Is there any way to achieve this? The library owns almost any documentation. My model: class Contact(BaseModel): person_phone_number = PhoneNumberField( verbose_name="Número de teléfono", null=True, blank=True ) Form: class ContactForm(BaseForm): person_phone_number = PhoneNumberField( widget=PhoneNumberPrefixWidget(initial="IN"), label=('Número de Teléfono'), ) class Meta: model = Contact exclude = [] Layout: self.layout.fields.append( self.make_row( [ "person_phone_number", ], size=6, ) ) -
How to setup "Hybrid Architecture" in Django while using Svelte.js?
I was trying to setup a svelte js in django to build an ecommerce website. Then, I found out there are 3 architecture : Server-First Architecture :bits of js scattered throughout django templates and static files. Client-First Architecture: Front end is a single page app that treats Django as an REST API Hybrid Architecture: It is a combination of both (client and server)-First Architecture. I choose Hybrid Architecture because I don`t want to wrestling with CORS or any 3rd party framework and having disadvantage of not taking advantage of using js tooling. Now the questions are: How do I setup Hybrid Architecture so that I can use Django Features alongside with Svelte js Features ? Can I setup Single Page App using Hybrid Architecture in Django? Is Single Page App good for Ecommerce in Django Note: I don`t want to use any Django libs such as Django-Svelte etc to setup it . I just want to install and setup with npm and webpack inside django just like normal setups. -
Django email logging isn't sending emails
I've implemented logging within my settings file, but no emails are being sent when a 500 error is hit. I'm on django 3.x All of the email settings within my settings file work. These settings are successfully used to deliver account confirmation emails, for example. EMAIL_HOST = 'smtp.gmail.com' EMAIL_HOST_USER = 'support@########' EMAIL_HOST_PASSWORD = '#######' DEFAULT_FROM_EMAIL = 'support@######' SERVER_EMAIL = 'support@########' EMAIL_PORT = ##### EMAIL_USE_TLS = True LOGGING = { 'version': 1, 'disable_existing_loggers': False, 'handlers': { 'mail_admins': { 'level': 'ERROR', 'class': 'django.utils.log.AdminEmailHandler' }, }, 'loggers': { 'django.request': { 'handlers': ['mail_admins'], 'level': 'ERROR', 'propagate': False, }, } } Thanks! -
django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes')
I am getting this error when migrating: django.db.utils.OperationalError: (1071, 'Specified key was too long; max key length is 3072 bytes') My configuration: DATABASES = { 'default': { 'ENGINE': 'django.db.backends.mysql', 'NAME': 'myname', 'USER': '', 'PASSWORD': '', 'HOST': 'localhost', 'PORT': '3306', 'CHARSET': 'utf8', } } This happened after adding indexes to my model: class MsTune(models.Model): class Meta: indexes = [ models.Index(fields=['name', 'title', 'alt_title', 'index_standard_1', 'index_standard_2', 'index_gore_1', 'index_gore_2', 'alt_index_gore_1', 'alt_index_gore_2', 'alt_index', 'alt_index_standard_1', 'alt_index_standard_2', 'bass', 'variations' ]), ] What can the reason be? My database uses UTF-8 and, as far as I know, Django's MySQL connector uses InnoDB by default. Django 3.1, MySQL 8.0.23, Python 3.7.3 -
custom static files not loading in django project
I have a django project where I have kept all the static files in a project level static directory. I have included STATIC_URL = "/static/" STATIC_ROOT = os.path.join(BASE_DIR, 'static') in the settings.py. ALso I have added + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) to the urlpatterns in the project level urls.py. My issue is that some of the static files load whereas some do not. For. eg. I am using django_google_maps and the (example url) http://127.0.0.1:8000/static/django_google_maps/js/google-maps-admin.js loads right and the corresponding work is done. But when I try to load my custom js/css/any-static files, (example url http://127.0.0.1:8000/static/images/favicons/favicon.ico or ttp://127.0.0.1:8000/static/js/image-upload-script.js), they do not load and raise a django.views.static.serve error with 404 not found. They are right there in the directory though. I see that the static files used by third party packages are loading right but not my custom ones. What is it that I am missing? Do we require something else to load our custom js/css files?? And yes I have used {% load static %} in my template. -
Django | argon2-cffi not hashing from admin panel
I am using argon2-cffi to hash users' passwords, however when logging into the admin panel and creating a new user, the password is not being hashed, it stays as the raw password. How can i overwrite this configuration? Or, what could I implement to hash the accounts that have raw passwords? I tried what the answer of this question suggested but hasn't worked. I haven't been able to find any resourceful information about it. -
Obtaining full requested url address
I'm looking to obtain the full requested url within python/django. I'm wondering what package might help me do this. For example, if someone goes to example.com/my-homepage, I want to capture the string 'example.com/my-homepage' in python. Thanks!