Comments (6)
The form now posts successfully with changes reflected in the database and the success URL being implemented.
Due to the form spanning across both Django's User
model and my custom Profile
model, the controls relating to the Profile form do not seem to be instantiating with the model's value.
from portfolio.
The form now pre-populates the current image being used in the custom Bootstrap file field. When the form is instantiated, it displays the image being used according to the model. Upon using the input picker, it displays the image selected from the hard drive.
from portfolio.
The form now GETs and POSTs successfully instantiating the fields as expected. I had to resolve the issue using a function-based view because it was proving challenging validating multiple forms within the UpdateView
.
At a later stage, I may choose to rewrite the view with a class-based view. I believe it may need a parent class writing too which will include a function that validates multiple forms.
from portfolio.
Profile updates successfully. Issue resolved for now. At a later date, an aspirational item may be to change the view from function-based to class-based.
from portfolio.
This Django package may be able to assist in converting the profile_update
view from function-based to class-based.
https://github.com/kennethlove/django-shapeshifter
from portfolio.
Used Django Shapeshifter to use a CBV approach to the UserUpdateForm
and ProfileUpdateForm
.
Updated tests.
from portfolio.
Related Issues (20)
- Replace Requests Package with HTTPX HOT 1
- Two-Factor Authentication HOT 12
- Post Development Plan
- Change Display of Email Address on Contact Page
- Refactor Signals File in Users App HOT 1
- Django Axes
- Replace Pipenv with Poetry
- Remove Google Analytics
- Unit Tests: Mixins
- Scraping: Styling and Layout Changes
- Text Analysis: Styling and Layout Changes
- Countdown Letters: Styling and Layout Changes
- Countdown Numbers: Styling and Layout Changes
- Roulette: Styling and Layout Changes
- Home Page Amendments
- Change Docker Build
- Upgrade to GitHub Forms for Issues Creation
- Develop Index Page HOT 2
- Blockquote on Blog Post not Displaying Correctly HOT 2
- 2FA Integration HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from portfolio.