Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Provide info on connecting to the db and enabling the admin #10372

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

haacked
Copy link
Contributor

@haacked haacked commented Jan 16, 2025

I'm a bit new to this entire stack so little tips like this would have saved me some time digging around to figure out how to get the Django admin working locally.

If there's a better way to do this, we can amend or replace these instructions.

Changes

Just added a description on how to connect to the db locally to make your account a staff user so you can access the Django /admin

Please describe.

Add screenshots or screen recordings for visual / UI-focused changes.

Checklist

  • Words are spelled using American English
  • Titles are in sentence case
  • Feature names are in sentence case too
  • Use relative URLs for internal links
  • If I moved a page, I added a redirect in vercel.json
  • Remove this template if you're not going to fill it out!

Article checklist

  • I've added (at least) 3-5 internal links to this new article
  • I've added keywords for this page to the rank tracker in Ahrefs
  • I've checked the preview build of the article
  • The date on the article is today's date
  • I've added this to the relevant "Tutorials and guides" docs page (if applicable)

I'm a bit new to this entire stack so little tips like this would have saved me some time digging around to figure out how to get the Django admin working locally.

If there's a better way to do this, we can amend or replace these instructions.
Copy link

vercel bot commented Jan 16, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
posthog ✅ Ready (Inspect) Visit Preview Jan 16, 2025 6:55pm

@@ -367,6 +367,7 @@ Open [http://localhost:8010](http://localhost:8010) to see the app.
To get some practical test data into your brand-new instance of PostHog, run `DEBUG=1 ./manage.py generate_demo_data`. For a list of useful arguments of the command, run `DEBUG=1 ./manage.py generate_demo_data --help`.
> **Friendly Tip** The first time you run the app, you can log in with a test account: _user_:`test@posthog.com` _pwd_:`12345678`. You may want to connect to the database and set `posthog_user.is_staff` to true. To connect to the database, use a tool like pgAdmin and enter these connection details: _host_:`localhost` _port_:`5432` _database_:`posthog`, _username_:`posthog`, _pwd_:`posthog`. This makes it possible to access the Django admin section http://localhost:8000/admin/.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Instead of this being a note, I think this should be two separate sections: "How to access Postgres" and "How to access admin?"

I didn't know the answer to any of these before reading this, so thank you in advance :))

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

Successfully merging this pull request may close these issues.

2 participants