lumenwrites / django-react-blog Goto Github PK
View Code? Open in Web Editor NEWSimple blog built with Django and React/Redux, deployed with Docker, and served with nginx/uwsgi.
Home Page: http://digitalmind.io
License: MIT License
Simple blog built with Django and React/Redux, deployed with Docker, and served with nginx/uwsgi.
Home Page: http://digitalmind.io
License: MIT License
Hey Thanks for your this awesome project . i wants to run it in my locally , for development , how can i do it , can you help
I get this warning on digitalmind.io (both Chrome and FF):
There are probably two problems:
webpack -p
)I use something like this to minify code only in production builds:
function getPlugins() {
const plugins = [];
if (process.env.NODE_ENV === "production") {
plugins.push(new webpack.optimize.UglifyJsPlugin({
minimize: true,
output: {
comments: false
},
compressor: {
warnings: false
}
}));
} else {
// not related to this issue,
// but quite useful, too :)
plugins.push(new webpack.HotModuleReplacementPlugin());
}
return plugins;
}
module.exports = {
…
plugins: getPlugins(),
…
}
Running migrations:
Rendering model states... DONE
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying authtoken.0001_initial... OK
Applying authtoken.0002_auto_20160226_1747... OK
Applying categories.0001_initial... OK
Applying categories.0002_auto_20170215_2244... OK
Applying categories.0003_category_description... OK
Applying posts.0001_initial... OK
Applying posts.0002_auto_20170301_1328... OK
Applying posts.0003_auto_20170303_2103... OK
Applying posts.0004_auto_20170307_0252...Traceback (most recent call last):
File "manage.py", line 22, in <module>
execute_from_command_line(sys.argv)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 367, in execute_from_command_line
utility.execute()
File "/usr/local/lib/python3.5/dist-packages/django/core/management/__init__.py", line 359, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 305, in run_from_argv
self.execute(*args, **cmd_options)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/base.py", line 356, in execute
output = self.handle(*args, **options)
File "/usr/local/lib/python3.5/dist-packages/django/core/management/commands/migrate.py", line 202, in handle
targets, plan, fake=fake, fake_initial=fake_initial
File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 97, in migrate
state = self._migrate_all_forwards(plan, full_plan, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 132, in _migrate_all_forwards
state = self.apply_migration(state, migration, fake=fake, fake_initial=fake_initial)
File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/executor.py", line 237, in apply_migration
state = migration.apply(state, schema_editor)
File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/migration.py", line 129, in apply
operation.database_forwards(self.app_label, schema_editor, old_state, project_state)
File "/usr/local/lib/python3.5/dist-packages/django/db/migrations/operations/fields.py", line 204, in database_forwards
schema_editor.alter_field(from_model, from_field, to_field)
File "/usr/local/lib/python3.5/dist-packages/django/db/backends/base/schema.py", line 480, in alter_field
return self._alter_many_to_many(model, old_field, new_field, strict)
File "/usr/local/lib/python3.5/dist-packages/django/db/backends/base/schema.py", line 798, in _alter_many_to_many
new_field.remote_field.through._meta.get_field(new_field.m2m_reverse_field_name()),
AttributeError: 'ManyToManyField' object has no attribute 'm2m_reverse_field_name'
root@8aa34cbd794a:/home/blog/backend# python3.5 manage.py createsuperuser
System check identified some issues:
WARNINGS:
posts.Post.tags: (fields.W340) null has no effect on ManyToManyField.
I've followed all the steps mentioned in readme
docker-compose up
docker exec -i -t backend /bin/bash
python3.5 manage.py migrate
python3.5 manage.py createsuperuser (create root user)
But when I goto localhost/login and login, the webpage show "Bad Login Info"
I am looking for a Django blog bootstrap, and I was messing with the online website.
I noticed that the page number changes, but the context inside the page number is not changing.
For example, if page 1 was showing context "x", page 2 is also showing context "x" instead of having another context , such as "y".
I hope this helps.
Hello, thank you for sharing this project, I'll take a deep look at it since its the kind of setup I'd like to use for my projects.
Some questions/suggestions if I may (please correct me if I'm wrong, I'm still kinda new to these technologies):
Wouldn't it be better to have a docker-compose.yml file for production and one for development?
these are the things I would change in the production config:
RUN
command, makes searches for files more inefficient. It's recommended that you install all your dependencies with a single RUN
command, using bash &&
to chain commandsIf you don't mind, I'll submit some issues if I have any further questions about the project, so I can learn a thing or two and hopefully contribute to this project.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.