What does form.errors show. Just see what print(form.errors) tells you. It
should be pretty obvious.
On Sun, 25 Aug 2019, 00:30 mohammad mehrani, wrote:
> awesome!!! and i like it
>
> On Fri, Aug 23, 2019 at 12:27 AM Shubham Chauhan <
> shubham.chauhan...@gmail.com> wrote:
>
>> form.is_valid() i
I need to display images on canvas, so I have used the following snippet.
The request is reaching the server but I get the following trace. Unable to
make sense out of it, if any of you can help out, it would be great.
function getImage(file_name, num_pages) {
myimage = new Image();
my
Try this with the override_settings decorator. like this.
@override_settings(LOGGING_DIR='/tmp/test_logs/'
def test_function1(self):
pass
On Mon, Jun 10, 2019 at 7:15 PM panfei wrote:
> There is a logger path for production environment, but I want to put the
> logs in /tmp/ in unittests.
>
whenever USE_TZ=True is enabled, the timestamp is stored as a UTC object.
This is standard practice, why?
https://docs.djangoproject.com/en/2.2/topics/i18n/timezones/
Go through this, more than once. It'll be helpful.
On Tue, 30 Apr 2019, 18:09 Sampath Reddy,
wrote:
> Hey guys,
>
> I am using
can you please post, request.POST output?
On Fri, 19 Apr 2019, 16:34 Sipum Mishra, wrote:
> Hi All,
>
> I am always getting - form.is_valid returning False. kindly check where I
> am doing wrong.
> please find below code.
>
>
> views.py
> ---
> def home(request):
>
> if request.method ==
Hi Mayur,
get_object_or_404, returns an object if it exists in the database or it
will raise a 404 exception. So if the object is in the DB, django render
template is done, in your case detail.html is rendered with the context
dictionary.If there's no row peertaining to the query, then Http404 is
You can use django social auth.
https://python-social-auth-docs.readthedocs.io/en/latest/configuration/django.html
If you just want to learn. Look up Oauth2 and then use developer
documentation to implement login with django.
On Tue, 5 Mar, 2019, 22:49 Sandip Nath, wrote:
> i want users to m
Friday, February 1, 2019 at 4:00:13 PM UTC+5:30, vineeth sagar wrote:
>>
>> Hi,
>>
>> I am not sure about django, but you can have a look at sentry, we use it
>> in production and it gives everything you ask for. I am sure Django also
>> does it but I find sentr
Hi,
I am not sure about django, but you can have a look at sentry, we use it in
production and it gives everything you ask for. I am sure Django also does
it but I find sentry better for error reporting.
regards
Vineeth
On Feb 1, 2019 3:41 PM, "Web Architect" wrote:
> Hi,
>
> In our production
Hi,
This is not concerned with django itself, but I would love to get the
general consensus here, In my college days while deploying a php
application all the tutorials pointed to place my code in /var/www or
something of that sort. For my django applications I tend to put it in
/home//services/.
Use this
https://github.com/jpadilla/django-dotenv/blob/master/README.rst
If you have copied the GitHub template of .gitignore then the .env won't be
in your history of vs. I used this in production and development without a
single problem.
On Nov 30, 2018 11:54 PM, "Carsten Fuchs" wrote:
> Am
For a foreign keys you have to specify an on_delete attribute,
food=models.ForiegnKey(Food,on_delete=models.CASCADE)
If a row in the parent table(food for example) is deleted this will cause
the row/s that refers to that particular food item in your Restraunt model
be deleted.
on_delete can be g
Try reducing the connection max age to a lesser value like 3600 maybe?
On Nov 15, 2018 2:41 PM, "prateek gupta" wrote:
> Hi,
>
> My all db have 20 gb of size.
>
> On Thursday, November 15, 2018 at 12:27:27 PM UTC+5:30, Krishnasagar
> Subhedarpage wrote:
>>
>> Hi Prateek,
>>
>> Did you check disk
Ah using Windows the most braindead operating system the world has ever
seen. My coworker had this problem and he solved it using the following
command
pip install --only-binary :all: mysqlclient
Good luck!
On Nov 11, 2018 5:01 PM, "Swetank Subham Roy"
wrote:
> First of all you have to instal
I think it should be url 'kpi_detail' incident_id=incident.id" and for the
other one it should be url 'kpi_eftdetail' eftlead=eftlead.id" . I think
you get the idea. This won't solve it if you copy paste but it's a step in
the right path
On Nov 7, 2018 8:20 PM, "Gregory Strydom"
wrote:
> Hi ther
Hi,
This kind of attitude gets you no where my man, Programming is supposed to
be hard. You pick-up things every day. First focus on your weaknesses and
then work your way up. If you don't have good python experience learn
python first and then comeback to django. If there is some part of django
y
Do you mean bootstrap? STL doesn't care about that and it's not clear what
you mean. Can you share the code so that we can help you.
On Oct 22, 2018 12:14 AM, "Dennis Alabi" wrote:
> i am Building Django 2.0 Web Applications, template is not rendering with
> boottrap3.
>
> --
> You received this
M Pradeep Singh
>>> wrote:
>>>
>>>> bro...will you help me ...
>>>> i am getting django 404 error ...please tell how to fix it...
>>>> i am using python 3.6 + django 1.11
>>>>
>>>> On Fri, 12 Oct 2018 at 19:35, vineeth
I don't know if it works for 1.8, you would've tested it by now. The link I
haven given is a current method to connect with sql server with newer
versions of django, also I think it's about time your company updated your
django version. For 2.1 the link I have given works seemlessly.
On Oct 12,
Which version of django are you using, django-mssql only supports Django
until 1.8 and it's not under active development.
https://pypi.org/project/django-pyodbc-azure/ use this instead, this works
with ms-sql as I use this at work and if you go to the bitbucket repo
you'll find the same thing I ha
We deploy our web applications on the infrastructure provided by the
customer, how do you keep the code non-accessible to others. WHAT are the
strategies you use. It doesn't have to be fool proof just it should become
very hard to look at the code. Any ideas?
--
You received this message becau
>
> So I had a migration which can be found below, so when I was applying the
> migration I get this error You can't delete all columns with ALTER TABLE;
> use DROP TABLE instead That makes sense because I have only a single
> column. When I use the code sample 2 it works nicely. Can anyone
I have a form class like this, if the db is not populated I skip that
field, in the future when something thaat might trigger a d population
happens and I try to render this form, it doesn't recognise the update, but
once I restart the development server it renders with the newly added
field? I
Wow Vineet Kothari very insightful, why do you have to be a dick?
On Aug 31, 2018 9:57 PM, "Vineet Kothari"
wrote:
> It is not lodap is ldap
>
> Sent from my Huawei Mobile
>
>
> Original Message
> Subject: Ldap for django
> From: soumyajit banerjee
> To: Django users
> CC:
>
>
y for each prefetched item, so one for users and one for
> user profiles, which isn't useful here.
>
> https://docs.djangoproject.com/en/2.1/ref/models/querysets/#select-related
>
> On 8/30/2018 9:08 AM, vineeth sagar wrote:
>
> def userProfile(models.Model):
> use
def userProfile(models.Model):
user=models.OneToOneField(User,primary_key=True)
"""
Other stuff
"""
I can query it like this
x = userProfile.objects.get(user__id=1)(Assuming this exists)
when I do a connection.queries a single query is executed.When I try to
access the
Sorry, got the name of the book.
On Aug 23, 2018 9:29 AM, "vineeth sagar" wrote:
> Hey Mike I like reading books rather than tutorials please share the name
> of the book.
>
> On Aug 23, 2018 5:47 AM, "Mike Dewhirst" wrote:
>
>> If you can get your han
it (20+ pages) and I
> reckon it will answer all your questions.
>
> On 23/08/2018 5:10 AM, vineeth sagar wrote:
>
>> Hi I am pretty comfortable django. Now recently started working on a
>> fresh project, they want a normal project and an browsable api. I have seen
>&g
Hi I am pretty comfortable django. Now recently started working on a fresh
project, they want a normal project and an browsable api. I have seen the
drf and it's great, the browsable api in drf documentation is what they(my
boss) wants. How do I start developing both of them simultaneously. I wi
Not to be mean or cheeky, but Django documentation is best book imo. Read
the docs, if they are unclear in anyway, Start reading code. That's how I
learnt about sessions and also you'll get to learn all kinds of cool stuff
when you start reading Django code, Like property,cached property, Lazy
eval
You can use unix timestamp, It's json serializable and can be converted to
a datetime object. If I am not wrong you were trying to store it in a
session? try this.
import time
timestamp=time.time()
request.session['current time']= timestamp
import datetime
datetime.datetime.fromtimestamp(request
Hi,
So we are currently doing a project where the client wants the session to
expire at browser close and also prevent multiple logins from the same
account. Well there are some ways to implement the multiple login thing,
consider this say user closes the browser, the session cookie expires. Wh
Hi,
I have been going crazy for the past few days trying to understand
sessions, my settings.py file as the following,
SESSION_SAVE_EVERY_REQUEST=True
SESSION_COOKIE_AGE=2*60
Now whenever a request is initiated shoudn't the expiry date of the cookie
i.e the one that holds the session id ,doub
Mikhailo Keda wrote:
>
> to fetch emails every N minutes or hours -
> http://docs.celeryproject.org/en/latest/django/first-steps-with-django.html
> I want the user to know that the mails are being retrieved -
> https://channels.readthedocs.io/en/latest/
>
Thanks Mikhailo for the prompt reply, I
Problem:
We are developing a email-CRM. The task at hand is to fetch emails every N
minutes or hours. I have received a codebase written by another guy who
left the company,my job is to re-write/re-factor. The guy who previously
wrote the code started a thread whenever a user logged and he put a
35 matches
Mail list logo