PyJaipur / PyJudge

Simple Programming Contest hosting software
MIT License
17 stars 29 forks source link

Interface to add questions via website #119

Open theSage21 opened 5 years ago

theSage21 commented 5 years ago

Questions are added via the file system right now. We need a mechanism to be able to add them via the web interface.

roadmap for this:

rsvarma95 commented 5 years ago

Can I work on this enhancement ?

theSage21 commented 5 years ago

sure sure. no need to ask please go ahead and open a PR :+1:

rsvarma95 commented 5 years ago

So when a user is going to upload the question, he will uploading three sets of files which are the input, output and statement. Now, the existing model for the questions are

class Question(Model):
    q_no = IntegerField(unique=True)
    author = ForeignKeyField(User)

    class Meta:
        database = db

Presently, the questions are being referenced from a folder. Should I continue with the same or use the database to store the entire contents of the file the user has uploaded ?

theSage21 commented 5 years ago

I'll say 2 files for I/o then one text field to capture statement.

Let's put everything in the database. Sqlite can handle up to 1tb easily