Skip to content
This repository has been archived by the owner on Oct 8, 2019. It is now read-only.

Starting Django and admin password #2

Open
Jagmills opened this issue Sep 3, 2016 · 3 comments
Open

Starting Django and admin password #2

Jagmills opened this issue Sep 3, 2016 · 3 comments

Comments

@Jagmills
Copy link

Jagmills commented Sep 3, 2016

Dear Hector,

First of all thanks for your hard work on this! It is an excellent project and one I'm hoping to use for our Makerspace here in the UK.

I was wondering if you could assist me. I have so far deployed the Django webserver on the Pi using:
python manage.py runserver

And I can create a login to this, but my user dashboard doesn't really do anything.

If I navigate to /admin I am presented with a new login page, but cannot login with the user account I created. I also sadly could not find anything about the login details for this anywhere in your code so far.

Could you please provide me with some basic pointers of how to set this up? I.e. who to log in as to start creating users, or the process I should be doing.

I'd be very grateful, thank you for your time.

@torehc
Copy link
Owner

torehc commented Sep 4, 2016

Hi. Thank you for your interest in the project, I will be glad to help.

When putting "/admin" page that appears is a Django Admin with Bootstrap theme.

To log in on that page you must run the command:
"python manage.py createsuperuser"
The user that you create will be the superuser can log in to create other users.

Another thing, check that the configuration fields of the database are well on the Settings.py. You can also see the file sqlite all data created within the database.

Greetings.

@Jagmills
Copy link
Author

Jagmills commented Sep 4, 2016

That's great, thank you very much! I have the control panel up and running, and after getting a Telegram Bot code my RFID tags correctly authenticate and open the relay. It really is quite an excellent solution.

The next (and hopefully last) question I have for you, are there any additional steps that I need to follow to get the bot up and running? I am being sent messages (e.g. user in and out), but cannot run commands it seems. I suppose I have to run master/telegrambot/telegramBot.py as a service somehow?

Thanks again for your prompt help. We will hopefully be implementing your system at our Makerspace in the next few weeks. We might add some functionality on top - for example the ability to have certain permissions per user to operate machines (so only trained members may operate a laser cutter for example).

@torehc
Copy link
Owner

torehc commented Sep 4, 2016

I'm glad that everything works well.

Yes, the bot must be always running as a service. You can do as a normal Linux daemon.

For the bot to work you need a token you get talking to Telegram Botfather.
This token must put in Settings ("master/web/carontepass/carontepass/settings_local.py")

The improvement that you mention is one that I have thought, it will be happy to add it.
Feel free ask anything, greetings.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants