Hello,
Usually port 465 needs EMAIL_USE_SSL=True and EMAIL_USE_TLS=False. With port 587
it's usually opposite.
Regards,
A.
Antonis Christofides
http://djangodeployment.com
On 04/02/2017 03:13 PM, Bassam Ramadan wrote:
> i'm using the following backend
>
> EMAIL_BACKEND='django.core.mail.backen
Hi,
There also exists django-vanilla-views [1] which are a bit simplified
version of generic class based views. You may find them easier to cope
with (less magic).
[1] http://django-vanilla-views.org/
On 04.04.2017 01:59, Some Developer wrote:
I'm about to start a new website and I'll make
Hello,
this is far from an incredibly stupid question.
As you know, RDBMS's keep their own list of users and have sophisticated
permissions systems with which different users have different permissions on
different tables. This is particularly useful in desktop applications that
connect directly
> I've just re-read my message and notice that it is extremely aggressive. I
> want to apologies for that. When I typed it I had just had a big argument with
> someone and it came across in my message to this list. That was uncalled for
> and I'm not normally that type of person. So sorry again.
H
Ah, that clears things up somewhat.
I can certainly start using the basic View class straight away and can
slowly start moving over to the generic class based views as time
permits and as I get more used to them.
The base View class sounds like it has all the advantages of function
based vie
I'm about to start a new website and I'll make it a point to use some
generic class based views when I think they are appropriate. I'll also
try and move my custom user application that I use for all of my
projects over to class based views as wells. Especially as the login()
and logout() funct
On 4/04/2017 5:50 AM, alkhair...@mymail.vcu.edu wrote:
Hey everyone,
I'm new to Django and web development overall so please bare with me.
I may be asking an incredibly stupid question.
In the DATABASES dictionary in settings.py:
DATABASES = {
'default': {
'NAME': 'somethin
Hey everyone,
I'm new to Django and web development overall so please bare with me. I may
be asking an incredibly stupid question.
In the DATABASES dictionary in settings.py:
DATABASES = {
'default': {
'NAME': 'something',
'ENGINE': 'django.db.backends.mysql',
'USER
Hi all !
TypeError is raised when asgi_redis tries to open a connection to redis:
```
Traceback (most recent call last):
File "/code/src/event/log.py", line 39, in emit
message(level, source, msg, relations, json, datetime, trace)
File "/usr/local/lib/python2.7/dist-packages/channe
There's a little bit of vocabulary overload going on that I can't help but
point out, as it confused me when I encountered it.
There is a difference between Class-Based Views (CBV) and Generic Class-Based
Views (GCBV). They were both introduced at the same time, and so it is easy to
get them co
I really think you should revisit CBV's - you don't have to use the generic
views unless they make sense. I regularly override most of my own with
mixins and the like. And like you said - querying the database and
returning a template is probably one of the most common things I do. That's
a detail
Nope, they are not the same.
The first one:
Blog.objects.filter(entry__headline__contains='Lennon',
entry__pub_date__year=2008)
Will produce the following SQL:
SELECT
"blog_blog"."id",
"blog_blog"."name",
"blog_blog"."tagline"
FROM
"blog_blog"
INNER JOIN "blog_entry" ON ("bl
Most views are incredibly simple. Query database, maybe do a security
check on the logged in user if the data shouldn't be public or only some
users / groups can view it (yeah one thing I don't use as often as I
should but will be using more of in the future is the built in Django
permissions s
Hi Mahendra,
Then that would suggest that there really is no difference for the purposes of
generating the SQL statement in chaining filters as opposed to adding multiple
arguments in one filter, wouldn’t it?
So you might then wonder why do any chaining? Well, sometimes we assign a
filter to a
I am also not even close to being an expert on this topic, but I do know
that it's super easy to deploy a Django app on Heroku, which will get you
scalable app deployment and Postgres dbs with very little upfront effort.
https://devcenter.heroku.com/articles/deploying-python
Nate
On Sunday, Apr
Any function based view can be reduced to a CBV trivially
class MyView(View):
def get(request):# or post, or whatever http method
Point is there are patterns that repeat themselves enough to justify CBV,
aside from the benefits of using classes (inheritance, mixins, etc).
Also
Try doing something that a class based view doesn't support out of the
box and then you'll understand why function based views are still used.
Even something as simple as returning some JSON means you have to dig
into how a class based view works where as it is about 3 lines of code
in a functi
I find it interesting that so many haven't embraced the new CBV's. I ONLY
use CBV's when designing and find the usages much simpler - because of no
boilerplate and also the fact that I can derive from other classes when
needed.
Of course - the first time you use a form view or a template view and
Thanks for reply.
I have tried q.query on both statements but both are giving same query. I
had tried this even before initiating this mail chain, and this was the
point where I got confused.
Thanks and regards,
Mahendra Gaur
On 3 Apr 2017 6:55 p.m., "Matthew Pava" wrote:
Hi Mahendra,
You
Hi, I have this model:
class ItemCampaign(models.Model):
campaign = models.ForeignKey(
Campaign, related_name="itemscampaign", verbose_name="Item campaña"
)
data = JSONField(default=dict)
def __str__(self):
return self.campaign.name
With a record with this data:
[{'
Hi Mihir,
Though I am no expert on distributed systems, you may want to check out the
possible DATABASES settings. You can specify multiple databases in your
settings file.
See https://docs.djangoproject.com/en/1.10/topics/db/multi-db/
I would read about Django database routing to get started.
Hi Mahendra,
You can view the SQL that is generated by using the query attribute on the
QuerySet.
q = Blog.objects.filter(entry__headline__contains='Lennon',
entry__pub_date__year=2008)
print(str(q.query))
That should help in understanding what is going on.
Best wishes!
From: django-users@goo
I am using HTTPHandler to send logging messages to a Django Web server with The
following code,
>
> import logging
> import logging.handlers
> logger = logging.getLogger('mylogger')
> http_handler = logging.handlers.HTTPHandler('localhost:8000',
> '/VideoParser/lYYDownloaderClientLog')#, meth
Hi,
Awesome thanks. I can see the reason for some class based views as they
remove the need for boilerplate code but if you run into a problem with
them for whatever reason you generally have to dig out the Python
debugger and set a break point in your view to see what the Django
framework co
Hi,
Thank you for the link. I'll check it out.
On 02/04/2017 07:43, Antonis Christofides wrote:
Hi,
This is not an answer to your question (which was answered by James
Bennett anyway), but I liked this recent article about class vs.
function based views:
https://simpleisbetterthancomplex.com/
On 02/04/2017 04:37, Some Developer wrote:
Hi,
I was wondering if function based views will ever be deprecated? I
absolutely hate class based views with a passion for various reasons
(too complex, trying to solve a problem that doesn't exist etc). With a
function based view I can write it in 2 m
Thank you for reply.
In case of second statement, why two JOIN are required each with single
filter ?
As per my understanding whether it use one JOIN with both the filter or two
JOIN each with single filter, both are same.
correct me if am wrong ?
Thanks and Regards,
Mahendra
On Mon, Apr 3, 20
Hello everyone, I have a simple question:
*What better library to BDD in Django? And why?*
--
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
I would add that the required package could be "python3.6-dev" if you're
working with Python 3.6.
On Friday, February 10, 2017 at 8:16:17 AM UTC+1, Robin Lery wrote:
>
> Yes. That might have been the problem. Thank you once again!
>
> On Fri, Feb 10, 2017 at 12:43 PM, Andrew Godwin > wrote:
>
>>
You could probably have a custom session management to only have one
session per user, when a user log in you can invalidate all the other user
sessions
On Mon, Apr 3, 2017 at 11:30 AM, miguel vfx wrote:
> Good day! I was wondering if there's a way to limit a user account to be
> logged-in in ju
Good day! I was wondering if there's a way to limit a user account to be
logged-in in just 1 single device? I mean is there a way to logout a user
first (In all browsers), then login? Thank you.
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
The first one will use a single JOIN on the entry table, and will apply
both filters to that table.
The second one will JOIN the entry table twice, and for every join will
apply only a single filter
On Sunday, April 2, 2017 at 5:41:29 PM UTC+3, Mahendra Gaur wrote:
>
> Hello everyone,
>
> I am n
32 matches
Mail list logo