I need to send the value of the selected option in a drop down to the views.
My html code is as follows:
>
> Select version to compare with
> {%for ver in version_list%}
> **{{ver}} option>**
> {% endfor %}
>
The above is giving me the following error:
> Page not found (404)
> Request Meth
class IndexView(generic.ListView):
template_name = 'polls/index.html'
context_object_name = 'latest_question_list'
def get_queryset(self):
"""Return the last five published questions."""
return Question.objects.order_by('-pub_date')[:5]
the def get_queryset(self): f
Hi Mike,
On 01/11/2019 09.14, Mike Starr wrote:
Hi! There's a lot of error message to copy and paste so please request
what you would like to see specifically. I am at
https://docs.djangoproject.com/en/2.2/intro/tutorial04/#use-generic-views-less-code-is-better in
the Django tutorial and it se
Hi! There's a lot of error message to copy and paste so please request what
you would like to see specifically. I am at
https://docs.djangoproject.com/en/2.2/intro/tutorial04/#use-generic-views-less-code-is-better
in
the Django tutorial and it seems replacing HTTPRequests with GenericViews
bro
It works perfectly by coding them as a model in the same way you always do.
The only thing you have to do is make sure that you set the table name and
that migrations shouldn't be handled for the view:
class Meta:
managed = False
db_table = 'events_sessionparticipant'
Regards,
Andréas
Just code for them in models.py just as a table. And it will work.
I have done that in my project. It is working fine.
On Thu, Oct 11, 2018, 1:38 AM django_learner wrote:
> Hi everyone,
>
> I am using SQL SERVER and I have some predefines VIEWS in the database,
> what I am looking for is to man
Hi everyone,
I am using SQL SERVER and I have some predefines VIEWS in the database,
what I am looking for is to manage that VIEWS
Thank you
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving em
Hello, I configured in my settings SECURE_SSL_REDIRECT=True, but now I want
to disable it for some views.
I have seen that there is an option SECURE_REDIRECT_EXEMPT where I can
define a list of regular expressions for it.
But for some reason I can't make it work. I've tried to use the same
regul
How do I use database views in django, many falão that view must be mapped
same table, but it should certainly give problems using the migration.
What is the best alternative to be used in this situation? heard in django-
datatable-view is an alternative?
--
You received this message because
I am using Django Rest Framework for serialize data. I came across a
scenario where I have to use Database Views as Model.
*My Model*
class A(models.Model):
name = models.CharField(max_length=240, blank=True)
value = models.CharField(max_length=240, blank=True)
class Meta:
Hello, everyone!
I've released 1.0 beta of the app:
https://github.com/05bit/django-smarter
It helps with adding generic views. Actually, I've build this app for
one of my projects, which is 80% based on generic views, and it seemed
very useful for that particular case :)
As my project evolved a
On Sun, Feb 5, 2012 at 1:33 AM, Peter of the Norse
wrote:
> You should look into making a foreign key relationship if there actually is
> one. That way you can just annotate the the sums.
Opted for the same now.
> Otherwise you should calculate the sum in the view (NOT the template) and add
>
You should look into making a foreign key relationship if there actually is
one. That way you can just annotate the the sums. Otherwise you should
calculate the sum in the view (NOT the template) and add it to the client.
Python allows you to add any value you want to any object.
On Feb 3, 2012
Calculate in view, in template should print values . Can group it in dict
i think.
On Feb 3, 2012 10:39 PM, "Sandeep kaur" wrote:
> On Fri, Feb 3, 2012 at 7:52 PM, Weldan wrote:
> > Entries.objects.count()
> >
> That will be applicable if I want to his for only 1 table's entry.
> But here I ha
On Fri, Feb 3, 2012 at 7:52 PM, Weldan wrote:
> Entries.objects.count()
>
That will be applicable if I want to his for only 1 table's entry.
But here I have views as :
cd = form.cleaned_data
name_and_address = cd['name_and_address']
Entries.objects.count()
On Feb 3, 2012 10:12 PM, "Sandeep kaur" wrote:
> Can I apply some operations on the views ( of database) that are
> created by me? Eg: to do sum of some filtered entries. If yes, then
> how?
>
> --
> Sandeep Kaur
> E-Mail: mkaurkha...@gmail.com
> Blog: sandymadaan.wordpre
Can I apply some operations on the views ( of database) that are
created by me? Eg: to do sum of some filtered entries. If yes, then
how?
--
Sandeep Kaur
E-Mail: mkaurkha...@gmail.com
Blog: sandymadaan.wordpress.com
--
You received this message because you are subscribed to the Google Groups
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > Wow! I didn't know it would be that simple!
> >
> > What about convenience functions, get_relatedobjectname()?
> > Can 'relatedobjectname' be a field name passed as a parameter?
>
> Yes,
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
> Note that this is just Python -- there's nothing Django-specific about
> these examples. Isn't Python the best? :)
I find that in Python, the main obstacle between my thoughts and
simple code that does exactly what I want is generally my ow
On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> Wow! I didn't know it would be that simple!
>
> What about convenience functions, get_relatedobjectname()?
> Can 'relatedobjectname' be a field name passed as a parameter?
Yes, you can pass that in dynamically. For that example, you'd do this:
On 6/16/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > As for my initial question I apologize for the confusion, I didn't
> > mean to use the generic views as described in the Django tutorials. I
> > want to be able to make some functions gen
On 6/16/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> As for my initial question I apologize for the confusion, I didn't
> mean to use the generic views as described in the Django tutorials. I
> want to be able to make some functions generic. Please let me give you
> an example: http://paste.e-scribe.
On 6/14/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote:
>
> On 6/13/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> > Now we want to use the same model to create a contact tree for a given
> > user: we determine who this user can view, e.g. personal phone
> > numbers. The tables have different name but h
On 6/13/06, Sam Tran <[EMAIL PROTECTED]> wrote:
> Now we want to use the same model to create a contact tree for a given
> user: we determine who this user can view, e.g. personal phone
> numbers. The tables have different name but have the same function.
> Obviously we'd like to use the same view
Hi All,
We are working on a service provisioning workflow interface using Django 0.91.
We wrote some views that are being used to create/modify/delete
manager/subordinates relationships with or without inheritance
(Manager can also manage a subordinate's subordinates). We can also
visualize the
25 matches
Mail list logo