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`,

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

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 =

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

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

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

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

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

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) #

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

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

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

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

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

Re: Creating seperate unique ids within the same table

2018-10-18 Thread Joel Mathew
ach 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 Joel Math

Re: Creating seperate unique ids within the same table

2018-10-18 Thread Joel Mathew
whole 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, October

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

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

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

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

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):

Re: Creating seperate unique ids within the same table

2018-10-17 Thread Joel Mathew
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 Oct 17, 20

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

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

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

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 =

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

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,

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

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 H

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

2018-11-02 Thread Joel Mathew
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, Matthew Pava wrote: > > Did you run collectstatic? > >

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

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

Re: Sending PDF from javascript to django

2018-11-14 Thread Joel Mathew
n3.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 at 14:45, Joel Mathew wrote: > > I use jspdf to generate pdf

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

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

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

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

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

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

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

Re: Zip file upload

2019-01-01 Thread Joel Mathew
No ready made solution. You have to come up with your own solution. Use form to upload file On Wed, 2 Jan, 2019, 9:57 AM Suresh hi guys, > How to upload zip file and save unzip file in django? > > -- > You received this message because you are subscribed to the Google Groups > "Django users"

Re: simple boy start learn python

2019-01-06 Thread Joel Mathew
python is learnt best by doing. As a lesson familiar with other languages, I found it easy to go through the steps in the python official documentation: https://docs.python.org/3/tutorial/ On Sun, 6 Jan, 2019, 11:25 PM Gilbeesh Kosma Prefer the ebook of "django for beginners" by William S

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

Re: No query results on heroku, but working on local development server

2018-12-18 Thread Joel Mathew
re data > heroku pg:psql --app ** < * path.sql>* > > Regards, > Ketan > > On Mon, Dec 17, 2018 at 12:48 AM Joel Mathew wrote: > >> >> 0down votefavorite >> <https://stackoverflow.com/questions/53801636/empty-query-result-on-running-django-

Saving data fails because of null constraint when data is not null

2018-12-22 Thread Joel Mathew
Django - constraint error I have the following python code in django which is deployed on heroku: def newimportdb(request): import xlrd loc = ("./CGHS Rates 2014- Trivandrum.xlsx") wb = xlrd.open_workbook(loc) sheet = wb.sheet_by_index(0) for i in range(sheet.nrows): try: sl =

Re: Saving data fails because of null constraint when data is not null

2018-12-22 Thread Joel Mathew
odels.FloatField(blank=True) > NABHrate = models.FloatField(blank=True) > section = models.ForeignKey('CGHSSection', on_delete=models.SET_NULL, null > =True, blank=True) > > There are total of 6 fields > > There can be only one Primary Key > > Somewhere due to rid field it

No query results on heroku, but working on local development server

2018-12-16 Thread Joel Mathew
0down votefavorite I just started using heroku today. I was testing a web application, and got different results on using django app from local development server and

Re: issue in hosting https://www.pythonanywhere.com

2018-12-24 Thread Joel Mathew
Use virtualenv Sincerely yours, Joel G Mathew On Mon, 24 Dec 2018 at 19:34, Atul Anand wrote: > y code is working in local. But the same code when I am uploading into > https://www.pythonanywhere.com. Its throwing error. > > Note: I have updated few things to make it compatible for

Re: issue in hosting https://www.pythonanywhere.com

2018-12-24 Thread Joel Mathew
virtualenv. Find the >> virtualenv section in the web tab and make sure you specify the path to >> your virtualenv there. Should be something like >> /home/[username]/.virtualenvs/djangoVenv >> >> On Mon, Dec 24, 2018 at 8:09 AM Atul Anand >> wrote: >

Re: Unexpected behavior on delete of model

2018-11-27 Thread Joel Mathew
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-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

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

2018-11-29 Thread Joel Mathew
>From the point of view of someone who hasnt been using frameworks but wants to, this is all very maddening. Guess I just have to pick one randomly between Vue and Angular! Sincerely yours, Joel G Mathew On Fri, 30 Nov 2018 at 01:51, Benjamin SOULAS wrote: > Hello, > > Currently I

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('',

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
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

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

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

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

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

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

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 > >

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

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

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

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

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

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

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

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

Re: How to deploy Django Python Webapp with Windows10?

2019-01-02 Thread Joel Mathew
Windows 10 is not designed to be a server. What is your issue in deploying in Ubuntu or Debian? Sincerely yours, Joel G Mathew On Tue, 1 Jan 2019 at 02:14, gian castillo wrote: > Hi, > I built a webapp with django python and It's done. Now I want to deploy It > online, It's just a

Re: How to deploy Django Python Webapp with Windows10?

2019-01-02 Thread Joel Mathew
Also why are you attempting to deploy it online from your laptop. An online application needs to be.. well, online, all the time. That's the function of a server. You dont normally deploy from a laptop, unless you have a specific need to do so. If it's for a client, definitely a big no-no. Use a

Re: STATIC FILES not working for admin site, projects and apps on DJANGO

2018-12-30 Thread Joel Mathew
Your site has more wrong with it than just static css. Your html is appearing as html. You need to unescape them in template or check your tags On Mon, 31 Dec, 2018, 1:10 AM abel otugeme I have done all that i used the docs first and it did not work. Then i > tired this video

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

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,

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 ") ] +

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

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,

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 >> "

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 >> push

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

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: 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: 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 >

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

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: 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

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

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

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

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

2019-04-30 Thread Joel Mathew
_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 > *Subje

  1   2   >