Cherie,
By default, there are no authentication controls in Django. Barring some
custom middleware, authentication checks are performed within the views
themselves or through something like the @login_required or
@user_passes_test decorators. Are you certain that authentication is what's
blocking
A fair bit of this is Javascript, which, strictly speaking, is outside the
scope of Django.
>From what you're saying, it sounds like your button does two things: make a
backend database change and make a frontend display change. Ultimately, the
action starts with a Javascript event handler. On but
There are options, but here's what I'd do:
class Stop(models.Model):
name = models.TextField() #use CharField if not using Postgres
latitude = models.DecimalField()
longitude = models.DecimalField()
route = models.ForeignKey('Route')
sequence = models.IntegerField()
class Meta:
u
There's an ImageField for use in models, but to really understand it, start
with FileField
https://docs.djangoproject.com/en/1.9/topics/files/
https://docs.djangoproject.com/en/1.9/ref/models/fields/#django.db.models.FileField
The general idea is that you have a directory configured by Django's
s
Primary keys as URL parameters are considered a security vulnerability by
OWASP (https://www.owasp.org/index.php/Forced_browsing) and may affect how
your code is viewed after an audit.
Consider instead how sites like Reddit handle this. The URL of a comments
page has a human-readable slug at the e
The obvious use case there is something that can't be initialized with a
reasonable default value. Null is valid because you just plain need it, but
blank is false because you never want it to be null ever again except if
the back end explicitly demands it.
On Thu, Aug 4, 2016 at 1:35 AM, James Sc
forms.Form makes front-end widgets and some validation logic. models.Model
defines a database interface and wraps it in a Python class. The two have
nothing to do with each other aside from vaguely similar APIs for defining
the classes.
The intersection of the two is forms.ModelForm, which uses a
Are you intentionally sending the whole request into that constructor and
concatenating it to a URL string? I can't imagine any way this doesn't end
in disaster.
I'm sure the community would happily help, but it's not at all obvious from
the supplied code what you're trying to do here.
On Fri, Oc
We'd need to see your settings file and maybe your top-level urls.py to
answer it conclusively, but in general terms, some view that's been mapped
to root on your project is returning that there JSON response. This is not
a default Django behavior, or at least wasn't in 1.10 or earlier.
On Sat, No
; },
> {
> 'NAME': 'django.contrib.auth.password_validation.
> MinimumLengthValidator',
> },
> {
> 'NAME': 'django.contrib.auth.password_validation.
> CommonPasswordValidator',
> },
> {
>
The offending lines are these right here:
File "/var/www/MYPROJECT/data/bookstor/profiles/views.py" in create_profile
49. profile_obj = request.user.get_profile() ## If existing
profile found
File "/usr/lib/python2.7/site-packages/django/contrib/auth/models.py" in
get_profile
449.
The first place to look would be the INSTALLED_APPS setting in your
settings file, but honestly that's one of those errors that could
ultimately mean a lot of things. I've had it thrown on things ranging from
circular imports to admin configuration issues to bad migrations. It might
be time to spin
wise can you recommend a debugger that might help.
>
> Thanks
>
>
>
>
> On 12/12/2016 9:07 PM, Alex Heyden wrote:
>
>> The first place to look would be the INSTALLED_APPS setting in your
>> settings file, but honestly that's one of those errors that could
>
Everyone who wants into that space compares themselves to Selenium, because
Selenium is that good and has that much market share. It's obnoxious to
use, excludes some less technical users, but behaves very predictably in
skilled hands and has plenty of community support.
If I needed to include les
Assuming you're familiar with web technologies in general, you'd make these
changes on the host machine itself, ideally through the same mechanism that
handles deployments of source code. Code for application logic is often in
files called "views.py" or similar, and the HTML will be in a folder cal
the server to make changes.
>
> On Tuesday, January 15, 2019 at 2:30:44 PM UTC-7, Alex Heyden wrote:
>>
>> Assuming you're familiar with web technologies in general, you'd make
>> these changes on the host machine itself, ideally through the same
>> mechan
On Tuesday, January 15, 2019 at 7:59:24 PM UTC-7, Alex Heyden wrote:
>>
>> The server that is hosting the site. The one you're trying to FTP onto.
>> Your quality of life will be greatly improved if you can SSH onto the
>> machine rather than using FTP, because the a
You missed the +unsubscribe in the email name to accomplish that. From the
footer:
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...@googl
PyCrypto would be the Python-side library if you wanted to handle this in
application code, but personally, I'd prefer to handle it in my database of
choice. A lot of us use Postgres, and there's a django-pgcrypto library for
that.
That being said, reversible ciphers are hard to do meaningfully. Y
Short answer, it's giving you exactly what you asked for: the query set
inside tags.
What you probably want is to loop through the ingredients and place them
inside tags. Something like:
{% for ingredient in object.ingredientes.all %}
{{ ingredient.cantidad }} {{ ingredient.nombre }}
{% endfor %
Definitely echoing Scott's sentiment here. Start with what changed.
In my personal experience, if the answer is "nothing," you can narrow it
down very quickly. Start by reloading with the browser network monitor in
the foreground. If the first response comes back very quickly, Django
itself is off
When a message goes out to here, it's sent to everyone on the group. When
you reply to it, it also goes out to the group. What you're seeing is
someone's auto-reply. I couldn't say for sure if it's a malicious attempt
to passively get some money or if it's someone not realizing his personal
spam fi
What you're describing is how you'd lay out the models in an app. It sounds
like you may have one Django app. If I were writing this in Django, I might
try to spin the workflow and task logic off into its own application if I
thought that the core ideas of users and projects might feed some other b
Seven years ago, that may very well have been a true statement. I wouldn't
stand by it today. Disk caching should be perfectly stable, even if it's a
pretty poor solution for the average use case.
The part that hasn't changed is memcached. Memcached should be everyone's
default caching solution, n
Django supports samesite on session cookies now, and it's on (set to lax)
by default. Whether or not that completely covers your surface risk to CSRF
attacks is a somewhat different question.
On Sun, Apr 19, 2020 at 3:12 PM guettli
wrote:
> iI look at this page: https://docs.djangoproject.com/en
You pretty much answered it yourself.
>there's just one actual html page and inside it we have to create a page
(data-role="page")
Django's template helps you put together the response that gets to the
client. It's unaware of what your CSS and Javascript frameworks will do
with that response.
Yo
{{user}} is implicitly sent in the request, so it might be worth trying to
sort out what specifically went wrong when you say
{{user.is_authenticated}} went wrong.
Here's a fully functioning example of some things you can do with the user
object:
{% block header %}
Home
Sorry, I think there might be a bit of a language barrier. What do you mean
by "take the value of employee salary to payroll salary?"
On Sun, Aug 2, 2015 at 12:12 PM, Giovanny Vizcaya wrote:
> Good day,i'm new in django and i'm doing a project, i have a class
> "Employee" with atribute "salary",
I don't quite follow what you're doing with set_first_call_true and
set_first_call_false. Are you using that to control the for loop behavior?
If you are, take a look at
https://docs.djangoproject.com/en/1.8/ref/templates/builtins/#for. Django's
template language has that built in.
If you're push
Traceback first:
./manage.py makemigrations
Traceback (most recent call last):
File "./manage.py", line 10, in
execute_from_command_line(sys.argv)
File
"/home/me/.virtualenvs/fluent/local/lib/python2.7/site-packages/django/core/management/__init__.py",
line 351, in execute_from_command
I tried putting the model back in its original module with some much
smaller changes, but I'm getting the same error. The error is nonsense in
the current context.
Is there some intermediate state saved somewhere when you try to run
makemigrations?
On Mon, Nov 2, 2015 at 4:34 PM, Alex H
That's an assignment statement. See
https://docs.python.org/2/reference/simple_stmts.html for more.
On Tue, Feb 16, 2016 at 2:05 PM, anotherdjangonewby <
anotherdjangone...@gmx.de> wrote:
> Hi,
>
> this may be a bit off-topic, but:
>
> How are expressions like:
>
> var1 = var2 = var3
>
> called P
You would use it any time the relationship means something different. It
would generally be inappropriate to use it as a simple backwards
relationship (Django does this for you), but there's no reason not to have
multiple relationships in a number of directions. In an HR system, someone
could be bo
Models don't have views. Applications have views. URLs route to views, not
models. Include is basically an import for a urls.py file as a whole, so
there's no reason to import the same file multiple times unless you wanted
it to match multiple URLs.
What are you actually trying to do?
On Thu, Feb
If you get longer stacktraces back, those might help in identifying what
exactly is going wrong.
As a first pass cleanup, try:
* remove 'ladynerds' from the bottom of INSTALLED_APPS. You're already
including it up top
* change __init__.py to read "default_app_config =
'ladynerds.apps.LadyNerdsConf
This is an unexpected break from the old "everyone pays" policy. Has there
been trouble getting proposals in the past?
On Wed, Mar 23, 2016 at 10:00 AM, Andrew Pinkham
wrote:
> We are pleased to announce that DjangoCon US will be hosted by the Wharton
> School at the University of Pennsylvania i
to ensure that getting
> to the conference isn't a hardship for them. It might not always have been
> presented in exactly those terms (or that clearly), though, so perhaps the
> change is being so up-front about it :)
>
> On Wed, Mar 23, 2016 at 2:20 PM, Alex Heyden
> wrote:
CKEditor is appropriate for files that need solid typography and
formatting. If you're looking for something simpler, Markdown is a common
solution. Markdown is a markup syntax widespread on internet forums.
None of those really address "configuration files," though. Is fancy
formatting actually t
o server side of my application, à la
> "restful" ?
>
>
> Le jeudi 31 mars 2016 22:31:44 UTC+2, Alex Heyden a écrit :
>>
>> CKEditor is appropriate for files that need solid typography and
>> formatting. If you're looking for something simpler, Markd
The ability to update a profile can be as simple as a form for the model
object that holds the profile. The company's employees would have access to
Django admin. I've never used it personally, but django-user-accounts looks
like a way to avoid making a registration form if that's important to you.
I wouldn't recommend tying your repository structure to your deployment
needs. Put that in the deployment script instead. You can see if any
migrations are pending with manage.py migrate --list
On Wed, Apr 20, 2016 at 1:59 PM, wrote:
> My thought process for separating the models into a separate
I have recently, and it was equal parts misery and pain. FastCGI via
wfastcgi, as outlined at
http://blog.mattwoodward.com/2016/07/running-django-application-on-windows.html
I also had to downgrade from Python 3.7 to Python 3.6
I wouldn't really consider myself an expert on the subject. All I can
So, a lot of this doesn't have much to do with Django, but I'm not sure how
familiar you are with web server best practices in general, so apologies if
some of this is remedial for you.
If something takes two minutes to finish, you don't want it being handled
on the request handler itself. Split t
Password tables should never be human-readable. Never ever. No exceptions.
If the intent is to power automation, store that password where the test
agent can read it. If you don't know the password, reset it, then save it.
Don't expect your web server to leak a password, though. Not even if you
as
44 matches
Mail list logo