We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Idea:
from django.db import models from nanodjango import Django app = Django() @app.admin class CountLog(models.Model): # Standard Django model, registered with the admin site timestamp = models.DateTimeField(auto_now_add=True) @app.route("/") def count(request): # Standard Django function view CountLog.objects.create() return f"<p>Number of page loads: {CountLog.objects.count()}</p>" def test_count(): assert CountLog.objects.count() == 0 CountLog.objects.create() assert CountLog.objects.count() == 1
then test with
nanodjango test counter.py
The text was updated successfully, but these errors were encountered:
@marcgibbons is looking at this in #28
Sorry, something went wrong.
No branches or pull requests
Idea:
then test with
The text was updated successfully, but these errors were encountered: