Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Monday, July 25, 2016

Shifting to SQlite

So today I have worked on the database creation for the 'Admin' and 'Users' tables - both within the database. It is a simple program only designed for creating the database in the first place, later-on I will be working on the adding and removal of users.

This first image shows the program accessing the database and creating the new table within the database as the program calls it. (shown below)

The second image calls the create_table function , adding a new table to the database and then proceeding to add all the relevant data columns, such as email address, username and user ID.

The user ID is a new addition from the previous excel method - which may be useful in streamlining search methods for calling data from the db later in the program.

*Edit*
This is what the table structure looks like in the database itself. (viewed using the SQlite Inspector program, as recommended by Python Schools)

Saturday, June 18, 2016

User Database

As I have not yet finished a significant enough part of the programming in python for the main program I will (for now) explain a little about the Users database, run using an ms. excel spreadsheet.

Python is able to manipulate cells in the spreadsheet file by using an external module called 'openpyxl'.  Python Library Page

As I am having users and admins, I am using two different sheets in the same file. Both record a name, surname, username, last login and email. The main difference between the two is that the Users sheet also contains a file directory detailing where their files are stored. As the program progresses, they will be given different permissions.



Here are a few images to illustrate the structure.
The subroutine I have created to add a regular user (so-far) looks like this:
 ---
 ---
---

I will make downloads of all the files available once I have completed the project.