I believe you were following the official tutorial on Django's website, and
has created a view function called "index" in "polls" app, which was wired
to "/polls" url. All the codes were exactly the same as provided in the
tutorial. The mistake you made was when you opened the browser and typed
Hi. Doesn't sound like a Django question, but I assume you came across this
question when writing Django codes:) So anyway, let me try to see whether I
could provide any useful information here.
This question is a bit too broad, so let me try to answer it in several
levels.
First, python doesn
Hi. Here's a very nice video tutorial on how to handle images with media.
https://www.youtube.com/watch?v=FdVuKt_iuSI&list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p&index=8
Also to your question on how to deploy it in production, check this video.
https://www.youtube.com/watch?v=Sa_kQheCnds&list=PL-osi
https://www.youtube.com/playlist?list=PL-osiE80TeTtoQCKZ03TU5fNfx2UY6U4p
This video series will be helpful
On Mon, Jul 20, 2020 at 5:33 AM Anirudh choudhary <
anirudhchoudary...@gmail.com> wrote:
> You can simply do it by manipulating the context data like
>
> context = {
> 'form_login':loginfor
ioned
:)
On Monday, July 20, 2020 at 2:25:00 PM UTC+8, Derek wrote:
>
> This would make a great blog post! And in future, we can all refer
> directly to it, when someone asks a similar question.
>
> On Saturday, 18 July 2020 16:13:53 UTC+2, Liu Zheng wrote:
>>
>> Hi. Does
e very much your informative post. Question below - - -
>
> On Sat, Jul 18, 2020 at 9:14 AM Liu Zheng > wrote:
>
>> Hi. Doesn't sound like a Django question, but I assume you came across
>> this question when writing Django codes:) So anyway, let me try to se
Hi, do you mean in the GET request, the user provides the pk (perhaps in
URL) or the server sends to users an object where pk is a field?
If it's the former, then @George's answer is the right one. An example of
what you are trying to achieve will be helpful.
Best
Zheng
On Tue, Jul 21, 2020 at 1
Hi guys,
I'm trying to solve a simple problem: add a message "You've logged out!"
After redirecting user to login page. I got one nice solution at
https://stackoverflow.com/questions/11393929/django-message-when-logout
from django.contrib.auth.views import LogoutView
class YourCustomLogoutView
Hi. First of all, I think it's impossible to perfectly detect encoding
without further information. See the answer in this SO post:
https://stackoverflow.com/questions/436220/how-to-determine-the-encoding-of-text
There
are many packages and tools to help detect encoding format, but keep in
min
>>> 2) In the end I realized that the problem was the delimiter of the csv
>>> but predicting it is another problem.
>>>
>>> Anyway, it was a task that I had to do and that was my limitation. I
>>> think there must be a library that does all this, uploa
What i meant was that you can only feed binary data or binary handlers to
chardet. You can decode the binary data according to the detection results
afterward.
On Wed, 22 Jul 2020 at 11:11 PM, Liu Zheng wrote:
> Hi, glad you solved the problem. Yes, both the request.FILES[‘file’] and
&g
Hi,
Probably not enough to look at urls.py files only. My guess: Do you use
‘reverse’ function anywhere in covid app? If so, here’s a circular import:
urls.py imports covid urls -> covid urls import covid views -> one covid
view uses reverse -> reverse import urls.py of the project (to look up th
wrote:
> Hi Kovy, this is not solved. Liu Zheng but using
> chardet(request.FILES['file'].read()) return encoding "ascii" is not
> correct, I've uploaded a file using utf-7 as encoding for example and the
> result is wrog. and then I tried
> request.FILE
ency.
>>
>>
>> pe 24. heinäk. 2020 klo 17.09 Ronaldo Mata
>> kirjoitti:
>>
>>> Yes, I will try it. Anythin I will let you know
>>>
>>> El mié., 22 de julio de 2020 12:24 p. m., Liu Zheng <
>>> firstday2...@gmail.com> escribió
Hi,
Not sure it's a good idea to do database query inside the template.
Templates are capable of running some logics but for a heavy-lifting job
like database query, it should be a good practice to do it in the view, and
only pass the results to the template.
On Sun, Aug 9, 2020 at 4:30 AM Agoua
All the previous answers are great to explain the reason. Just want to add:
if you do not desire empty string in form and in shell, you probably need
to add a min_length validation condition
On Sun, Aug 9, 2020 at 12:42 PM Stephen J. Butler
wrote:
> If you look at the documentation for 'blank' i
hi,
What’s the type and value of that variable “value”? It would be helpful to
print out value and type(value) right in front of this line where error
occurs.
Best
Zheng
On Tue, 18 Aug 2020 at 9:21 PM, Rostislav Kornatsky <
info.send.o...@gmail.com> wrote:
> Hi, my name is Rostislav and I'm lea
@Omkar Parab: Lol. Exactly. When I saw the question, this video was the
first in my mind. I clicked in to share the link, but you have shared it.
Cheers!
On Tue, Sep 8, 2020 at 5:14 AM Omkar Parab wrote:
> Follow this video.
> https://youtu.be/6DI_7Zja8Zc
>
> On Tue, Sep 8, 2020, 2:36 AM progra
Hi,
Guys earlier have provided useful links for consuming APIs. Just want to
emphasize some concepts between server-side and client-side codes.
A django template is rendered into a page on the *server side*. That means,
the server does the work and prepares the html content before sending it to
th
Checking CSS is the right way to go. To verify, simply comment out all css
styles (internal or external ones) and strip off the classes from these few
lines. You shouldn’t have capitalisation problem any more
On Tue, 18 May 2021 at 9:23 PM, Samuel Nogueira
wrote:
> I am using bootstrap, so my CS
20 matches
Mail list logo