These are chat archives for django/django

9th
Feb 2018
:]
@elcolie
Feb 09 2018 07:55
Hi
As far as I know FirebaseDB is a one sort of database
Then I have a question on this thing. Please share your experience with me for future discussion
Diego Castro
@diegocastrum
Feb 09 2018 10:14
Hi guys! I need some input from you. I'm looking for a lib/method/idea... to give to the admin users of our webapp the posibility of create his own forms. What we need exactly is some web interface where the user can create his own forms by himself. Do you have some ideas about this point?
Fortune Tede
@fortunetede
Feb 09 2018 10:40
@badcoder28 @ickma thanks ..i have solved my problem
:]
@elcolie
Feb 09 2018 11:11
@diegocastrum What kind of form you are doing? How many degree of freedom you are going to use?
For I myself I use let frontend render the widget into form. And I store value in the Django
cubocsj
@cubocsj
Feb 09 2018 12:27
I am looking for OSM widgets to use with GeoDjango that perhaps just extends the default OSMWidget. But one that add a search field to the widget. Everything I come across is using Google Maps. Is there something interesting out there? Or perhaps a blog post? Thanks
Diego Castro
@diegocastrum
Feb 09 2018 13:06
@elcolie I mean an html <form>. We're looking for some way to create a web interface where the user can add all form fields what he needs to create a form and render it in another module/app
@elcolie Something like django-forms-builder (https://github.com/stephenmcd/django-forms-builder)
philipmutua
@philipmutua
Feb 09 2018 14:00
Hi everyone, anyone care to help find out what is wrong : I am getting the following logs:
Traceback (most recent call last):
  File "manage.py", line 10, in <module>
    execute_from_command_line(sys.argv)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 443, in execute_from_command_line
    utility.execute()
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 382, in execute
    self.fetch_command(subcommand).run_from_argv(self.argv)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 261, in fetch_command
    klass = load_command_class(app_name, subcommand)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/core/management/__init__.py", line 69, in load_command_class
    module = import_module('%s.management.commands.%s' % (app_name, name))
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/south/management/commands/__init__.py", line 10, in <module>
    import django.template.loaders.app_directories
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/template/loaders/app_directories.py", line 21, in <module>
    mod = import_module(app)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/utils/importlib.py", line 35, in import_module
    __import__(name)
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/constance/__init__.py", line 3, in <module>
    config = Config()
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/constance/config.py", line 10, in __init__
    utils.import_module_attr(settings.BACKEND)())
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/constance/backends/database/__init__.py", line 22, in __init__
    from constance.backends.database.models import Constance
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/constance/backends/database/models.py", line 7, in <module>
    from picklefield import PickledObjectField
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/picklefield/__init__.py", line 5, in <module>
    from picklefield.fields import PickledObjectField # reexport
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/picklefield/fields.py", line 79, in <module>
    class PickledObjectField(_get_subfield_superclass()):
  File "/home/aphya1/projects/AcornAccounting/acornaccounting/local/lib/python2.7/site-packages/django/db/models/fields/subclassing.py", line 15, in __new__
    new_class = super(SubfieldBase, cls).__new__(cls, name, bases, attrs)
TypeError: Error when calling the metaclass bases
    metaclass conflict: the metaclass of a derived class must be a (non-strict) subclass of the metaclasses of all its bases
ptink
@ptink
Feb 09 2018 15:11
@philipmutua you have a subclass and 2 or more of the parent classes have metaclass attributes so it doesn't know which to use
but without seeing the code you're executing I couldn't tell you more
ptink
@ptink
Feb 09 2018 15:16
what version of django are you using?
ptink
@ptink
Feb 09 2018 15:25
cos it looks like that version of django-picklefield you're using is quite old, there's definitely an updated version (1.0.0) that might work better with newer versions of django
Rob
@borriej
Feb 09 2018 16:29
hi all, im a frontend dev (angular 5) ... and im using a django backend
i would like to add a cache_version to my django settings
and use it in the base template
but it's not showing in the source of the html
im doing":
/src/app/settings/base.py
import os

import environ
from django.utils.translation import gettext_lazy as _

env = environ.Env()


...
CACHE_VERSION = '?v0.1.1'
src/app/context_processors.py
from django.conf import settings as django_settings


def settings(request):
    """Add setting variables to the context."""
    return {
        'settings': {
            'BASE_URL': django_settings.BASE_URL,
            'CACHE_VERSION': django_settings.CACHE_VERSION,
        }
    }
<!-- {% load i18n static %} -->
<!DOCTYPE html>
<html>
    <head>
...
        <link rel="apple-touch-icon" sizes="180x180" href="{% static 'app/assets/favicon/apple-touch-icon.png' %}{{ CACHE_VERSION }}">
do i need to run a command?
i've quit and restarted my server many times