Hi,
I'm still a bit new to django, but making slow progress.
I'm wondering how to move forward with a book class as model which has an
author field which
allows adding additional authors.
I have three fields allocated in the SQLite db for up to three different
authors.
What I'm trying to do
Am 12.10.2018 um 22:46 schrieb User1 :
>
> Hello, I am practicing the tutorial part 5, Test and I got an error I can
> solve.
> The code in shell is:
>
> (mientorno) C:\Users\user1\djangowom>python manage.py shell
> Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit
>
Hello, I am practicing the tutorial part 5, Test and I got an error I can
solve.
The code in shell is:
(mientorno) C:\Users\user1\djangowom>python manage.py shell
Python 3.6.3 (v3.6.3:2c5fed8, Oct 3 2017, 18:11:49) [MSC v.1900 64 bit
(AMD64)]
on win32
Type "help", "copyright", "credits" or
I did it in my project. Use pyodbc to connect to sql server and i am using
django 2.0.8
On Fri, Oct 12, 2018, 11:04 AM Pradeep Singh wrote:
> bro...will you help me ...
> i am getting django 404 error ...please tell how to fix it...
> i am using python 3.6 + django 1.11
>
> On Fri, 12 Oct 2018
L
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
bro...will you help me ...
i am getting django 404 error ...please tell how to fix it...
i am using python 3.6 + django 1.11
On Fri, 12 Oct 2018 at 19:35, vineeth sagar
wrote:
> I don't know if it works for 1.8, you would've tested it by now. The link
> I haven given is a current method to
>
> You could make a custom form for your admin which is a model form which
> points to EmployeeSchedule. And in the form its init you can change the
> queryset of the events field:
>
self.fields['events'].queryset = WineryEvents.objects.filter(publish='Y').
I don't know if it works for 1.8, you would've tested it by now. The link I
haven given is a current method to connect with sql server with newer
versions of django, also I think it's about time your company updated your
django version. For 2.1 the link I have given works seemlessly.
On Oct 12,
Use the .review you've defined as related name. The _set is when you don't
have a related name.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Since the related name in the project foreign key is "review" you have to
use that keyword for the related query from project, so it should be
"self.review.all()" instead of "self.review_set.all()" in your Project
methods.
Regards!
On Fri, Oct 12, 2018 at 9:25 AM Melissa Malala
wrote:
>
Thanks. I fixed it
On Fri, Oct 12, 2018 at 3:07 PM Ігор Магур wrote:
> You need to import polls.views, and pass view.index into path func
> Ex from polls import views
> urlpatterns = [
> path('polls/', views.index),
> ]
>
> --
> You received this message because you are subscribed to the
Getting an error that says "Project object has no attribute review_set"
when trying to get the mean of ratings using Numpy. HTML looks something
like this, what could be the problem? Please have a look below and let us
know what you think:
{{ project.review.count }} reviews ({{
well, considering that 1.8 is no longer supported, you're not getting any
backports and updates. which if you're doing a production level app, is
pretty bad.
Unfortunately, seems if you want to use the recent LTS or newer versions,
SQL server is not an option unless you're willing to update
You need to import polls.views, and pass view.index into path func
Ex from polls import views
urlpatterns = [
path('polls/', views.index),
]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
Hello everyone,
I am new to Django. I have been following the documentation and getting
started with my first app.I get the following TypeError: view must be a
callable or a list/tuple in the case of include(). I added path(r'^polls/$'
,'polls.views.index'), in the mysite url file just because
Hi Vineeth,
Just had to make some changes in an old project which uses Sql Server 2014
and yeah I am using django 1.8.
Is it that for the link you have given should I use Django 2.1 version or
1.8would work???
Thanks
Rakhee
--
You received this message because you are subscribed to the
Hi Michal,
Thanks a lot. That was an eye-opener and a big help :)
Thanks.
On Friday, October 12, 2018 at 1:39:38 PM UTC+5:30, Michal Petrucha wrote:
>
> -BEGIN PGP SIGNED MESSAGE-
> Hash: SHA512
>
> On Fri, Oct 12, 2018 at 12:52:31AM -0700, Web Architect wrote:
> > Hi,
> >
> > We
is it because i have forgotten to import CommentForm?
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA512
On Fri, Oct 12, 2018 at 12:52:31AM -0700, Web Architect wrote:
> Hi,
>
> We are using Django for our ecommerce site.
>
> I have some confusion on when the code gets executed in Django. I have a
> django form with a choice field in module m1.py:
then a new error pops up:
[image: Udklip3.PNG]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to this
Hi,
We are using Django for our ecommerce site.
I have some confusion on when the code gets executed in Django. I have a
django form with a choice field in module m1.py:
class SomeForm(forms.Form):
field = forms.ChoiceField(choices=get_choices())
def get_choices():
return some
Use id instead of pk
On Oct 12, 2018 10:34, "Glen D souza" wrote:
>
> *def add_comment(request, slug):*
> *post = get_object_or_404(Post, slug=slug)*
> *if request.method == 'POST':*
> *form = CommentForm(request.POST)*
> *if form.is_valid():*
> *comment =
*def add_comment(request, slug):*
*post = get_object_or_404(Post, slug=slug)*
*if request.method == 'POST':*
*form = CommentForm(request.POST)*
*if form.is_valid():*
*comment = form.save(commit=False)*
*comment.post = post*
*
If i do that i get another error:
[image: Udklip2.PNG]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to django-users+unsubscr...@googlegroups.com.
To post to
try renaming path('post//comment/', views.add_comment, name=
'add-comment'),
to path('post//comment/', views.add_comment, name='add-comment'),
On Fri, 12 Oct 2018 at 12:36, Robert CR wrote:
> i fixed the error, thanks. But there is already a new one when i try to
> add a comment. D:
>
>
i fixed the error, thanks. But there is already a new one when i try to add
a comment. D:
[image: Udklip.PNG]
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to
Hello,
Have you tried adding an app_name = 'your_app_name' in the URLs.py file?
Thanks
On Oct 12, 2018 09:36, "Glen D souza" wrote:
> Hi,
>
> Try after name-spacing url patterns i.e
>
> app_name = 'blog'
>
> urlpatterns = [
> path('', PostListView.as_view(), name='blog-home'),
>
Hi,
Try after name-spacing url patterns i.e
app_name = 'blog'
urlpatterns = [
path('', PostListView.as_view(), name='blog-home'),
path('user//', UserProfileListView.as_view(), name=
'user-profile' ),
path('user//posts/', UserPostListView.as_view(), name=
'user-posts'),
Try adding for action to your add_comment url then submit the form.
I guess currently form is getting submitted in the same page.
On Friday, October 12, 2018 at 12:00:03 PM UTC+5:30, Robert CR wrote:
>
> here is the template file.
>
> *add_comment.html*
>
>
>
> *{% extends "blog/base.html" %}{%
here is the template file.
*add_comment.html*
*{% extends "blog/base.html" %}{% load crispy_forms_tags %}{% block content
%}{%
csrf_token %} Comment {{ form|crispy }}
Post Comment!
{% endblock content %}*
--
You
Post the relevant files if you want someone to help
On Fri, 12 Oct, 2018, 11:44 AM ashok kumar reddy, <
ashok1101kuma...@gmail.com> wrote:
> Hello everyone . When I try to setup static Media ,I am repeatedly getting
> error in URLs.py(urlpatterns not defined ). could you solve this.
>
> --
> You
Your question does not make sense (as written): "To add a new event I would
like to pick from a drop down list of only the events that are in the
future" ..
Why should adding a new event depend on you selecting another event? Are
the events related or dependant in some way; that is not clear?
If you wrote something like this:
if settings.DEBUG:
# static files (images, css, javascript, etc.)
urlpatterns += path(...)
Make shure that you defined urlpatterns before, like urlpatterns = [], or
probably missing definition sign. Need your's urls.py content for a correct
answer)
It looks like they supply an API. So all you should have to do is create
views to process calls to & results from that API. You only need DRF if
you are storing data locally via your own models.
On Monday, 8 October 2018 18:31:28 UTC+2, Caleb Bryson wrote:
>
> Hey guys I am trying to figure
Hello everyone . When I try to setup static Media ,I am repeatedly getting
error in URLs.py(urlpatterns not defined ). could you solve this.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiving
35 matches
Mail list logo