GithubHelp home page GithubHelp logo

irfanpule / django-form-surveys Goto Github PK

View Code? Open in Web Editor NEW
54.0 54.0 18.0 9.38 MB

Django form survey is an application Django to easier create form survey and easy integrated for your project.

License: MIT License

Python 20.27% HTML 14.42% CSS 0.09% JavaScript 65.21%
django form python summary-reporting survey

django-form-surveys's People

Contributors

butker avatar dependabot[bot] avatar geekhamza1 avatar irfanpule avatar martink84 avatar muhamadanjar avatar philippe-docourt 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  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

django-form-surveys's Issues

Feature Theme: opstion bootstrap 5

I'm having trouble using tailwind. I decided to create a theme option that can use bootstrap and tailwind. In the future, I will develop more using the bootstrap theme. If the tailwind theme remains to be used, I hope someone can contribute to the tailwind theme.

Step

  • structure theme to easy switch theme
  • make sure tailwind running well and set as default theme
  • create bootstrap theme

Update string download response

Halo,

Saat ini jika download response maka untuk jawaban yang tipenya choices akan menampilkan key dari pilihannya.
Setelah di telusuri sepertinya di fungsi download masih menggunakan answer.value sehingga masih mengambil real value, sedangkan di detail sudah menggunakan answer.get_value untuk menyesuaikan dengan jenis tipe datanya..

Forget to remove migration

pls, revert migration too. I can migrate cause it is because of issue #40, file migration 0011_alter_question_key.py dependencies on 0010_model_translation . I think you need migration to file 0009, delete the 0010 migration file and make migration against to generate new file migration

ModuleNotFoundError: No module named 'djf_surveys.admins.v2'

Got an error message ModuleNotFoundError: No module named 'djf_surveys.admins.v2'
Upon troubleshooting, I commented the from djf_surveys.admins.v2 import views as admin_views_v2 and change the admin_views_v2. to admin_views. from the

path('question/add/<int:pk>/<int:type_field>', admin_views_v2.AdminCreateQuestionView.as_view(), name='admin_create_question'),
 path('question/edit/<int:pk>/', admin_views_v2.AdminUpdateQuestionView.as_view(), name='admin_edit_question'),

after changing it, it works perfectly. I also look where is the admin_views_v2 but I cant find it.

Can you please permanently fix this? thanks a lot.

Path: \py\lib\python3.11\site-packages\djf_surveys\admins\urls.py

from django.urls import path
from djf_surveys.admins import views as admin_views
from djf_surveys.admins.v2 import views as admin_views_v2


urlpatterns = [
    path('', admin_views.AdminSurveyListView.as_view(), name='admin_survey'),
    path('create/survey/', admin_views.AdminCrateSurveyView.as_view(), name='admin_create_survey'),
    path('edit/survey/<str:slug>/', admin_views.AdminEditSurveyView.as_view(), name='admin_edit_survey'),
    path('delete/survey/<str:slug>/', admin_views.AdminDeleteSurveyView.as_view(), name='admin_delete_survey'),
    path('forms/<str:slug>/', admin_views.AdminSurveyFormView.as_view(), name='admin_forms_survey'),
    path('question/add/<int:pk>/<int:type_field>', admin_views_v2.AdminCreateQuestionView.as_view(), name='admin_create_question'),
    path('question/edit/<int:pk>/', admin_views_v2.AdminUpdateQuestionView.as_view(), name='admin_edit_question'),
    path('question/delete/<int:pk>/', admin_views.AdminDeleteQuestionView.as_view(), name='admin_delete_question'),
    path('question/ordering/', admin_views.AdminChangeOrderQuestionView.as_view(), name='admin_change_order_question'),
    path('download/survey/<str:slug>/', admin_views.DownloadResponseSurveyView.as_view(), name='admin_download_survey'),
    path('summary/survey/<str:slug>/', admin_views.SummaryResponseSurveyView.as_view(), name='admin_summary_survey'),
]

Update: I compared the one that was installed in my computer and the one on this repo, the directory djf_sruveys/admins/ has no v2 folder. Thus, the reason of the error.

https://pypi.org/project/django-form-surveys/

I hope the package will be updated soon. thanks.

change type field choices question

Halo, I need more character to fill the choices on question model. Please can you change the type field of choices to TextField?

Thanks before..

editing

bro i need help ! i want edit in the djf_surveys app migrations and templates ... its look like ineed to edit INSIDE site-packages ...please guide me
thanks

[Ask Feature] Add Key or Identifier

Hello, i have some problem get specific questions or answer, can you add key or identifier to get value question or answer.
Currently i have problem to get that data.

Thanks

Database data automatically deletes after a while.

I've cloned the project and have customized it to suit my forms data and survey. Migration and everything works fine, then I populated the database (SQLite) with Questions and Surveys.
This is where the issue comes up. After a while after I've loaded data into the database, upon loading the app I notice that all data populated have been deleted and everything looks empty as if I've never populated the database.

Kindly suggest any idea where this problem might be coming from. It's the first time I'm encountering such problem. It looks very strange to me. Do you have any automated script that wipes the database over time?

Question, not really an issue.

I would like to store an identifier with each saved copy of the survey results. The identifier is to be used to associate the survey results with the person taking the survey.

What is the recommend way to do that?

`Key` field on `questions`

Halo,

Saya ada kebutuhan untuk mengambil jawaban dari pertanyaan tertentu. Tapi ternyata mendapat kesulitan karena pada pertanyaan tidak ada identifier yang unique yang bisa digunakan untuk langsung menunjuk ke pertanyaan pada survey tertentu.

Apa bisa ditambahkan satu field key pada model questions, sehingga untuk kasus diatas saya bisa mengambil data yang diinginkan menggunakan key..

Data Model nya mungkin bisa seperti berikut:
key = models.CharField(unique=True, blank=True, null=True)

Terima Kasih..

[Request Feature] Personal Response Page

Add one feature for users to be able to see the results of their own survey without seeing the responses of other users. Currently, if the user wants to see the results of the survey, they are directed to the survey page for all responses so that they can see the responses of others.

Wrap Text Details

Halo pak, kami menemukan sedikit temuan di halaman details survey, teks yang diinputkan jika tidak memiliki spasi maka akan melewati card seharusnya, berikut terlampir contohnya..

image-2

Restrict surveys by role or by user

Hi everyone!

first of all, this is a very nice and useful django project.

I would like to know if there is a way to restrict specific surveys by users or roles.
if not, do you have any recommendation for extending this app in a way that I could do it?

All the best,

BUG: Download Report

Halo,

Sepertinya saya menemukan bug pada hasil report atau download respon. Jadi ada beberapa jawaban yang header nya tidak sesuai, seperti gambar berikut pada baris ketiga dari bawah..

Screen Shot 2022-07-22 at 11 26 12

Error migration

I already have DB with the previous version DJF 1.6.5 and I got an error when running the migration of file 0010_model_translation ...

msg :

django.db.utils.IntegrityError: duplicate key value violates unique constraint "djf_surveys_question_key_key"
DETAIL:  Key (key)=() already exists.

can you help with that !!

[Ask Feature] Limitation max_length on the field model

I have some problems with the max_length constraint on model fields (particularly in model answer values when type is text area).
can you increase the max_length limit or set some value with a global variable in the settings app?

Datefield and large surveys

There is a gray/blue line across the page whenever using a DateField question in a survey that extends across the page vertically.

I tried to debug it and find the source and it appears to be coming from a div right below the input field of the date picker component. I tried to go through the templates but could not find the div anywhere, so I assume it's coming from Tailwind. Since I'm not a css/js developer I unfortunately failed to investigate this further.

image

image

Multiple ratings

When having multiple ratings in a survey, the user can only check the first rating. The others are not rateable.
For each subsequent star rating I get "Uncaught SyntaxError: Identifier 'ratingStars' has already been declared" in the browser.

Exception Value: 'AdminCreateQuestionView' object has no attribute 'object'

hello .
thank you for this package.
Issue:
when I set novalidate attribute on form of in admin in section of create question and submit empty form I got this exception.
example URL : https://localhost/surveys/dashboard/question/add/1/0

and because I'm new in django handel it with this way:
path: djf_surveys/admins/v2/views.py

def post(self, request, *args, **kwargs):
form = self.get_form()
if form.is_valid():
question = form.save(commit=False)
question.survey = self.survey
question.type_field = self.type_field_id
question.save()
messages.success(self.request, gettext("%(page_action_name)s succeeded.") % dict(
page_action_name=capfirst(self.title_page.lower())))
return self.form_valid(form)
else:
context = {
'form': form,
'title_page': self.title_page,
'sub_title_page': self.get_sub_title_page(),
'title': self.get_sub_title_page(),
'survey_name': self.survey.name,
'type_field_id': self.type_field_id,
}
return self.render_to_response(context=context, )

        # return self.form_invalid(form)  # original code

# def get_context_data(self, **kwargs):
#     context = super().get_context_data(**kwargs)
#     context['type_field_id'] = self.type_field_id
#     return context

Anonymous response redirected to login page

When submitting an anonymous survey, the user gets rerouted to login page, which doesn't really make sense.

It is probably due to the success_url

class SurveyFormView(FormMixin, DetailView):
    template_name = 'djf_surveys/form.html'
    success_url = reverse_lazy("djf_surveys:index")

Suggestions: Add a customizable success page and redirect to that, or do not redirect and only display the success message.

Languages problem

hey bro ! i appreciate your work in the project
i just have question about Languages , i uncommented LANGUAGE_CODE = "fr"
but i still can see english in the project
so how i can use the local folder transalation ?!

change from comma-separated list

Adding choices as a comma-separated list forces the user to write choices without comma. This can make grammar a bit weird.

Suggestions:

  • Either (preferred) create a new model called choice, and use a onetomany relationship with question, or
  • use some other, less-common char to split the string into choices.

The first suggestion would allow choices to have more attributes, like "correct answer" or "score", if you want to do a quiz and so on.

PS. I Really like this app, thanks for taking the time!

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.