HM,
Upon a closer look at your code (views.results), you have this:
return render(request, 'polls/results.html', {'guestion': question})
You are passing "guestion" (with a G) to the template instead of "question"
(with a Q).
As such, your template complains when you try to use "question.id"
Dear Monte,
Don't consider me an expert but here is how you may want to handle this
scenario.
1. django-admin.py startproject tournaments
Now, cd into the 'tournaments' directory (wherein you have a manage.py
file). From that directory you can create as many different apps (actually
Hi Monte,
You can use a model from one app in another app.
So, let's say that in competitors/models.py (where you define the models
for your "competitors" app), you have a model class named Participant. This
model represents, well, a participant in the tournament. It is likely, as
you stated,
Hi Rij,
I would approach it like this (though there might be alternative routes to the
same results):
First: Where is the data?
According to your links, the various API endpoints are in the “results” list of
the JSON on http://data.london.gov.uk/api/3/action/package_list
Bussiere,
I have used python-social-auth in one of my projects and it works great.
If you are developing a Python-based web app (irrespective of what
framework you are using - Django, Flask, etc.), it's the best OAuth package
out there, at least in my opinion.
It's hard to guess what may be the
Dear Alan,
If, as you stated, you haven’t worked in a real development job, it might be a
bit of a challenge teaching others how to do the same since you may have
limited exposure to the tools of the trade.
As for resources, here are a few that may be useful:
1. The Official Django Tutorial:
Dear Imed,
Another very useful tutorial that covers a lot of ground about developing
django-powered sites is the "TaskBuster Django Tutorial" at
http://www.marinamele.com/taskbuster-django-tutorial
That site also has other tutorials that are related to other aspects of
(django) website
Ismail,
You don't seem to be handling the value for Product.slug anywhere, either
in the model or the view.
You can fix the slug issue by overriding the Product model's save () method
like this:
def save (self, *args, **kwargs):
if not self.slug:
self.slug = slugify(self.title)
Hi Sum,
Add an "approved" field of type BooleanField ( ) to your Leave model.
So, something like this should work:
In app/models.py:
class Leave (models.Model):
#other fields go here...
approved = models.BooleanField ( )
In app/views.py, handle the query like this:
n the table.
>
> Cheers
>
> On Tue, Aug 29, 2017 at 2:44 PM, sum abiut <suab...@gmail.com
> <mailto:suab...@gmail.com>> wrote:
> Thanks heaps Muhammad.
> Sum
>
> On Tue, Aug 29, 2017 at 10:13 AM, Muhammad M <mwebbi...@gmail.com
> <mailto:mwe
10 matches
Mail list logo