These are chat archives for django/django

8th
Sep 2017
John
@flyboy1565
Sep 08 2017 03:59
@annshress , my views are under <APP>/api/views.py
Miracle Ayodele
@iammiracle
Sep 08 2017 05:00
hi guys...
i have tried all possible things but when i try to save to databasei get this error
ModelForm has no model class specified.
Miracle Ayodele
@iammiracle
Sep 08 2017 05:20
dont know what the problem could be
Josef Kolář
@thejoeejoee
Sep 08 2017 05:23
@koderNeptune in your inherited form from ModelForm is missing model property in Meta
Miracle Ayodele
@iammiracle
Sep 08 2017 05:24
class ThreadCommentsForm(forms.ModelForm):
    class Meta:
        models = ThreadComments
        fields = ['thread_comment']
thats the forms.py
@thejoeejoee
Josef Kolář
@thejoeejoee
Sep 08 2017 05:25
@koderNeptune models -> model
Miracle Ayodele
@iammiracle
Sep 08 2017 05:26
see me o...my bad.
thanks @thejoeejoee
Tharunkumar V
@tharun148
Sep 08 2017 10:27
Hi,I have installed Django(1.11.5) and Django-happystamp(0.3) in my local machine(Ubuntu 16.04).After creating the project I have added below in installed appsINSTALLED_APPS = ( ... "happystamp", )when running the server I have attached the error occurred.Please help me to resolve the issue.
Traceback (most recent call last): File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 228, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/core/management/commands/runserver.py", line 117, in inner_run autoreload.raise_last_exception() File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 251, in raise_last_exception six.reraise(*_exception) File "/usr/local/lib/python2.7/dist-packages/django/utils/autoreload.py", line 228, in wrapper fn(*args, **kwargs) File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/local/lib/python2.7/dist-packages/django/apps/registry.py", line 108, in populate app_config.import_models() File "/usr/local/lib/python2.7/dist-packages/django/apps/config.py", line 202, in import_models self.models_module = import_module(models_module_name) File "/usr/lib/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/home/rajkumar/.local/lib/python2.7/site-packages/happystamp/models.py", line 15, in <module> from mezzanine.core.models import Displayable File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/core/models.py", line 24, in <module> from mezzanine.core.fields import RichTextField, OrderField File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/core/fields.py", line 12, in <module> from mezzanine.core.forms import OrderWidget File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/core/forms.py", line 40, in <module> class TinyMceWidget(forms.Textarea): File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/core/forms.py", line 46, in TinyMceWidget class Media: File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/core/forms.py", line 49, in Media static(settings.TINYMCE_SETUP_JS)] File "/home/rajkumar/.local/lib/python2.7/site-packages/mezzanine/conf/__init__.py", line 233, in __getattr__ return getattr(django_settings, name) File "/usr/local/lib/python2.7/dist-packages/django/conf/__init__.py", line 57, in __getattr__ val = getattr(self._wrapped, name) AttributeError: 'Settings' object has no attribute 'TINYMCE_SETUP_JS'
Naved Khan
@navidkhn1
Sep 08 2017 11:43
It looks like you need to add TINYMCE_SETUP_JS to your settings. The docs should have more on that?
Tharunkumar V
@tharun148
Sep 08 2017 13:09
@navidkhn1 How to add the TINYMCE_SETUP_JS
Tim Blazina
@tblazina
Sep 08 2017 13:51
anyone have any experience with creating a ManyToMany field over two junction tables?
kyadondo Timothy
@chadwalt
Sep 08 2017 20:40
hello can someone explain to me what many to many or one to many works, and what is there importance
matrixbot
@matrixbot
Sep 08 2017 20:46
@bittner:matrix.org The are database basics. Read up a bit on databases and table relations first. https://duckduckgo.com/?q=database+introduction+relations+tables
@bittner:matrix.org And this one. https://duckduckgo.com/?q=many+to+many+relationship
kyadondo Timothy
@chadwalt
Sep 08 2017 22:41
@matrixbot thanks