django-2.0 Questions
22
It's my first time trying to deploy a Django app(django 2.0.1)(Python 3.6) to pythonanywhere, it is a simple portfolio app with no models, no bootstrap.
Just Django, HTML, CSS & Javascript.
Af...
Kirwan asked 9/1, 2018 at 7:56
3
Solved
Can anyone help me in understanding what is the use of wsgi.py file?
import os
from django.core.wsgi import get_wsgi_application
os.environ.setdefault("DJANGO_SETTINGS_MODULE", "myproject.settin...
Phalange asked 19/4, 2020 at 19:28
6
Solved
In Django 2.0, autocomplete_fields was added, which is great.
Without autocomplete_fields, I can change the queryset of a ForeignKeyField using formfield_for_foreignkey.
But combining the two tog...
Twirl asked 8/1, 2018 at 15:4
4
Solved
In the official Django 2 tutorial I found this:
from django.db import models
class Student(models.Model):
FRESHMAN = 'FR'
SOPHOMORE = 'SO'
JUNIOR = 'JR'
SENIOR = 'SR'
YEAR_IN_SCHOOL_CHOICES ...
Adriatic asked 25/5, 2018 at 13:53
4
Solved
I'm trying to populate my Django database with a script so I don't have to enter in the data manually. So far I have the following:
from my_app.models import ModelInApp
import django
django.setup...
Florida asked 7/7, 2018 at 23:27
12
Solved
I am working on Django project where I need to create a form for inputs. I tried to import reverse from django.core.urlresolvers. I got an error:
line 2, in from django.core.urlresolvers import re...
Scraggly asked 31/3, 2017 at 11:2
4
Solved
I want to pass two parameters in my url pattern but i am getting error no-reverse match i.e 'projects'.While it works fine with only one parameter.
here is main urls file-
urlpatterns = [
path('...
Flintlock asked 22/7, 2018 at 10:23
2
Error when using include('admin.site.urls'): Passing a 3-tuple to include() is not supported
I'm fairly new to Python and I am using a video tutorial on Lynda to help me build the frameworks for a Social WebApp. I'm trying to run the server from the cmd using python manage.py runserver fro...
Overheat asked 11/1, 2018 at 9:10
11
Solved
I'm working on adding Django 2.0 support to the django-pagetree library. During automated testing, using an sqlite in-memory database, I'm getting a bunch of errors like this:
File "/home/nnyby/s...
Tracee asked 3/12, 2017 at 16:25
4
Solved
I can't understand why my code doesn't work. Before it worked, but now, when I run the server and test, the code does not work.
When the user is registering, I send him activation email, like thi...
Incubus asked 8/11, 2017 at 10:47
12
Solved
I have two classes in my sqlite database, a parent table named Categorie and the child table called Article. I created first the child table class and addes entries. So first I had this:
class Art...
Guanabara asked 17/5, 2017 at 13:39
2
Solved
My amount column attributes are set to max_digits = 13, decimal_places = 7 because you could technically have something like 10000.0000001 bitcoin.
When I try to enter and submit just 0.1 Bitcoin...
Frantz asked 9/5, 2018 at 10:43
2
Solved
I deployed a Django website using this tutorial
https://jee-appy.blogspot.com/2017/01/deply-django-with-nginx.html
The website can be accessed from the internet, www.simplesol.com
When I try to...
Beale asked 7/3, 2018 at 22:40
2
Solved
I want to know if PermissionsMixin has the same function as PermissionRequiredMixin.
from django.contrib.auth.models import PermissionMixin
from django.contrib.auth.mixins import PermissionRequired...
Disposition asked 7/1, 2019 at 23:22
2
Solved
We are practicing an example of REST API on the Internet.
However, the following error occurred.
I tried a way in this link, but the situation hasn't changed.
why swagger raises unclear error - ...
Fumigator asked 26/8, 2019 at 8:22
2
Solved
I'm following this tutorial.
When I run test_views.py I have an error that shouldn't be there according the author: TypeError: quote_from_bytes() expected bytes.
My views and my test_views are the ...
Stempson asked 20/6, 2018 at 19:59
2
I am running Django 2.0 using gunicorn on nginx server. All my pages are not reflecting the changes immediately. How to stop caching
the below are my files:
nginx.conf
server {
listen 80;
serv...
Marileemarilin asked 6/1, 2018 at 3:28
2
Solved
I just have started my first project by using Django 2.0 in which I need to define a URL in a way as:
http://localhost:8000/navigator?search_term=arrow
But I couldn't know how to define a string pa...
Ballentine asked 21/5, 2018 at 17:21
2
I'm doing this little project simulating a clothing ordering system to brush up my django skills.
I have to add several pictures of a certain item(not a fixed number). So, using a fixed number of ...
Churchyard asked 14/4, 2018 at 1:52
3
Solved
I'm running into issues trying to use a heroku postgres datastore from a restore of a local postgres database I have. Using the restored postgres database Django runs as normal. It retrieves all ob...
Detrital asked 10/12, 2017 at 23:49
1
I'm working on a project in which I need to implement private chat for user, so one user can communicate with another user privately, for that purpose I'm using django-private-chat but I'm confused...
Calends asked 1/2, 2019 at 14:16
1
Solved
Is there any way to append a non-Django supplied value to a query?
For instance, to find out if a store closed, I may run a function called get_closed_stores() which returns a list of closed store...
Prelatism asked 29/1, 2019 at 0:48
2
Solved
I've got a use case where I have multiple Ingredient that can be linked to a Recipe through the Django admin. Now I have around a hundred ingredients which makes it very difficult to select the ing...
Garlicky asked 11/7, 2018 at 6:54
2
Solved
I want to exclude, programatically, a field in my form.
Currently I have this:
class RandomForm(BaseForm):
def __init__(self, *args, **kwargs):
# This doesn't work
if kwargs["instance"] is Non...
Rinarinaldi asked 29/5, 2018 at 15:22
1
Solved
In Django2.0 were introduced path() and re_path().
But the difference between boths is unclear to me : is it about the ability to use or not regexps with it?
Would that mean that I couldn't use b...
Whether asked 28/5, 2018 at 15:39
1 Next >
© 2022 - 2024 — McMap. All rights reserved.