irfanpule / django-form-surveys Goto Github PK
View Code? Open in Web Editor NEWDjango form survey is an application Django to easier create form survey and easy integrated for your project.
License: MIT License
Django form survey is an application Django to easier create form survey and easy integrated for your project.
License: MIT License
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
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..
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
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.
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..
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
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
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?
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?
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..
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.
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,
Add dynamic success page
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 !!
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?
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.
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.
You have a typo there:
the proper exception catch name is
ZeroDivisionError
but You typed ZeroDevisonError
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
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.
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 ?!
This feature makes it easier for developers to determine the number of pagination in the survey list and answer list
Adding choices as a comma-separated list forces the user to write choices without comma. This can make grammar a bit weird.
Suggestions:
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!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.