Giter VIP home page Giter VIP logo

arteria / cmsplugin-contact-plus Goto Github PK

View Code? Open in Web Editor NEW
30.0 30.0 33.0 247 KB

With cmsplugin-contact-plus building custom forms for your django-cms project is a breeze. Now it's so easy to build the forms with exactly the fields you want in the order you want - with a minimal effort.

Home Page: https://github.com/arteria/cmsplugin-contact-plus

License: BSD 3-Clause "New" or "Revised" License

Python 94.52% HTML 5.48%
cms cmsplugin-contact django-cms python recaptcha

cmsplugin-contact-plus's People

Contributors

archomeda avatar bitdeli-chef avatar gmh04 avatar invi84 avatar jvamvas avatar kevwilde avatar mitar avatar olibook avatar philippeowagner avatar rfleschenberg avatar stephanrozendaal avatar treavis avatar walterrenner avatar yannik-ammann avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

cmsplugin-contact-plus's Issues

Python 2 Compatible?

Hello, this happens when i install a plugin and make a migrations. Any ideas?

Traceback (most recent call last):
File "manage.py", line 21, in
main()
File "manage.py", line 17, in main
execute_from_command_line(sys.argv)
File "D:\Final-project\env\lib\site-packages\django\core\management_init_.py", line 401, in execute_from_command_line
utility.execute()
File "D:\Final-project\env\lib\site-packages\django\core\management_init_.py", line 377, in execute
django.setup()
File "D:\Final-project\env\lib\site-packages\django_init_.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\Final-project\env\lib\site-packages\django\apps\registry.py", line 114, in populate
app_config.import_models()
File "D:\Final-project\env\lib\site-packages\django\apps\config.py", line 211, in import_models
self.models_module = import_module(models_module_name)
File "C:\Users\lukas\AppData\Local\Programs\Python\Python38-32\lib\importlib_init_.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1014, in _gcd_import
File "", line 991, in _find_and_load
File "", line 975, in _find_and_load_unlocked
File "", line 671, in _load_unlocked
File "", line 783, in exec_module
File "", line 219, in _call_with_frames_removed
File "D:\Final-project\env\lib\site-packages\cmsplugin_contact_plus\models.py", line 5, in
from django.utils.encoding import python_2_unicode_compatible
ImportError: cannot import name 'python_2_unicode_compatible' from 'django.utils.encoding' (D:\Final-project\env\lib\site-packages\django\utils\encoding.py)

Styling Form Elements?

This is pretty hideous:
Screen Shot 2019-10-05 at 15 59 42

Is there a way to add css classes to the elements, like bootstrap's form-control?

automatic response

it would be great if there was a option in which you can setup a automatic response if the form was sent.

Template setting does not work

  • Specify multiple templates, such as:
CMSPLUGIN_CONTACT_PLUS_TEMPLATES = [
    ('cmsplugin_contact_plus/contact.html', 'contact.html'),
    ('cmsplugin_contact_plus/contact.html', 'contact2.html'),
]
  • In the admin for a contact form, choose 'contact2.html'
  • Save and reopen. The template setting was not saved.

Clarify installation process

I had to create initial south migrations for Django 1.6.8. with python manage.py schemamigration cmsplugin_contact_plus --initial.

I'm new to Django. Maybe it's obvious for more experienced users, that they have to create the migrations, but it wasn't for me.

Save Forms

Hi this is my last issue,

Is there a possibility to create the forms and then use it on several pages? like a snippet?

Cheers

muyweb

Feature request: add location field

Hello,
I use this module in some projects and, in one of them, I need to collect user's location. I use (django-map-widgets)[https://github.com/erdem/django-map-widgets] and would like to use it here, but looks a little difficukt to add plugins/widgets to cmsplugin-contact-plus. Being able to use extra Django fields would be very nice.

A possible solution would be to add it to settings.py something like:

def getFormMap(extraField):
   return gismodels.PointField(
      label=extraField.label,
      initial=extraField.initial,
      help_text=extraField.placeholder,
      required=extraField.required)

CMS_PLUGIN_CONTACT_PLUS_WIDGETS = [
   {
      'fieldType': 'LocationMapField',
      'getter': getFormMap
   }
]

Failure when ADMINS is not set up in project settings.

File "/...../www/lib/python2.7/site-packages/cmsplugin_contact_plus/models.py", line 11, in ContactPlus
reciepient_email = models.EmailField(_("Email of reciepients"), default=settings.ADMINS[0][1])
IndexError: tuple index out of range

And Typo: recipients instead of reciepients.

on_delete issue

  File "/home/www/django/home-page-cms/cmsplugin_contact_plus/models.py", line 107, in ExtraField
    form = models.ForeignKey(ContactPlus, verbose_name=_("Contact Form"))
TypeError: __init__() missing 1 required positional argument: 'on_delete'

added , on_delete=models.CASCADE as quick fix

Convert some settings to a model field for each contact form.

It will be useful to have different reply-to, sender, and send copy settings for each contact form so that:

CONTACT_PLUS_FROM_EMAIL
CONTACT_PLUS_REPLY_EMAIL_LABEL
CONTACT_PLUS_SEND_COPY_TO_REPLY_EMAIL

should be converted to a model fied changing these settings into default values for the corresponding field.

Customizing Logic

Hi again,

I wanted to ask if there would be a possibility to customize the logic of the form? Like the text that is displayed when a required field is not filled (mainly translate all this to german)

Thanks in advance!

fail_silently option

If someone changes the password for this email, I'll never know about it while email_message.send(fail_silently=True) is set. Can this be an option to set to false so that I can catch these errors?

reply_to replying only to the DEFAULT_FROM_EMAIL

Hi,

I have an issue with (reply_to). It is always replaying to the DEFAULT_FROM_EMAIL, but not to the email inserted by the user into the contact form.

Could you please provide an example of what should be changed to the original installation?

I`m using Django 1.8.18 and cmsplugin-contact-plus 1.2.12

Thanks in advance,

Mario

How to setup this plugin

I am trying to setup this plugin in admin panel its models are listed but how do I add this to a page. I tried using this plugin templates but blank HTML is rendered ???

Form as .p?

Hey this is probably dumb question, but how can i style an individual element when form is rendered in the contact template?

Would adding a css attribute box to the CMS content editor make sense for this plug in?

Django cms -

Hello,
I use django 1.8 and i have this error in my log:
[Fri Apr 01 17:10:04 2016] [error] New revision!!!! RELOAD!
[Fri Apr 01 17:10:04 2016] [error] 1f89cad5-941b-4da3-b830-19de8bd5c906 (<type 'unicode'>)
[Fri Apr 01 17:10:04 2016] [error] -> None (<type 'NoneType'>)
[Fri Apr 01 17:10:04 2016] [error] reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
[Fri Apr 01 17:10:04 2016] [error] reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
[Fri Apr 01 17:19:42 2016] [error] /var/www/virtualenvs/bcis_site_cms_test/lib/python2.7/site-packages/south/modelsinspector.py:20: RemovedInDjango19Warning: django.contrib.contenttypes.generic is deprecated and will be removed in Django 1.9. Its contents have been moved to the fields, forms, and admin submodules of django.contrib.contenttypes.
[Fri Apr 01 17:19:42 2016] [error] from django.contrib.contenttypes import generic
[Fri Apr 01 17:19:42 2016] [error]
[Fri Apr 01 17:19:42 2016] [error] New revision!!!! RELOAD!
[Fri Apr 01 17:19:42 2016] [error] 1f89cad5-941b-4da3-b830-19de8bd5c906 (<type 'unicode'>)
[Fri Apr 01 17:19:42 2016] [error] -> None (<type 'NoneType'>)
[Fri Apr 01 17:19:42 2016] [error] reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []
[Fri Apr 01 17:19:42 2016] [error] reverse('my_test_app_view'): Reverse for 'my_test_app_view' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: []

I install django==1.9 and i install again django 1.8. and I have always the same error.

My applications installation in my environ virtual are:
$ pip list
cmsplugin-contact-plus (1.2.7)
cmsplugin-filer (1.0.1)
codecov (1.6.3)
coverage (4.0.3)
distribute (0.6.24)
dj-database-url (0.4.0)
Django (1.8)
django-admin-jqueryui (1.8.22)
django-appconf (1.0.1)
django-classy-tags (0.7.2)
django-cms (3.2.3)
django-compat (1.0.10)
django-filer (1.1.1)
django-formtools (1.0)
django-inline-ordering (1.0.2)
django-mptt (0.8.3)
django-polymorphic (0.9.1)
django-recaptcha (1.0.5)
django-reversion (1.8.7)
django-sekizai (0.9.0)
Django-Select2 (4.3.2)
django-simple-math-captcha (1.0.7)
django-treebeard (4.0)
djangocms-admin-style (1.1.0)
djangocms-column (1.6.0)
djangocms-file (1.0)
djangocms-googlemap (0.4.0)
djangocms-inherit (0.1.1)
djangocms-installer (0.9rc2, /var/www/virtualenvs/bcis_site_cms_test/src/djangocms-installer)
djangocms-link (1.7.2)
djangocms-style (1.7.0)
djangocms-text-ckeditor (2.9.0)
easy-thumbnails (2.3)
html5lib (1.0b8)
jsonfield (1.0.3)
Pillow (3.1.1)
pip (8.1.1)
pytz (2016.3)
requests (2.9.1)
setuptools (20.3.1)
six (1.10.0)
South (1.0.2)
tzlocal (1.2.2)
Unidecode (0.4.19)

Please, can you help me? Thanks.

Django cms - ImportError: No module named compat - plugin contact plus.

Hello,
I have an error with deploy my web application in server. In local this web application work well. I use the plugin contact plus 1.2.6, django 1.8, django-cms 3.2.3 and python 2.7

My error is :
$ python manage.py runserver
Traceback (most recent call last):
File "manage.py", line 10, in
execute_from_command_line(sys.argv)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/core/management/init.py", line 338, in execute_from_command_line
utility.execute()
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/core/management/init.py", line 312, in execute
django.setup()
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/init.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate
app_config.ready()
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/contrib/admin/apps.py", line 22, in ready
self.module.autodiscover()
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/contrib/admin/init.py", line 24, in autodiscover
autodiscover_modules('admin', register_to=site)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/django/utils/module_loading.py", line 74, in autodiscover_modules
import_module('%s.%s' % (app_config.name, module_to_search))
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cms/admin/init.py", line 11, in
plugin_pool.plugin_pool.discover_plugins()
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cms/plugin_pool.py", line 32, in discover_plugins
load('cms_plugins')
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cms/utils/django_load.py", line 61, in load
get_module(app, modname, verbose, failfast)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cms/utils/django_load.py", line 45, in get_module
module = import_module(module_name)
File "/usr/lib/python2.7/importlib/init.py", line 37, in import_module
import(name)
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cmsplugin_contact_plus/cms_plugins.py", line 6, in
from cmsplugin_contact_plus.admin import ExtraFieldInline
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cmsplugin_contact_plus/admin.py", line 7, in
from .actions import export_as_csv_action
File "/var/www/virtualenvs/bcis_site_cms_test/local/lib/python2.7/site-packages/cmsplugin_contact_plus/actions.py", line 3, in
from setuptools.compat import unicode
ImportError: No module named compat

My applications installation in my environ virtual are:

cmsplugin-contact-plus (1.2.6)
cmsplugin-filer (1.0.1)
codecov (1.6.3)
coverage (4.0.3)
distribute (0.6.24)
dj-database-url (0.4.0)
Django (1.8)
django-admin-jqueryui (1.8.22)
django-appconf (1.0.1)
django-classy-tags (0.7.2)
django-cms (3.2.3)
django-compat (1.0.10)
django-filer (1.1.1)
django-formtools (1.0)
django-inline-ordering (1.0.2)
django-mptt (0.8.3)
django-polymorphic (0.9.1)
django-recaptcha (1.0.5)
django-reversion (1.8.7)
django-sekizai (0.9.0)
Django-Select2 (4.3.2)
django-simple-math-captcha (1.0.7)
django-treebeard (4.0)
djangocms-admin-style (1.1.0)
djangocms-column (1.6.0)
djangocms-file (1.0)
djangocms-googlemap (0.4.0)
djangocms-inherit (0.1.1)
djangocms-installer (0.9rc2, /var/www/virtualenvs/bcis_site_cms_test/src/djangocms-installer)
djangocms-link (1.7.2)
djangocms-style (1.7.0)
djangocms-text-ckeditor (2.9.0)
easy-thumbnails (2.3)
html5lib (1.0b8)
jsonfield (1.0.3)
Pillow (3.1.1)
pip (8.1.1)
pytz (2016.3)
requests (2.9.1)
setuptools (20.3.1)
six (1.10.0)
tzlocal (1.2.2)
Unidecode (0.4.19)

and my requirements.txt file is :
$ cat requirements.txt
django-cms<3.3
django-treebeard>=2.0

https://github.com/divio/djangocms-column/archive/master.zip?1457965105.28
https://github.com/divio/djangocms-googlemap/archive/master.zip?1457965105.28
https://github.com/divio/djangocms-inherit/archive/master.zip?1457965105.28
https://github.com/divio/djangocms-link/archive/master.zip?1457965105.28
https://github.com/divio/djangocms-style/archive/master.zip?1457965105.28
easy_thumbnails
django-filer>=0.9.12
cmsplugin-filer>=0.10.2
djangocms-admin-style>=1.0.6
djangocms-text-ckeditor>=2.8.1
Django<1.9
pytz
django-reversion>=1.8.7,<1.9
django-classy-tags>=0.3.4.1
html5lib
Pillow>=2.3
django-sekizai>=0.7
six

Thank you for your help.

Manual migration command (MySQL)

These are some manual migration hints...

CREATE TABLE `cmsplugin_contact_plus_contactrecord` (
    `id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
    `contact_form_id` integer,
    `date_of_entry` datetime NOT NULL,
    `date_processed` datetime,
    `data` longtext
);

ALTER TABLE cmsplugin_contactplus add `title` varchar(100) after `cmsplugin_ptr_id`;
ALTER TABLE cmsplugin_contactplus add `email_subject` varchar(256) NOT NULL after `title`;
ALTER TABLE cmsplugin_contactplus add `collect_records` bool NOT NULL after `email_subject`;
ALTER TABLE cmsplugin_contactplus add `template` varchar(255) NOT NULL after `submit`;

Missing migration

The field contactplus.submit was renamed to contactplus.submit_button_text, but this is not reflected in a migration, leading to a runtime error when trying to add the plugin to a page. PR incoming.

Standard From Adress

Hello Everybody,

First of all thanks for that work! My question is, how can I change the from adress which is webmaster@localhost? My Mailserver does not accept mails with that sender...

Thanks!

Cheers muyweb

Feature request: ChoiceField

I'd have thought it would be a fairly common requirement to have the user be able to select from a set of choices. For example, the subject line of an email selected from a set of options which makes it easier to filter emails.

Several recipients

Hi there,

according ContactPlus model, it's not possible to send email to several recipients.
Despite it, is there a trick to achieve this ?

Thank's

Cheers

Manual Migrations MySQL

ALTER TABLE cmsplugin_contact_plus_contactplus MODIFY COLUMN recipient_email varchar(254) NOT NULL;
ALTER TABLE `cmsplugin_contact_plus_contactplus` CHANGE `submit` `submit_button_text` varchar(30) NOT NULL;

cannot import name migrations

With Django==1.4.16 and django-cms==2.4.3 I got the following error.

Traceback (most recent call last):
  File "/var/www/exmple.com/www/lib/python2.7/site-packages/south/migration/base.py", line 302, in migration
    migration = __import__(full_name, {}, {}, ['Migration'])
  File "//var/www/exmple.com/www/lib/python2.7/site-packages/cmsplugin_contact_plus/migrations/0001_initial.py", line 4, in <module>
    from django.db import models, migrations
ImportError: cannot import name migrations

There is a note in the README but this should work anyway.

Affected cmsplugin-contact-plus version: 1.1.13

django-inline-ordering does not work

It seems that cmsplugin-contact-plus depends on django-inline-ordering. The user should add django-inline-ordering to INSTALLED_APPS, but this is not documented. Easy fix, add this to the README.

However, with inline-ordering in INSTALLED_APPS, I am running into another problem:

Uncaught TypeError: InlineOrdering.jQuery(...).sortable is not a function

The last commit in https://github.com/centralniak/django-inline-ordering is from 2013. Maybe it's time to replace that dependency?

__file__ doesn't exist for frozen imports

After installing this extension my django server fails to start with the following stacktrace:

Traceback (most recent call last):
  File "./manage.py", line 20, in <module>
    execute_from_command_line(sys.argv)
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
    utility.execute()
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/django/core/management/__init__.py", line 327, in execute
    django.setup()
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/django/__init__.py", line 18, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/django/apps/registry.py", line 108, in populate
    app_config.import_models(all_models)
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/django/apps/config.py", line202, in import_models
    self.models_module = import_module(models_module_name)
  File "/home/brendan/.venv/myproj2/lib/python3.6/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 978, in _gcd_import
  File "<frozen importlib._bootstrap>", line 961, in _find_and_load
  File "<frozen importlib._bootstrap>", line 950, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 655, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 678, in exec_module
  File "<frozen importlib._bootstrap>", line 205, in _call_with_frames_removed
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/cmsplugin_contact_plus/models.py", line 23, in <module>
    localdata.TEMPLATE_CHOICES = utils.autodiscover_templates()
  File "/home/brendan/.venv/myproj2/lib/python3.6/site-packages/cmsplugin_contact_plus/utils.py", line 45, in autodiscover_templates
    dir = os.path.dirname(_.__file__)
AttributeError: module 'snowpenguin' has no attribute '__file__'

I did a bit of digging and found this discussion: https://bugs.python.org/issue20942

Is this a bug with contact-plus? The only module I have installed that causes this error is snowpenguin (part of django-recaptcha2).

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.