sibtc / django-multiple-user-types-example Goto Github PK
View Code? Open in Web Editor NEWDjango Quiz Application
Home Page: https://django-school.vitorfs.com
License: MIT License
Django Quiz Application
Home Page: https://django-school.vitorfs.com
License: MIT License
Made some changes to the project to cater for my needs. Whenever I try to serve static file using whitenoise with static_storage as STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage' I get 500 error page and not my home page. Have tried changing staticfiles_storage to other available options in whitenoise but if I try that none of my static files seem to load.
This is what I have in my settings:
`INSTALLED_APPS = [
'django.contrib.auth',
'django.contrib.admin',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'whitenoise.runserver_nostatic',
'django.contrib.staticfiles',
'django.contrib.humanize',
'crispy_forms',
'classroom',
]
MIDDLEWARE = [
'django.middleware.security.SecurityMiddleware',
'whitenoise.middleware.WhiteNoiseMiddleware',
'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',
]
...
STATIC_URL = '/static/'
STATIC_ROOT = os.path.join(BASE_DIR, 'static')
STATICFILES_DIRS = [
os.path.join(BASE_DIR, 'public/static'),
]
STATICFILES_STORAGE = 'django.contrib.staticfiles.storage.ManifestStaticFilesStorage'
...
`
From what I understand, student is not a fieldname on user. So I would think request.user.student is not possible.
Hi
I used this for my project and extended the user model , using abstractuser . But My decoraters are not working when I Put them in views . Even the @login_required is not working.
implement multiple user types with Django-allauth
Is it possible to make a quiz on HTML pages and save that responses and results in SQLite database instead of writing a quiz in Django database
Hi,
Thanks for the tutorial so nice, one issue that I cant log in Admin app as super user, when i do i don't see the User tables.
for some reason your code does not work with Users group ?
Is there a way to add this already built in django user management- Thanks
Hello. I added a field year to Student model.I want to extend the app so that students can view quizzes that are just for their year of study.
In the forms.py in StudentSignUpForm I added year = forms.ModelChoiceField(
queryset=Year.objects.all(),
required=True
)
in def save(self):
student.year.add(*self.cleaned_data.get('year'))
It gives an error 'NoneType' object has no attribute 'add'
Assist in solving this or give pointers on how to solve
Exception Type: OperationalError
Exception Value:
no such table: main.classroom_student__old
I was trying to change the interest list but i can neither get access to admin nor do i see it hard coded anywhere.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.