It is ForeignKey (capital K).
In your files you sent you missed the one file it was actually
complaining about :
On 06/05/18 18:09, Avitab Ayan Sarmah wrote:
index.html:
{% if latest_question_list %}
{% for question in latest_question_list %}
{{
question.question_text }}
{%
I can't imagine having an application where username is optional ...
On 06/05/18 17:48, lakshitha kumara wrote:
hi anthony
Thank you for reply on this site username field not required field for
user but its set as required field on backend so i need assing user
id as as username if username
Yes - but that is very different from what you are asking - Facebook
have a two stage form - first set the details - and then set the user
name. Their user name isn't optional - it is always mandatory - it is
just set at stage two.
You can assign any value to any variable you wish - this
Of course there is :
on the view which responds to your registration form (likely to be where
you call authenticate) - you simply test if the username field has been
set when the registration is posted - and if not set it to be whatever
you want.
Or - in your custom backend you can do the
What does the form contain ?
Does the web page you get give you an upload button ?
Does the code in the view get triggered ?
Do you get any errors ?
On 13/05/18 04:23, carlos.davalo...@tectijuana.edu.mx wrote:
views
def ArticuloFormA(request,Materiaid):
Articulos =
I would agree with that - test any custom functionality -
* Custom methods (including __str__ and __repr__)
* custom managers
* Triggers (that maybe save custom fields on update)
* validations - testing to ensure that the right validation is
performed on that field - i.e. you linked the
Can you be clear what you are trying to do ?
Did you want your Sphinx Page to display an alternative Django
documentation - i.e. a module reference for Django ?
Or did you want your Sphinx Page to document your app - if so the issue
is that your rst just calls for the views module - and
ROOT_URLCONF ideally point to the top level project urls.py if you have
one - if you point it to an app's urls.py - you have to them make sure
you link that app back to all the other (which sort of defeats the point
of the app) - and make sure that something you refers forward to the
admin
In your MySite\urls.py :
urlpatterns = [
path('', include('polls.urls')),
path('admin/', admin.site.urls),
]
should be
urlpatterns = [
path('polls', include('polls.urls')),
path('admin/', admin.site.urls),
]
Django doesn't assume that the url should be /polls - just
Does the file actually exist - it should be in :
*my_site/polls/templates/polls/*
https://docs.djangoproject.com/en/2.0/intro/tutorial03/#write-views-that-actually-do-something
Assuming you haven't changed the TEMPLATES settings in some way.
--
--
Anthony Flury
email :
Although Django doesn't support the Temporal tables directly - it gives
you all the tools you need to create one.
And there are some installable extensions :
django-temporal-models :
https://github.com/TyumenGortrans/django-temporal-models
You should be able to install it by
Reusable components are exactly what separate apps are for; Give your
resuable code a nice API - whether it adds new field types,
new models, new templates etc, and then put that all in an app.
Writing an entirely reusable app takes a lot of skill and thought in my
experience; extra fields,
The only way I can think of is when your user goes to log in - check if
their session id is already recorded.
When they login - I assume that they get an new Session Id - and remap
the data from their old session id to their new session Id.
Would that work ?
On 12/06/18 11:01, Siddharth
The errors are relatively obvious to be frank - see the responses below ...
On 08/06/18 14:56, Avitab Ayan Sarmah wrote:
Can you tell me what is wrong in my admin.py file because from
exception it seems that list_display() is having something wrong which
I am not able to find out
On Fri 8
How are you authenticating them ?
Assuming you call :
authenicate( username, password)
then before that call - store the sesssion key
after that call - identify the new session key
with the old and new session keys - now update the database - so that
the cart gets associated with
Basically no.
While there might be a WYSIWYG editor for the templates (which are basically
HTML, JS and CSS with an embedded python like script) they will only edit the
html within the template file and you won’t see the auto generated html for the
individual Django fields, or the other
What is the code for your Choice model. The error message clearly states that
the Choice model is the one with the problem.
--
Anthony Flury
email : anthony.fl...@btinternet.com
Twitter : @TonyFlury
> On 26 May 2018, at 18:47, Kranthi Kiran <1991.kran...@gmail.com> wrote:
>
> Text of error
On 04/06/18 12:01, Gerald Brown wrote:
On Monday, June 4, 2018 at 6:58:39 PM UTC+8, Gerald Brown wrote:
I have been using ./manage.py shell for awhile and now all of a
sudden it has stopped working with the error "AttributeError:
'property' object has no attribute '__dict__'". I
Is this a new or a update from the front end ?
If new :
1 Extract json using : data = json.load( request.POST['json'] -
this converts data to a dictionary (assuming that the json is in the
'json' field in the message.
2 Validate as necessary
3 Create instance : instance =
Is this a new or a update from the front end ?
If new :
1 Extract json using : data = json.load( request.POST['json'] -
this converts data to a dictionary (assuming that the json is in the
'json' field in the message.
2 Validate as necessary
3 Create instance : instance =
Does the test client execute javascript as well ? I can't remember.
On 05/06/18 00:14, Bernd Wechner wrote:
Thanks Melvyn, looks exactly like what I wanted! Will investigate. I
had a feeling this could not be a novel or unique use case.
Regards,
Bernd.
On Monday, 4 June 2018 20:09:25
Forwarded Message
Subject: Re: relation “” does not exist in django for app name with
mixed-case
Date: Wed, 6 Jun 2018 17:22:13 +0100
From: Anthony Flury
To: Majid Hojati
The problem isn't the name of the model. I doubt Django is going to have
an issue with
I can't see anything necessarily wrong in terms of most browsers but it
isn't strictly compliant with the HTML standards.
To be strict HTML, your html files should be including *html* and *body*
tags as a minimum.
The *html* tag starts and end the html file - in theory browsers are
entitled
On 25/06/18 15:57, mr.sathee...@gmail.com wrote:
I want to know the IP is malicious or not by simple web application
since I'm a beginner I unable to do it. help me
Define malicious ? You would need to look at how it is normally defined
(normally companies use blacklists of IP address ranges -
At first glance it looks like you haven't applied a migration to this
computer.
at the command line on this computer - in the man project directory :
If you have not copied the migration scripts from your development
machine do this first :
$ python manage.py makemigrations
and then do
Lets troubleshoot:
* Does the directory show up when you do a *dir* command in projectdir ?
* Can you do anything on the *mysite* directory - can you rename it,
or even delete it ?
* Can you see it in File explorer
* Can you manually create a directory in your *projectdir* ?
* Can you
On 03/05/18 06:59, Daisy wrote:
Thank you very much for your reply, and here I my answers:
* Does the directory show up when you do a *dir* command in
projectdir ? It does not show up, although it says that there are 2
directories (see attachment).
Those two directories '.' & '..' are
What is wrong with a special type of Field - which is a URL, but also
have augmented data items which are stored on the model?
As far as I know - there is no rule that states that each 'Field' on a
model has to have one and only one field in the database. Even if you
have one and only one
On 03/05/18 08:06, Anthony Flury wrote:
On Thursday, 03 May, 2018 03:25 PM, Daisy wrote:
I tried what you suggested and got this:
D:\projectdir>python create_dir.py
Traceback (most recent call last):
File "create_dir.py", line 1, in
from os import mkdirs
Django 2.0 docs suggest using reportlab :
https://docs.djangoproject.com/en/2.0/howto/outputting-pdf/
I had some success with : pupeteer -
http://django-puppeteer-pdf.readthedocs.io/en/latest/ - which works by
having a CBV type framework - so you subclass a PDF template view - and
that will
Serves me right for writing code without testing :-(
It of course should be :
import os
top_dir = os.path.join(os.getcwd(), 'python_created_me')
os.makedirs(top_dir)
Glad you have it sorted - and glad it turned out not to be Django ...
On 03/05/18 17:06,
I think the root cause of the errors was due to an incorrect settings -
but Fidel is right that your views.py wasn't great either.
On 03/05/18 17:36, Avitab Ayan Sarmah wrote:
thank you Fidel, and i will take care of it
On Thu, May 3, 2018 at 9:57 PM, Fidel Leon
What are the rules - you say that a query string of '10FTK' should match
'10FTH86RSK', but also '10FTK', '10F6TK', '10FTK4'
I think the problem is that the rules aren't 100% clear.
* For '10FTK' to match '10FTH' you actually only care about the
first 4 characters ?
* For '10FTK' to
On 14/07/18 15:59, Mickael Barbo wrote:
Hi Anthony
Michael
Thanks for sharing your experience.
"1 file one object doesn't mean what you think it means."
I hope you get the meaning I described
I understand what you mean - I just don't agree with your analysis of
one file one object
On 14/07/18 15:59, Mickael Barbo wrote:
Hi Anthony
Michael
Thanks for sharing your experience.
"1 file one object doesn't mean what you think it means."
I hope you get the meaning I described
I understand what you mean - I just don't agree with your analysis of
one file one object
collections with the python developers.
Documentation of the existing feature sets would be useful too.
On Thu, Jul 12, 2018, 11:41 AM Harsh Rawat <mailto:harsh.rawa...@gmail.com>> wrote:
Thanks a lot .
On Thu, Jul 12, 2018, 3:11 AM 'Anthony Flury' via Django users
mail
On 10/07/18 14:06, Harsh Rawat wrote:
Identifying a useful name means ?
Well - say you have a set of packages which is useful as a Django
friendly shopping cart.
Would it be better to type :
pip install Django[shopping-cart]
or
pip install Django[frooble]
Clearly
On 10/07/18 14:06, Harsh Rawat wrote:
Identifying a useful name means ?
Let's say you have identified a great group of packages which you can
install and provides Django friendly Shopping cart.
It would be better for that group of packages to be installed by :
pip install
On 07/07/18 13:16, prakash sharma wrote:
RE:'do you want to test on development server'
NO, Drone is running the test cases.I don't want to run the runserver
command.
But why do you need the server running - the Django Test client is able
to test views and responses without having to have
On 05/07/18 12:49, Umar Kambala wrote:
Please am sorry am new to django, I don't really understood what u mean
I know that Tim has helped you in this occassion but you really do need
to know how to find your way around a computer
the commands 'ls' and 'cd ..'
are nothing to do with
On 06/07/18 13:43, Umar Kambala wrote:
File
"C:\Users\Admin\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management\__init__.py",
line 347, in execute
YOU need to add an on_delete argument to every ForeignKey definition -
such as the one in line 13.
Learning to
why not use an email validator provided by Django ?
https://docs.djangoproject.com/en/2.0/ref/validators/#emailvalidator
The problem with the pypi module is that to validate that an email
exists it simply looks for server in DNS (which is slightly better than
the Django validator), but that
Are you using virtual environments ?
I found an issues where it seemed like part of the standard library was
missing - and it was due to my virtual environment having an old version
of the Python 2 binary. Some time in the Python 2.7 lifecycle, there was
a change as to how the standard
Interestingly, I am thinking on something similar too - having a
report/notifications/actions view that have an auto generated URL. The
idea (on my concept) is that by getting this unique URL via email, a
user can access the report/action without needing to actually login -
the fact that a
The debug suggest that it only tried to match the admin pattern but
nothing else,
that sugggests to me that you missed this bit in the mysite/urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
On 27/06/18 21:23, Harsh Rawat wrote:
I have learnt Django a little bit. I need help regarding the ticket
https://code.djangoproject.com/ticket/28905 .What should I learn in
Django to be able to contribute via this ticket.
It looks like this doesn't actually require any knowledge of Django
46 matches
Mail list logo