Monday, June 27, 2016

Finished: User Creation

I have now completed the 'crUser' subroutine for my program, this creates a User by adding their details to an Excel Database as well as adding their own folder under the 'users' folder in the programs directory.

The first thing the program does is to check whether or not the file exists, printing an error message to the screen if the file cannot be found.

After this it creates a file directory under the 'Users' folder, using the OS module (os.mkdirs)


The next step finds the last empty row in the spreadsheet then uses a while loop to add all the details into cells in that row until all necessary details have been added.
This then ends by saving the worksheet, ending the while loop and returning a message to confirm that the user's details have been added to the database.
In addition to this, I have also created a very similar program for adding admin users - which adds different details and can only be accessed by existing program admins.

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.

Introductions

This is a blog to record a python(3.4)-based programming project that I am completing for my A-level Computer Science programming (NEA) project.

The main idea is to have a 'simple-to-use' user-interface where users will enter basic information such as headings and paragraph text - as well as some keywords, e.g. colours for a website theme which the Python Program will turn into a simple website.

I will be posting updates as the project progresses, as well as snippets of code.