wait, i configure the manage.py by inserting this
# Override default port for `runserver` command
from django.core.management.commands.runserver import Command as runserver
runserver.default_port = "8001"
Is this bad ?
On Tuesday, January 16, 2018 at 8:29:44 PM UTC+9, Jason wrote:
>
> you
May i know what does this means:
def query_pokeapi(resource_url):
url = '{0}{1}'.format(BASE_URL, resource_url)
response = requests.get(url)
the '{0}{1}' and resource_url
On Wednesday, January 17, 2018 at 3:02:06 PM UTC+9, Matemática A3K wrote:
>
>
>
> On Wed, Jan 17, 2018 at 1:42 AM,
I have one app which has backend mongodb and it's has one script which insert
data in database then when I start my app locally then it will give me result
from db but when I deploy that app to Google cloud app is working but when I
search any thing it's will give me errors
--
You received
On Wed, Jan 17, 2018 at 1:42 AM, wrote:
> As this is the first time I'm trying this out, I do not know what is wrong
> with the problem. So it would be great if someone can help me solve this
> problem
>
>
> The code I'm using is at the bottom page of this website:
>
views.py
> def index(request):
> latest_comic = Comic.objects.order_by('-comic_pub_date')[:2]
>
> This has an implicit .all(), it's the same than doing
Comic.objects.all().order_by('-comic_pub_date')[:2]
Then you are slicing it for the first 2 records, that's why you see 2
records. Use
As this is the first time I'm trying this out, I do not know what is wrong
with the problem. So it would be great if someone can help me solve this
problem
The code I'm using is at the bottom page of this website:
Hi.
Could you show your template also?
17.1.2018 6.03 "NorDe" kirjoitti:
> Context:
>
> I am creating a website to house some webcomics I made as a project to
> practice Django. I am adapting Django's tutorial to create the site (
>
Context:
I am creating a website to house some webcomics I made as a project to
practice Django. I am adapting Django's tutorial to create the site (
https://docs.djangoproject.com/en/2.0/intro/tutorial03/ About halfway down
the page under "Write views that actually do something"). I am having
If I'm creating a query using Q, can I make one of Q tests, be a count of a
manytomany field?I.e., one of the Q filters, should test to see if a
specific manytomany field, has a count greater than 5, I know that I can
use annotate to test for count. But can annotate be specified within
Does it work?
On Mon, Jan 15, 2018 at 5:05 AM, Amitkumar Satpute <
satpute.amitku...@gmail.com> wrote:
>
>1.
>2.
>3.
>4. views.py
>5. ---
>6. class UpdateUser(View):
>7. def post(self,request,pk):
>8.
On Tue, Jan 16, 2018 at 6:15 PM, Matemática A3K
wrote:
> According to https://code.djangoproject.com/ticket/15910:
> "When adding a form to an inline formset in the admin interface it has a
> nice "Remove" link added automatically. These links are however missing
> from
According to https://code.djangoproject.com/ticket/15910:
"When adding a form to an inline formset in the admin interface it has a
nice "Remove" link added automatically. These links are however missing
from empty rows that have been created as a result from the "extra" option.
They are also
https://codereview.stackexchange.com/questions/124699/multi-threading-upload-tool
On Wed, Jan 10, 2018 at 11:46 AM, guettli wrote:
>
>
> Am Dienstag, 9. Januar 2018 01:08:48 UTC+1 schrieb Mike Morris:
>>
>> Though it is not a Drupal app, there is an excellent drop box type
Yes, the reason I would like to refer to the user model is so that I can
associate a model in the second app with a user. When I created the first
app with the extended user model I wasn't aware that I would not be able to
decouple the auth model and the app-specific AbstractUser-inheriting
You should use settings way since it is preferred.
Since importing models to other models is considered bad thing to do.
In theory you could use string format directly but by doing that you couple
your other app with your app with custom user.
Is there a reason you would like to refer to it?
Are you able to have a foreign key relationship from a model within the app
that does not contain the extended user model to the extended user model in
the other app?
Is the only way to refer to the extended user model from the second app
settings.AUTH_USER_MODEL?
--
You received this
That does seem to be a good effort towards CSRF prevention. However, it's
currently in draft status, and doesn't provide any protection if not
supported by your browser. According to caniuse.com[1], the browsers
supporting this feature currently occupy just under 60% of the browser
market.
See this: https://www.owasp.org/index.php/SameSite
Cheers,
Etienne
Le 2018-01-16 à 10:36, knbk a écrit :
How does using nginx protect against CSRF attacks?
Marten
On Tuesday, January 16, 2018 at 10:49:21 AM UTC+1, Etienne Robillard
wrote:
A much more practical way to improve
How does using nginx protect against CSRF attacks?
Marten
On Tuesday, January 16, 2018 at 10:49:21 AM UTC+1, Etienne Robillard wrote:
>
> A much more practical way to improve security against XSRF attacks is
> using nginx.
>
> Regards,
>
> Etienne
>
> Le 2018-01-16 à 04:38, James Bennett a
Hi Steve,
First let's get into how cross-site request forgery works: when you are
logged in to bank.com, your browser saves a session cookie and sends it
with every request. Now when you visit evil.com, they may include a piece
of javascript in their side that sends a POST request to
Hi,
I am new to Django and working on some web project. I want to generate a
dynamic bar chart (using Chart Js library) by reading CSV file data.
Could you please somebody help on this...
--
You received this message because you are subscribed to the Google Groups
"Django users" group.
To
you need to configure your server to handle that pass through from web
request to django. With apache + mod_wsgi, it would be defined as a
virtualhost in the conf files. Nginx and gunicorn would be done in nginx
configuration.
You could set it up such that
This shouldn't be a problem, I work with several people on the same django
app.
We use git to share the code. you can use a hosted git service like gitlab,
github or bitbucket
On Tue, Jan 16, 2018 at 9:58 AM, wrote:
> Oh, but the thing is i am doing 1 project, and
Hi.
Please note that runserver command is only meant to ease developing your
site with Django. In development you can run development server like:
./manage.py runserver 127.0.0.1:8000
./manage.py runserver 127.0.0.2:8001
But when deploying your site(s) to production procedure is different and
A much more practical way to improve security against XSRF attacks is
using nginx.
Regards,
Etienne
Le 2018-01-16 à 04:38, James Bennett a écrit :
If you can demonstrate a practical attack against Django's CSRF
system, feel free to email it to secur...@djangoproject.com
If you can demonstrate a practical attack against Django's CSRF system,
feel free to email it to secur...@djangoproject.com.
On Tue, Jan 16, 2018 at 1:26 AM, Etienne Robillard
wrote:
> Hi Stephan,
>
> I'm also interested to understand why I should have some form of CSRF
>
Hi Stephan,
I'm also interested to understand why I should have some form of CSRF
protection for my wsgi app...
perhaps recoding the Django 1.11 CSRF middleware into a proper WSGI
application (CSRFController) would help.
but seriously, i don't use/recommend the Django CSRF middleware
The base CSRF secret is per-user, not global. So while you could write a
script to hit a page over and over and harvest CSRF tokens, those tokens
would only be valid for the session/user associated with your script.
Attempting to use them to execute a CSRF attack against another user would
fail
28 matches
Mail list logo