Please share code for home.html & urls.py. Also have you included the app name
in the settings.py?
Thanks,
Bruckner de Villiers
083 625 1086
From: on behalf of Ifeanyi Chielo
Reply to:
Date: Saturday, 04 April 2020 at 02:51
To: Django users
Subject: Re: Working with f
Have you set up your admin.py?
Bruckner de Villiers
083 625 1086
From: on behalf of Liu楽叁
Reply to:
Date: Friday, 20 March 2020 at 14:05
To: Django users
Subject: A question about the Django server
I am using windows and I started a server by 'py manage.py runserver
Why not start a Django Meetup Group? There is already a Python Meetup Group.
I would be interested.
Regards,
Bruckner de Villiers
083 625 1086
On 2020/02/16, 12:16, "Perceval Maturure" wrote:
That’s a good point. How about, could you elaborate on how this can be
done? S
Useful, thanks Mike.
Bruckner de Villiers
083 625 1086
On 2020/02/12, 23:18, "Mike Dewhirst" wrote:
On 12/02/2020 6:54 pm, Mike Dewhirst wrote:
> def save(self, *args, **kwargs):
> self._pre_save()# stuff to be computed pre-save
> super().s
Thanks Mike - I have just become cleverer.
Bruckner de Villiers
083 625 1086
On 2020/02/12, 09:55, "Mike Dewhirst" wrote:
On 12/02/2020 6:11 pm, Bruckner de Villiers wrote:
> Mike,
> Clever. The save function seems to write a string of the id. So,
self.form
Mike,
Clever. The save function seems to write a string of the id. So,
self.formulation_no = "50-" + str(self.id) could also work?
Bruckner de Villiers
+27 83 625 1086
On 2020/02/12, 00:27, "Mike Dewhirst" wrote:
On 11/02/2020 7:06 pm, Bruckner de Villiers wrot
Jason,
I cracked the uuid option – what an ugly ticket no.!!! -
0273051c-af54-4baf-91b9-651701d9020c
Bruckner de Villiers
083 625 1086
From: Bruckner de Villiers
Date: Tuesday, 11 February 2020 at 10:06
To:
Subject: AutoField & auto-incrementing
Jason,
Thank you. I have cha
track of the
last used ticket no. I haven’t thought this through yet, but it does occur to
me that one could use the id (maybe prefix the id with some starting digits)
and write the record twice. Probably barking up the wrong tree.
Regards,
Bruckner de Villiers
+27 83 625 1086
From
Brajesh,
I presume that you want the counter to auto-increment. The gurus are
recommending AutoField, but I can’t get it to work yet and the Django docs are
a bit vague on the subect.
Good luck.
Bruckner de Villiers
083 625 1086
From: on behalf of BRAJESH KUMAR
Reply to:
Date
DateTimeField(auto_now=True, verbose_name="Last
Updated:")
class Meta:
verbose_name_plural="Bugs"
def publish(self):
self.published_date = timezone.now()
self.save()
def approve_comments(self):
return self
Thank you Mike & Jason.
I agree - messing around with the id is not the brightest idea I've ever
conceived.
However, the Django 3 documentation is somewhat mute on auto-incrementing, but
I'll continue searching Stack & Mozilla. Have a great evening (I am GMT+2).
Regards,
Br
merely requires an explanatory field text.
Make sense?
Bruckner de Villiers
083 625 1086
From: on behalf of Mike Dewhirst
Reply to:
Date: Saturday, 08 February 2020 at 13:48
To:
Subject: RE: Adding a verbose_name to id field
I imagine you need to specify the id field in your
Using Sqlite3 & Django 3.0.2 - I have searched high and low, but can’t find a
way to add a verbose name to the id of a model.
Anyone have ideas, please?
Bruckner de Villiers
+27 83 625 1086
--
You received this message because you are subscribed to the Google Groups
"Django use
shouldn’t have been deleted.
Bruckner de Villiers
083 625 1086
From: on behalf of Adrien Agnel
Reply to:
Date: Monday, 20 January 2020 at 22:07
To: Django users
Subject: Backward migration failing because of old dropped model
Hi everyone,
This is my first post in this group so do
Eugen,
As a Newbie, I found most of it useful.
Well done.
Bruckner de Villiers
083 625 1086
From: on behalf of Eugen Ciur
Reply to:
Date: Sunday, 19 January 2020 at 21:56
To: Django users
Subject: Django Lessons
Hi everyone,
I launched recently a new resource, django
I guess that this is a fundamental change to the db – Best to first delete the
old model and start again.
Bruckner de Villiers
083 625 1086
From: on behalf of ROHIT CHAUHAN
Reply to:
Date: Wednesday, 15 January 2020 at 12:33
To:
Subject: Re: Model Related Issue
manually change
fieldsets = (
(None, {'fields':('currency_Code', 'currency_Description')}),
)
Much obliged,
Bruckner de Villiers
083 625 1086
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubs
https://stackoverflow.com/questions/29900090/virtualenv-workon-doesnt-work
Bruckner de Villiers
083 625 1086
From: on behalf of rishabh roy
Reply to:
Date: Friday, 13 December 2019 at 07:38
To:
Subject: Re: unable to execute 'workon' command
I am student trying
OK, got it. Changed polls2/views.py to “from polls.models import Choice,
Question” instead of “from .models import Choice, Question”. It works, but
VSCode doesn’t like “polls.model” – it gives a warning “unresolved import”.
Much obliged,
Bruckner de Villiers
083 625 1086
From: on
Thank you – thought that this is the case. However, I am trying to cater for
the user who forgot to log out.
Regards,
Bruckner de Villiers
083 625 1086
From: on behalf of Miracle
Reply to:
Date: Wednesday, 11 December 2019 at 12:09
To:
Subject: Re: SuperUser not logging out after
e.
I have probably messed up with models.py. Any pointers please as how multiple
apps can point to the same database?
Regards,
Bruckner de Villiers
+27(0)83 625 1086
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To uns
setup. Is there a way to log out a user automatically
after a set period of time?
Much obliged,
Bruckner de Villiers
083 625 1086
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To unsubscribe from this group and stop receiv
Thank you Sencer.
Bruckner de Villiers
083 625 1086
From: on behalf of Sencer Hamarat
Reply to:
Date: Tuesday, 10 December 2019 at 13:51
To:
Subject: Re: Removing Hardcoded urls in Templates
Would you please replace url name with 'polls:detail', as described
Thank you Daniel.
Bruckner de Villiers
083 625 1086
From: on behalf of Daniel Hepper
Reply to:
Date: Tuesday, 10 December 2019 at 13:54
To:
Subject: Re: Removing Hardcoded urls in Templates
It should be {% url 'polls:detail' question.id %}
I think you mixed up
ion': question})
def results(request, question_id):
response = "You're looking at the results of question %s."
return HttpResponse(response % question_id)
def vote(request, question_id):
return HttpResponse("You're voting on question %s."
; datetime and timedelta from the module datetime.
>
> If you prefer to use "datetime.timedelta", you would have to use "import
> datetime" instead of "from datetime import datetime, timedelta"
>
> Hope that helps,
> Daniel
>
>> On Mon, Dec
ngth=200)
votes = models.IntegerField(default=0)
def __str__(self):
return self.choice_text
Much obliged,
Bruckner de Villiers
+27 (0)83 625 1086
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To u
Which tutorial are you following? Is it any good?
Bruckner de Villiers
083 625 1086
From: on behalf of Aaryan Dewan
Reply to:
Date: Tuesday, 03 December 2019 at 16:52
To: Django users
Subject: Re: Why is the Django server running even when pytlinter shows that
there's some b
I had the same issue and after trying various weird solutions on Stackoverflow,
none of which worked, I found this simple solution – add this comment code to
each line giving the error and it magically disappears:
# pylint: disable=no-member
Bruckner de Villiers
083 625 1086
From
Back
{% endblock %}
So, when the user clicks on an organisation in the list it takes her to the
DetailView of that organisation, by virtue of the line in the urls.py:
path('/', views.Org_DetailView.as_view(), name='detail'),
Caveat – I am still an novice, but this
Udemy has a good course leading up to this topic – Python and Django Full Stack
Web Development, still based on Django 1.x, but Django 2.x code is incuded.
Regards,
Bruckner de Villiers
083 625 1086
From: on behalf of Paras Jain
Reply to:
Date: Tuesday, 05 November 2019 at 07:41
To
I have a similar challenge and I think that I shall tackle it by making the
first level dependency outside the main model, i.e. Building should be a
ForeignKey in BuildingOwner model. Then your main model shouldn’t have the a
link to the Building model, but rather 2 ForeignKeys to BuildingOwner
Did you import include?
Bruckner
0836251086
> On 01 Nov 2019, at 00:29, হজমুলা খান wrote:
>
>
>
>
>> On Thursday, October 31, 2019 at 12:22:48 PM UTC, Kasper Laudrup wrote:
>> Hi হজমুলা খান,
>>
>> On 31/10/2019 11.22, হজমুলা খান wrote:
>> > i am novice and following django for beginners
e')
model=Organisation
class OrgDeleteView(DeleteView):
model = Organisation
success_url = reverse_lazy("pbs1:organisation_list")
Each class does exactly what it says – e.g. OrgUpdateView allows me to update a
previously created record in the DB. The urls.py a
34 matches
Mail list logo