Re: SPAM sent via this list?

2019-01-10 Thread Joel Mathew
I've got multiple emails of similiar sort from aphiso...@gmail.com and blocked this account. Didnt find any other option. Sincerely yours, Joel G Mathew On Thu, 10 Jan 2019 at 13:56, Markus Holtermann wrote: > Hi, if the response you got is related to https://bitbounce.com/ , we're > in touc

Installing pdftotext library on heroku

2019-01-23 Thread Joel Mathew
pdftotext library is a requirement in requirements.txt. While trying to push to heroku, I get the following error: remote: Running setup.py install for pdftotext: started remote:Running setup.py install for pdftotext: finished with status 'error' remote:Complete ou

Re: Time tracker sytem

2019-02-03 Thread Joel Mathew
Go through the django tutorials, and kindly start a thread when you have a problem. On Sun, 3 Feb, 2019, 7:56 PM Rupam Hazra I want to create a time tracker system to track the employee work time and > data save to mysql database.please tell me how to start. > > -- > You received this message bec

Re: Where is the data set of the Django documents demo models

2019-02-03 Thread Joel Mathew
Yes, it is not supposed to be a copy paste demo. You're supposed to work along the tutorial, use the shell, and not throw in a bunch of files and opening the browser to see if it works On Sun, 3 Feb, 2019, 7:20 PM Jason I feel I have to disagree, and the reason is the point of the tutorial is > t

Re: Webinterface for python script

2019-02-05 Thread Joel Mathew
Exactly. I to use file upload and rendering in a medical report. @OP Did your research and post your code. Can help with any errors you're getting. Research about request.POST, request.FILES. Read this. https://docs.djangoproject.com/en/2.1/topics/files/ On Tue, 5 Feb, 2019, 1:25 PM Scot Hacker

Re: Installing pdftotext library on heroku

2019-03-05 Thread Joel Mathew
I'm curious about this, too. I've been using docker containers on heroku > to avoid potential issues like this. > > On Wednesday, January 23, 2019 at 7:20:03 AM UTC-5, Joel Mathew wrote: >> >> pdftotext library is a requirement in requirements.txt. While trying to >

Re: How does WSGI work?

2019-03-07 Thread Joel Mathew
There's a mod_wsgi_express thread that Graham monitors, so he's sure to get feedback from there Understanding this better could help me solve static file blues. Most of the time I don't understand why my static files fine aren't served when I move to production. On Fri, 8 Mar, 2019, 5:29 AM Mike

Re: Font Awesome does not work locally

2019-03-11 Thread Joel Mathew
It's related to your static address. You're probably not setting the correct relative path. Check the tutorials on how the settings for STATIC files work Sincerely yours, Joel G Mathew On Mon, 11 Mar 2019 at 20:42, Mujab Nasraldeen wrote: > font awesome does not work locally .. without usin

Re: Is there any inline editing the data and delete data in table in Django?

2019-03-22 Thread Joel Mathew
This is simple to achieve with django formset plus jquery. You just need to have a little imagination On Fri, 22 Mar, 2019, 12:15 PM VeeraNagaRaja Sankar, wrote: > hi Derek, > > Thank you but I saw this one not working for my methodology. > > Best Regards, > Inti VeeraNagaRaja Sankar,M.Tech(IT)

Re: how can i get current username in model field ??

2019-04-01 Thread Joel Mathew
This does not make sense to me. A model is not a dynamic entity. It is something that's created beforehand. Getting the current username into model should be done in your logic (views), or the template Sincerely yours, Joel G Mathew On Mon, 1 Apr 2019 at 19:01, omar ahmed wrote: > i want to

Re: I need help please

2019-04-01 Thread Joel Mathew
It's supposed to be an example. Sincerely yours, Joel G Mathew On Mon, 1 Apr 2019 at 19:12, dvij parekh wrote: > link is not working > > > On Mon, Apr 1, 2019 at 6:32 PM Nanjuki Saidat > wrote: > >> Hi all, >> I am Saidat a new django developer, i need help on how to go about this >> " Chan

Re: Hosting recommendations please

2019-04-02 Thread Joel Mathew
I'm running mine off a Digitalocean 1GB droplet, and one hobby site off Heroku. Heroku has some latency noticeable occasionally, but the digitalocean droplet is perfect. I will scale to better specs once I go into active production. It's working fine for upto 10 users now. Sincerely yours, Joel G

Re: Django module view has no attribute?

2019-04-02 Thread Joel Mathew
Is there a function named posts in views.py? On Tue, 2 Apr, 2019, 7:29 AM drone4four, wrote: > I’m taking a Udemy course by Nick Walter and rather than copying line by > line, I’m trying to branch out and experiment on my own. > > The purpose of the website I am creating is for a small blog, wit

Re: I need help on adding a search button to an input field

2019-04-10 Thread Joel Mathew
Use bootstrap's input-group-append Sincerely yours, Joel G Mathew On Wed, 10 Apr 2019 at 23:14, Nanjuki Saidat wrote: > Please any one to help me out.thanks > > On Wed, 10 Apr 2019 at 20:40, Nanjuki Saidat > wrote: > >> this one still did the same thing which i didnt mean me i meant an sear

Re: Need assistance! I want to create a list box that displays records that can be selected (single or multiple) from a PGSQL table.

2019-04-17 Thread Joel Mathew
Great to know -- 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...@googlegroups.com. To post to this group, send email to django-users@google

Advanced permissions and role creation

2019-04-20 Thread Joel Mathew
I have an application for a hospital. There, I should be able to assign different roles like Doctor, Nurse, Attender, Auxillary Nurse, Pharmacist, Store Manager etc, each of would be having specific access to seperate areas (views), with some having restricted access. In addition, there are other h

Re: Advanced permissions and role creation

2019-04-21 Thread Joel Mathew
building anything complex and pretty > much everything you need is already built-in in Django. > > > > On Sun, Apr 21, 2019 at 5:12 AM Joel Mathew wrote: > >> I have an application for a hospital. There, I should be able to assign >> different roles like Doctor, Nurse,

Re: Storing HTML in DB using DJANGO

2019-04-21 Thread Joel Mathew
I fail to see the purpose of that. Serialisation is sufficient. Big projects like wordpress store even big blog posts, which is html like this. Sincerely yours, Joel G Mathew On Sun, 21 Apr 2019 at 20:20, Brian M wrote: > What if you convert the html to an array of bytes before storing? > >

Re: Integrating Google calendar API in TODO list

2019-04-24 Thread Joel Mathew
Just do it. The API has python sample code. Sincerely yours, Joel G Mathew On Tue, 23 Apr 2019 at 09:58, Sipum wrote: > Hello friends. > > I am going to integrate google calendar API in to my TODO List. > can anyone suggest how to integrate so that when I will add any event in > my TODO List

Re: Integrating Google calendar API in TODO list

2019-04-24 Thread Joel Mathew
m. On Wed, 24 Apr, 2019, 10:59 PM Sipum Mishra, wrote: > Joel, i know there is python code for yhat API but how to integrate it.. I > want to know that.. I tried to do but failed. > > On Wed, 24 Apr, 2019, 6:55 PM Joel Mathew, wrote: > >> Just do it. The API has python

Re: Like button for user pictures.

2019-04-25 Thread Joel Mathew
I tried and could not is not a valid developer question. We're left imagining how you tried, and how it failed. Post code with any question and explain in words. Sincerely yours, Joel G Mathew On Fri, 26 Apr 2019 at 00:13, Nitesh Saini wrote: > Hello, > I'm working on a project similar to In

Re: Unable to create the django_migrations table (ORA-00907: missing right parenthesis)

2019-04-27 Thread Joel Mathew
What's the error? Sincerely yours, Joel G Mathew On Sun, 28 Apr 2019 at 01:26, tossouwisdom wrote: > Django 2.2.2 > Cx_oracle 7.2 > base Oracle 11g > > When I run the django migrate commande, i have error > django.db.migrations.exceptions.MigrationSchemaMissing: Unable to create the > djan

Simplifying code with multiple loops and logic, into queryset aggregates

2019-04-30 Thread Joel Mathew
My models: class customer(models.Model): cstid = models.AutoField(primary_key=True, unique=True) insurance_number = models.CharField(max_length=100, blank=True, null=True) name = models.CharField(max_length=35) ageyrs = models.IntegerField(blank=True) class Admission(models.Model): id = models.A

Re: Button Event

2019-04-30 Thread Joel Mathew
Templates expand into html. So you just write javascript like you normally do. You call javascript from within your templates by using something like: Here, I am using {% load static %} Sincerely yours, Joel G Mathew On Tue, 30 Apr 2019 at 12:05, Mayur Bagul wrote: > Thanks Ahmed, > > can

Re: More controls on createsuperuser

2019-04-30 Thread Joel Mathew
It's not the command that you should be worried about, but shell access to your system. If your database server is secure, shell access is restricted, and the server is also hardened reasonably, you should be relatively safe. Sincerely yours, Joel G Mathew On Tue, 30 Apr 2019 at 21:07, Mario R

Re: Simplifying code with multiple loops and logic, into queryset aggregates

2019-04-30 Thread Joel Mathew
ssion_set__discharged=False, > then=True), default=False).distinct() > > > > > > *From:* django-users@googlegroups.com [mailto: > django-users@googlegroups.com] *On Behalf Of *Joel Mathew > *Sent:* Tuesday, April 30, 2019 9:22 AM > *To:* django-users@googlegroups.com &

Re: WYSIWYG/Rich Text Editor recommendations

2019-04-30 Thread Joel Mathew
Currently I'm using quill. It's easy to implement, and has all basic features. Sincerely yours, Joel G Mathew On Wed, 1 May 2019 at 05:47, Tim Johnson wrote: > Using python 3.7.2 and django 2.1.5 > > Production is in Ubuntu 16.04 and prospective deployment is likely > to be CentOS with same

Re: Anyone kind enough to help me understand these few concepts

2019-05-16 Thread Joel Mathew
I would suggest you go through the official tutorial. Your questions don't have relation to django. It seems you're still at the concept/algorithm level of your app. In django, you put all your logic in your views, retrieve data from models into views, and then pass the data from views to template

Re: mod_wsgi problem

2019-06-06 Thread Joel Mathew
Always read installation README and github README before installing anything. It seems you dont even have a basic compiler installed. For Debian based systems, install: `sudo apt install build-essential` Sincerely yours, Joel G Mathew On Thu, 6 Jun 2019 at 17:09, Davin Pore wrote: > how ab

Re: How to create Different Graphs and PDF Reports

2019-06-24 Thread Joel Mathew
You can use reportlab for pdf generation On Mon, 24 Jun, 2019, 9:18 PM Balaji Shetty, wrote: > HI > can anyone suggest How to create Different Graphs and PDF Reports in > Django Admin Panel itself which work on Models with relation. > It there any library. > > > > -- > > > *Mr. Shetty Balaji S.A

Re: Unexpected behavior with icontains in query filter

2018-08-11 Thread Joel Mathew
This is what I got: In [8]: doct = doctor.objects.filter(name__icontains = 'joel') ...: print(doct.query) SELECT `appointments_doctor`.`docid`, `appointments_doctor`.`name`, `appointments_doctor`.`username`, `appointments_doctor`.`regid`, `appointments_doctor`.`photo`, `appointments_doctor`.`e

Re: Unexpected behavior with icontains in query filter

2018-08-11 Thread Joel Mathew
This workaround works. In [10]: from django.db.models.functions import Lower In [11]: from django.db.models import CharField In [12]: CharField.register_lookup(Lower, "lower") Out[12]: django.db.models.functions.base.Lower In [13]: doctor.objects.filter(name__lower__contains="joel") Out[13]: , ]

Re: Convoluted setup information

2018-08-18 Thread Joel Mathew
You could perhaps provide more constructive advice by contributing to the setup pages. I have written a small list of commands that I used for my django setup, at https://blog.droidzone.in/2018/08/17/create-virtualenv-with-python3/ I do this mostly to keep me from repeatedly reinventing the wheel.

Update data instead of creating a new row entry in django model

2018-08-26 Thread Joel Mathew
I have a page for editing existing data from a model. The model: class billitem(models.Model): code = models.AutoField(primary_key=True, unique=True) name = models.CharField(max_length=35) description = models.CharField(max_length=60, null=True) price = models.

Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
After working with the development server for a month, I'm ready to deploy to a VPS. I've installed a debian9 environment and installed apache2 and modwsgi. I'm having trouble editing the httpd.conf and apache wont start with the added lines. My project is at /home/joel/myappointments and the tree

Re: new to django

2018-08-29 Thread Joel Mathew
There are two steps: Install pip, Use pip to install django Follow the tutorial: https://docs.djangoproject.com/en/2.1/intro/install/ On Wed, 29 Aug 2018 at 16:46, sankar ardhas wrote: > > Hi all, > I am a web developer in laravel and codeigniter php web frameworks. > I want to learn h

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
I get this: Aug 29 12:24:52 localhost systemd[1]: Starting The Apache HTTP Server... Aug 29 12:24:52 localhost apachectl[12718]: AH00526: Syntax error on line 31 of /etc/apache2/sites-enabled/000-default.conf: Aug 29 12:24:52 localhost apachectl[12718]: WSGIPythonHome cannot occur within section

Re: Deploying with apache2 and modwsgi

2018-08-29 Thread Joel Mathew
I surmised as much. But where does it go? Do you have a full working configuration of the conf file? On Wed, 29 Aug 2018 at 19:17, Jason wrote: > > well, that's self-explainatory. you have a bad config because that > WSGIPythonHome directive can't exist inside a VirtualHost section. > > On Wed

Re: Deploying with apache2 and modwsgi

2018-08-30 Thread Joel Mathew
I finally got it working with mod_wsgi-express. I was able to get my django project running on port 80. However I have a new problem. The page starts loading, but takes a very long time to load static files. If I hit refresh in the browser, it gives a 503 error. There's nothing in apache logs. The

Cannot find static files when using mod_wsgi and apache

2018-08-31 Thread Joel Mathew
I'm having trouble getting serving static files. My project is at /home/joel/myappointments The app is at /home/joel/myappointments/appointments An example template contains: myappointments/myappointments/settings.py contains: # Static files (CSS, JavaScript, Images) # https://docs.djangoprojec

Error with file paths using mod_wsgi-express

2018-09-01 Thread Joel Mathew
If I run mod_wsgi-express from within the directory /home/joel/myappointments, with the command: mod_wsgi-express start-server --document-root ./htdocs wsgi.py --user www-data --group www-data --port 80 --host myopip.com It works fine. Everything loads. static files load correctly. But of course t

mod_wsgi-express and letsencrypt

2018-09-05 Thread Joel Mathew
Has anyone used mod_wsgi-express with letsencrypt certificates on apache2? On running mod_wsgi-express like this: mod_wsgi-express start-server --log-to-terminal --startup-log --https-port 443 --https-only --server-name mysite.com --ssl-certificate-file ssl-certs/fullchain.pem --ssl-certificate-k

How do I make a field optional to enter, in a django ModelForm?

2018-09-12 Thread Joel Mathew
Scenario: I instantiate a ModelForm and pass it to a template which displays the form. When POST is submitted, code tries to search the database by any of the given inputs. I dont require all inputs to be entered as in the Model. I just need one (or more, if user desires to do an AND search) to be

How can I display an AutoField in a ModelForm?

2018-09-12 Thread Joel Mathew
Question: How can I display an AutoField in a ModelForm. I have a need where a Form is generated and displayed. Based on the input, I need to read the AutoField's value and search for it in my database. My form: class CheckinPatientMetaForm(ModelForm): class Meta: model =

Recreate all tables in mysql after dropping the database

2018-09-16 Thread Joel Mathew
I tried to fix mysql problems in my database by dropping tables. When that didnt work, I dropped the database. I then recreated the database, and tried to run makemigrations. But I am getting errors about missing tables: joel@hp:~/myappointments$ python3 manage.py makemigrations Traceback (most re

Creating urls

2018-09-17 Thread Joel Mathew
I have a project named myappointments, which has two apps, clinic and appointments. As of now, I am using the following urls in clinic.urls: path('newclinic', views.newclinic, name="newclinic"), path('/', views.clinic_home, name="clinic_home"), path('/doctors', views.doctorlist, name="doctorlist")

How to get the name and url of an uploaded file when using models.FileField

2018-09-18 Thread Joel Mathew
How to get the name and url of an uploaded file? I am using the following files: settings.py: MEDIA_URL = '/data/' MEDIA_ROOT = os.path.join(BASE_DIR, 'data') urls.py: urlpatterns = [ path("photo/upload", views.upload_pic, name="uploadpic ") ] + static(settings.MEDIA_URL

Re: How to add form field dynamically?

2018-09-26 Thread Joel Mathew
You would use jquery to create the button using the $(selector).html(code). Since this doesnt fall within the scope of this django group, I wont elaborate. If you know basic javascript and jquery, it should be easy. On Wed, 26 Sep 2018 at 19:25, Django Lover wrote: > Then What is the solution

Re: hi friends i want admin page like this. it is a application form in university

2018-09-27 Thread Joel Mathew
This is a standard django admin page. You can just enable admin and add the relevant models. I suggest you follow the django standard tutorials. On Thu, 27 Sep 2018 at 16:42, Sudha Mohan wrote: > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: django/mysite/polls tutorial error

2018-10-02 Thread Joel Mathew
Well, what does /home/gino/djangoDEV/mysite/polls/urls.py contain? On Tue, 2 Oct 2018 at 18:55, 'ginost7' via Django users < django-users@googlegroups.com> wrote: > Hello > > I am trying the django/mysite/polls tutorial. > > After typing, actually copying and pasting this: > > from django.cont

Re: How to migrate old database into new database using python script

2018-10-11 Thread Joel Mathew
Just import the old ones from sql and then modify the tables. Sincerely yours, Dr Joel G Mathew On Thu, 11 Oct 2018 at 22:12, Mohammad Aqib wrote: > I know CLI commands to backup db and restore into another but in this case > CLI would not work because previous db tables is different from new

Re: How to save multiple model form in one template?

2018-10-13 Thread Joel Mathew
Could you kindly stop spamming your course details over over this discussion group. It's not useful to the majority of us English speaking people. On Sat, 13 Oct 2018 at 20:41, Daniel Bojorge (Foros) wrote: > Take a look to my course (in spanish) and go to the last CRUD, there I do > a Master

Re: Django tables with check box and delete button

2018-10-16 Thread Joel Mathew
There's not much difference in doing this than what is standard practise. You just create the regular fields, loop over the ones creating multiple rows, assign unique name fields to each of them (you can use {{for.counter}} for this). You then capture the request with request.POST.getlist. On T

django username and password error

2018-10-17 Thread Joel Mathew
After attempting to redirect http to https by setting SECURE_SSL_REDIRECT to True and a few other changes, suddenly I found myself locked out of django login. It didnt accept my password, so I tried resetting it via manage.py passwd and manage.py changepassword. I even created a new superuser accou

Creating seperate unique ids within the same table

2018-10-17 Thread Joel Mathew
I have an application which is a clinic management software which allows login into different clinics, and needs to keep patient records of each clinic seperately. The patient records are filed in one common model, with a ForeignKey referring to the clinic to which a patient belongs. Hitherto I ha

Re: Creating seperate unique ids within the same table

2018-10-17 Thread Joel Mathew
legroups.com [mailto: > django-users@googlegroups.com] *On Behalf Of *Joel Mathew > *Sent:* Wednesday, October 17, 2018 11:01 AM > *To:* django-users@googlegroups.com > *Subject:* Creating seperate unique ids within the same table > > > > I have an application which is a clinic m

Re: Creating seperate unique ids within the same table

2018-10-17 Thread Joel Mathew
Dr Joel G Mathew On Thu, 18 Oct 2018 at 09:00, Phako Perez <13.phak...@gmail.com> wrote: > > I suggest to use another table for visit so you can add which doctor, > schedule time, and comments or so as a patient may have 1 visit or n... > > Sent from my iPhone > > On

Re: Creating seperate unique ids within the same table

2018-10-18 Thread Joel Mathew
And each checkin also has its own ID, so you may want to use that to put on > the patient's card. Do they get a new card every time they checkin? > > > -Original Message- > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On > Behalf Of

Re: Creating seperate unique ids within the same table

2018-10-18 Thread Joel Mathew
e new table for this. > > def get_card_id(self, clinic): > return f"{self.id}-{clinic.id}" > > > -Original Message- > From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On > Behalf Of Joel Mathew > Sent: Thursday, Oct

Re: generate username and password

2018-10-18 Thread Joel Mathew
newpassword = RandomPassword() user = User.objects.create_user(username, email, newpassword) Joel G Mathew On Fri, 19 Oct 2018 at 06:55, wrote: > > Bonjour! Je voudrais lorsqu'un utilisateur s'inscrit avec ses informations > personnelles puis soumet le formulaire, je lui génère un nom d'utilisa

Re: new to django

2018-10-18 Thread Joel Mathew
just purge and reinstall django On Fri, 19 Oct 2018 at 08:14, Shubham Bajaj wrote: > > I tried this but it showing no module found django.core > Pls help me.. > > On Fri 19 Oct, 2018, 6:37 AM satyam mishra, wrote: >> >> just install all the necessary module needed, just open the location of >>

How can I implement built in signals, for my app?

2018-10-21 Thread Joel Mathew
How to implement built in signals, for my app? I have a project myappointments, with two apps appointments and clinic in it. Objective: When a user logins, details should be entered in the database. appointments/models.py: class Event(models.Model): id=models.AutoField(primary_key=T

Re: Creating seperate unique ids within the same table

2018-10-22 Thread Joel Mathew
Thank you Bill. I had a look at UUIDs. One of the important criteria I had was that these IDs should be easily memorable. Unfortunately UUIDs are not memorable, being too long to remember. :( Sincerely yours, Joel G Mathew On Mon, 22 Oct 2018 at 19:40, wrote: > > Hello all, > > The previous di

Re: test error

2018-10-22 Thread Joel Mathew
Why did you say that? I'm using django 2.2 and f strings are indeed supported. Sincerely yours, Joel G Mathew On Sun, 21 Oct 2018 at 18:05, Motaz Hejaze wrote: > > f'{}' is not supported > > On Sun, Oct 21, 2018 at 2:29 PM Joel wrote: >> >> What is your version of python? f strings were intro

Identify failed insert field

2018-10-27 Thread Joel Mathew
Is there anyway to identify which database field update failed, instead of a generic message like "ValueError: invalid literal for int() with base 10: ''? For example, I have the following save(): tempcust = unconfirmedappointment(name=name, ageyrs=ageyrs, agemnths=agemnths, gender=gender, mobile

Re: django assignment

2018-10-27 Thread Joel Mathew
Isn't this cheating? Why dont you complete your own assignment? Joel G Mathew On Sun, 28 Oct 2018 at 10:40, RONAK JAIN wrote: > > Hi > > > Please help me out this assignment urgent. How can I solve ? > > > > > Thanks > RJ > > > -- > You received this message because you are subscribed to the G

Re: Identify failed insert field

2018-10-29 Thread Joel Mathew
Yes, usually I print request.POST to check. On Mon, 29 Oct 2018 at 19:11, Manjunath wrote: > > I think one of the numeric values you are passing is an empty string. > Django is trying to cast it to int but failing to do so. > > Best solution would be to print each values before save() call & you w

Error in function to return permissions

2018-10-31 Thread Joel Mathew
I have a custom function to check if a user is authorized to do certain functions: @login_required def checkpermission(request, permiss): username = request.user.username print(f"username is {username}") print(f"User.objects.filter() is {User.objects.filter()}") userobj = User.obje

Re: Error in function to return permissions

2018-11-01 Thread Joel Mathew
Thank you! Sincerely yours, Joel G Mathew On Wed, 31 Oct 2018 at 21:36, Stephen J. Butler wrote: > > @login_required needs "request" as the first parameter. > > On Wed, Oct 31, 2018 at 11:58 AM Joel Mathew wrote: >> >> I have a custom function to c

Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
When I turned DEBUG = False in my project/settings.py, I suddenly got a whole bunch of HTTP Error 500. Most of the css reources showed the error. I have two apps in this project, and I've been sharing static resources between these apps. Would these be the cause of these errors? See the following

Re: Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
Please forgive the typo in the subject line. It should read "Turning DEBUG=False causes a tornado of Error 500s" Joel G Mathew On Sat, 3 Nov 2018 at 00:49, Joel Mathew wrote: > > When I turned DEBUG = False in my project/settings.py, I suddenly got > a whole bunch of HTTP

Re: Turning DEBUG=True causes a tornado of Error 500s

2018-11-02 Thread Joel Mathew
ntry is attempting to send 1 pending error messages Waiting up to 2.0 seconds Press Ctrl-C to quit joel@hp:~/myappointments$ How should I choose location? My apps are appointments, and clinic The project name is myappointments Sincerely yours, Joel G Mathew On Sat, 3 Nov 2018 at 00:54, Matthe

Reading serialized data without json

2018-11-05 Thread Joel Mathew
Is it possible to read serialized data from javascript without encoding to json? The data received by request.POST is: Sincerely yours, Joel G Mathew -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop re

Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
I use jspdf to generate pdf for downloading by end users. I wish to add a function to let them send an email to themselves through the server. Reading a little bit, I've seen a method to send the pdf to the server as a base encoded string, and then have the server decode it, before emailing the obj

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
le "/home/joel/myappointments/venv/lib/python3.6/site-packages/django/middleware/common.py", line 105, in process_response if response.status_code == 404: AttributeError: 'str' object has no attribute 'status_code' Sincerely yours, Joel G Mathew On Wed, 14 Nov 2018 a

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
Thank you. I decided to go with reportlab since it seems to be really powerful and doesnt require a headless browser. The options it has seem similiar (at least superficially) to the way I'm coding js in pdfjs. Thank you for your input. This was a XY problem after all. I should never have thought a

Re: Django jobs

2018-11-14 Thread Joel Mathew
The last point is a bit of a sore for me. I'm well versed with some other languages including perl, C, and javascript. Python seems to have "pythonic" ways of doing stuff that's at loggerheads with all other languages. Is there a single resource to learn the pythonic way of doing things? Like, say

Re: template

2018-11-15 Thread Joel Mathew
Huh? On Thu, 15 Nov 2018 at 18:23, Scott Tresor wrote: > hello how to user template for django > > -- > 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 djan

How to download a file when a django function is called by javascript instead of navigation to the url?

2018-11-16 Thread Joel Mathew
I have a page where several buttons process different functions like sending a user sms (via API), sends an file by email, or downloads a PDF file. Button actions dont use forms, but uses ajax requests via javascript. I used to create a pdf file using javascript (jspdf), but have written code whic

Re: How to download a file when a django function is called by javascript instead of navigation to the url?

2018-11-17 Thread Joel Mathew
Hi Jason, Thank you for responding. I solved this by implementing a temporary link system in my model. This would generate a unique key which points to a foreign key which references the data I want. When the url with this foreign key is clicked, the pdf is generated on the fly and presented as a F

Re: How to download a file when a django function is called by javascript instead of navigation to the url?

2018-11-17 Thread Joel Mathew
Where? Sincerely yours, Joel G Mathew On Sat, 17 Nov 2018 at 20:50, Yavin Aalto Arba wrote: > did you try to set "as_attachment=True" ? > > -- > You received this message because you are subscribed to the Google Groups > "Django users" group. > To unsubscribe from this group and stop receivin

User permissions

2018-11-17 Thread Joel Mathew
How are you implementing user permission groups in your project? I'm using a model to store user and other models as foreign key and permissions as boolean? Is there a preferred module or standard way to do this? Sincerely yours, Joel G Mathew -- You received this message because you are subsc

Re: file URL missing project name

2018-11-18 Thread Joel Mathew
It's anybody's guess unless you post your code. Sincerely yours, Joel G Mathew On Sun, 18 Nov 2018 at 20:47, Jeff Williams wrote: > Hi All, > I'm new to django, so sorry if this is a newbie issue. > > I've managed to upload an ImageFieldbut when I try to display it in my > template using

Re: how to access Facebook graph api in django

2018-11-19 Thread Joel Mathew
What's the problem you're facing? Where's your code? Sincerely yours, Joel G Mathew On Mon, 19 Nov 2018 at 19:04, Tushar Nadkar wrote: > i want to access my users email , address , phone number, pincode by face > book graph api > > -- > You received this message because you are subscribed to

Self hosted sentry server

2018-11-19 Thread Joel Mathew
I'm just wondering if any of you are running a self hosted sentry server for your django installation? Does it have all features of the commercial non hosted subscription? Sincerely yours, Joel G Mathew -- You received this message because you are subscribed to the Google Groups "Django users

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
makemigrations should come before migrate. You cant migrate without creating the migrations first. Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 00:47, Tim Johnson wrote: > * Shubham Rewale [181120 08:44]: > > python manage.py migrate > > Then use > > Python manage.py makemigrations

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
Yes, for your special case where you seem to have a pre-existing migration, you dont need makemigrations before migrate. I was just commenting that this is not the usual case. Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 01:43, Tim Johnson wrote: > * Joel Mathew [181120 10

Re: Unapplied Migration - how to apply

2018-11-20 Thread Joel Mathew
Anyway, there is no point running `makemigrations` after `migrate` is run. That doesnt do anything, unless you have made a change in your models after your migrate is done Sincerely yours, Joel G Mathew On Wed, 21 Nov 2018 at 01:45, Joel Mathew wrote: > Yes, for your special case where

Working with kronos

2018-11-21 Thread Joel Mathew
I was trying the basic django-kronos command to test: I did pip3 install django-kronos, myproject/myapp/cron.py: import kronos import random @kronos.register('* * * * *') def complain(): complaints = [ "I forgot to migrate our applications's cron jobs to our new server! Darn!", "I'm out of compla

Re: Working with kronos

2018-11-22 Thread Joel Mathew
I understood the documentation to mean that either we can create management commands and register with cronos, or create cron.py. Sincerely yours, Joel G Mathew On Thu, 22 Nov 2018 at 18:42, Jason wrote: > https://github.com/jgorset/django-kronos/tree/v1.0#register-tasks-with-cron > > sounds

Re: problem on django contrib

2018-11-24 Thread Joel Mathew
Show the screenshot and complete code Sincerely yours, Joel G Mathew On Sun, 25 Nov 2018 at 08:07, Saeed Pooladzadeh wrote: > Hello > > > I'm trying to use Django on the visual studio but for admin page when I > uncomment the > > from django.contrib import admin > > I get this message : > >

Re: problem on django contrib

2018-11-24 Thread Joel Mathew
Use path for simple urls: from django.contrib import admin from django.urls import path, include from django.conf.urls import url urlpatterns = [ path('admin/', admin.site.urls), path('appointments/', include('appointments.urls')), path('clinic/', include('clinic.urls')), path('', include('clini

Re: problem on django contrib

2018-11-24 Thread Joel Mathew
You didnt show the admin page. You showed urls.py. path is an easier way to use urls, without need for regex. Your problem is not clear to me. If it's something on the admin page. What exactly are you trying to do? Post everything relevant. Sincerely yours, Joel G Mathew On Sun, 25 Nov 2018 at

Re: Django doesn't run manage.py: ModuleNotFoundError: No module named 'ProjectName' (clonded Django project))

2018-11-27 Thread Joel Mathew
What I've found helpful in these situations is: As mentioned just above, always use virtual environment to run your project. Include the name of the folder of the virtualenv in .gitignore Use `pip freeze` > requirements.txt Install modules from requirements.txt in each virtualenv Sincerely yours,

Re: get_or_delete leading to duplicate creation

2018-11-27 Thread Joel Mathew
You're talking as if this is a bug. If your records are being duplicated, the problem is your code. It's not unto django to gauge what you need to do in the database. Be explicit and update the records if you want updation. Sincerely yours, Joel G Mathew On Tue, 27 Nov 2018 at 18:07, Ankit Kha

Unexpected behavior on delete of model

2018-11-27 Thread Joel Mathew
Situation: I have two Model classes, in two different apps which are part of the same project. class doctor defined in appointments.models is a set of attributes associated with a doctor, like name, username, email, phone etc. class DoctorProfilePic is a Model defined in clinic.models, which has a

Re: Unexpected behavior on delete of model

2018-11-27 Thread Joel Mathew
d, the profile pic will be >>>> preserved, with the FK to doc being set to NULL in db (which doesn't seem >>>> desirable). I think here CASCADE should work good and will not have the >>>> issue that the OP is facing. >>>> >>>> >>>> >

Re: Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-28 Thread Joel Mathew
Please provide more useful information that merely suggesting the name of a framework. Please say why you feel this framework is better for working with django. Sincerely yours, Joel G Mathew On Wed, 28 Nov 2018 at 18:36, Thanh Tuyền Huỳnh < huynhthanhtuyen...@gmail.com> wrote: > Hi guys, > >

Re: Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-28 Thread Joel Mathew
I've been thinking a lot about the most painless way of learning a javascript framework. My project is almost complete, and so far everything has been written in javascript using jquery. But for what I have planned next, a framework would be immensely helpful. I just wish it was as easy as learning

Re: Easiest front end JavaScript framework to integrate with a Django backend?

2018-11-29 Thread Joel Mathew
I didnt see anyone recommending React. Is there any aspect that makes it difficult to use with django? -- 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-use

  1   2   >