Create Question Model
Specifications for the Model
| Name | Type | Details |
|---|---|---|
| question | Rich Text Field | Question along with any diagram |
| min_mark | Integer | Minimum Mark |
| max_mark | Integer | Maximum Mark. ( Optional ) |
| difficulty | Select (ENUM) | Very Easy / Easy / Moderate / Hard / Expert |
| type | Relational (Foreign Key) | Question Type (like Objective, Numerical, Theory etc.) |
| topic | Relational(ManyToMany) | Question Topics |
| date | Date | Date of setting the question |
| author | Relational | Contributor of question (to Default User Model) |
Admin
- Searchable
- List Items -> Question (first 100 chars), Topics, Type, Difficulty, Mark Range, Author
@aswinshenoy, I am getting a (admin.E108) not a callable attribute type error in admin.py while trying to list_display the given models under Admin section here. Here is my code for admin.py-
class Application(admin.ModelAdmin):
list_display= ('short_description','Topic','Type','min_mark', 'max_mark','difficulty')
admin.site.register(author, Application)
admin.site.register(date)
I know that the above mentioned error means that the admin.py is cannot able to locate my models.
But I do not understand why this is happening as my model is defined in models.py and its imported in admin.py.
@aswinshenoy can I work on this??
@amreshk005 I have assigned you please do let us know if you face any issues
Hello can i have few minutes regardind the project, i followed the steps, i initially did set up of the project through command line can anyone help me for its further working of the project,so i would understand it